Webots User Guide

previous page go up next page

Foreword

Thanks

1.Installing Webots

2.Upgrading from Webots 2

3.Getting Started with Webots

4.Tutorial: Modelling and simulating your robot

5.Robot and Supervisor Controllers

6.Tutorial: Using the KheperaTM robot

7.ALife Contest

     

5.5 Controlling Actuators

Actuators are easier to handle than sensors. They don't need to be enabled. To control an actuator, it must be:

  1. identified: this is performed by the robot_get_device function which returns a handler to the actuator from its name. This needs to be done only once in the reset callback function, which is provided as an argument to the robot_live function. As with sensors, the only exception to this rule concerns the root device of a robot.

  2. set: this is performed by the appropriate set function specific to each actuator (see differential_wheels_set_speed for an example). It is usually called in the endless loop with different computed values at each step.

  3. run: this is done by the robot_step function inside the endless loop.

previous page go up next page
^ page top ^

  E-mail to webmaster Last updated: Copyright © 2002 Cyberbotics Ltd.