Handling Dynamixel servo overload errors

It is possible for the Stretch Dynamixel servos to become overloaded or overheated during normal operation. In particular:

  • Stretch Gripper: When grasping an object with a strong grip for a prolonged period
  • Wrist Yaw: When rotating into a fixed object and holding a stall condition

Fortunately, Stretch Body has some built in mechanisms to attempt to avoid these states (more below).

When a servo is in an overload condition it becomes unresponsive and will not move. This is the built-in behavior of the servo itself. When this happens, a reboot is required. To do this run:


This will reboot all servos and the joints will require homing afterwards.

In your code you can check if your servo is in an error condition by looking at its status fields. E.g.,:


The Robot Sentry

Stretch Body includes a sentry who’s job it is to keep the robot from hurting itself, among other things. It works by running a thread from the Robot instance that monitors the various status fields and then applies safe limits and bounds to actuators, etc.

In the case of Dynamixel servos, the sentry

  • Emulates a runstop tied to the runstop button in the robots head (so that hitting the runstop will pause the servo motion)
  • Attempt to back off an overload condition to limit the currents applied by the servo.

You can see in the Stretch Gripper code how this works. If the sentry detects that the motion is stalled it will back off the commanded position by a small amount. This has the effect of reducing the steady-state error of the servos PID controller (and reducing the motor current).

Advanced users may want to overload this sentry or adjust its parameters to best fit their application.

It is important to note that the sentry only runs when there is an instance of a Robot class running. Some tools, such as stretch_gripper_jog.py do not instantiate the Robot class and therefore do not run the sentry.