Freedrive Mode example

Freedrive allows the robot arm to be manually pulled into desired positions and/or poses. The joints move with little resistance because the brakes are released.

An example to utilize the freedrive mode can be found in the freedrive_example.cpp.

Note

For the following example to work on an e-Series (PolyScope 5) robot, the robot has to be in remote control mode.

At first, we create a ExampleRobotWrapper object in order to initialize communication with the robot.

Start freedrive mode

The UrDriver provides a method to start freedrive mode directly:

As it is potentially dangerous to leave the robot in freedrive mode, the robot program expect frequent keepalive messages to verify that the remote connection is still available and freedrive mode is being expected to be active.

Freedrive mode will be active from this point on until it is either stopped, or no keepalive message is received by the robot anymore.

Therefore, we have to make sure to send regular keepalive messages to the robot. The following section will keep freedrive mode active for a period of time defined in seconds_to_run.

Stop force Mode

To stop force mode either stop sending keepalive signals or request deactivating it explicitly: