Arm stops abruptly at "fast" velocity

I’ve noticed that when I set the arm velocity to around 0.25 m/s or higher, it will stop abruptly as the velocity ramps up. If the command was not sent repeatedly, the arm would just stop abruptly without reaching the destination. This occurs both when extending and retracting at the “fast” velocity. This doesn’t happen when the velocity is set to the default 0.14 m/s. Do you have any ideas what might be the problem?

This is a subtle aspect of the robot that you’ve uncovered. The lift and the arm have ‘guarded contact’ mode enabled, which means that it will stop if the motor torques exceed a fixed threshold. When guarded-contact is triggered, the actuator stops until a new position command is received.

This functionality is intended to allow the robot arm to stop when making unexpected contact with the world. The factory settings for guarded contact are fairly sensitive. During fast motion, or when holding a heavy payload, the guarded contact behavior can be triggered when no external contact is present. The remedy is to make the contact settings less sensitive.

Our intent is that the developer will specify the contact thresholds through the Stretch Body API (See the move_to call for the arm). Alternatively, the default thresholds can be set via the user YAML.

Currently the typical contact sensitivities for the arm found in ~/stetch_user/stretch_re1_factory_params.yaml are:


  • -50.2
  • 55.9

To override these settings, add to your ~/stretch_re1_user_params.yaml, for example:


  • -80.0
  • 80.0

You will want to tune this contact threshold to still stop at reasonable contact but not trigger an incorrect stop during normal (but fast) motion.

Finally, while the units are specified as '_N", or Newtons, the values aren’t particularly accurate, so don’t over interpret this aspect of the values.

Let us know how it works out!


Thanks a lot for your help, Aaron. This is very useful to know. Changing the contact_thresh_N value has solved my issue.

I noticed there is also a contact_thresh_max_N setting set to +/- 100N by default. Does this value also need to be modified if the desired contact_thresh_N exceeds this bound? Or is modifying the thresh_max not recommended since the motor may be susceptible to damage?

I wouldn’t recommend modifying the contact_thresh_max_N above the factory defaults. While the actuator can be quite a bit stronger, its drive train lifespan may be reduced.

Glad it worked out!

1 Like