# Arm stops abruptly at "fast" velocity

**URL:** <https://forum.hello-robot.com/t/arm-stops-abruptly-at-fast-velocity/108>\
**Category:** Ask\
**Created:** [January 7, 2021, 1:14am UTC](https://forum.hello-robot.com/t/arm-stops-abruptly-at-fast-velocity/108 "2021-01-07T01:14:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lionel\_Zhang](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/lionel_zhang/32/181_2.png) [@Lionel\_Zhang](https://forum.hello-robot.com/u/Lionel_Zhang)\
**Post date:** [January 7, 2021, 1:14am UTC](https://forum.hello-robot.com/t/arm-stops-abruptly-at-fast-velocity/108/1 "2021-01-07T01:14:33Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![aedsinger](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/aedsinger/32/6_2.png) [@aedsinger](https://forum.hello-robot.com/u/aedsinger)\
**Post date:** [January 7, 2021, 3:33am UTC](https://forum.hello-robot.com/t/arm-stops-abruptly-at-fast-velocity/108/2 "2021-01-07T03:33:31Z")

</div>

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](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/arm.py) 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:

arm:  
contact\_thresh\_N:

- -50.2
- 55.9

To override these settings, add to your ~/stretch\_re1\_user\_params.yaml, for example:

arm:  
contact\_thresh\_N:

- -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!

---

<div class="post-metadata">

**Author:** ![Lionel\_Zhang](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/lionel_zhang/32/181_2.png) [@Lionel\_Zhang](https://forum.hello-robot.com/u/Lionel_Zhang)\
**Post date:** [January 7, 2021, 4:59am UTC](https://forum.hello-robot.com/t/arm-stops-abruptly-at-fast-velocity/108/3 "2021-01-07T04:59:51Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![aedsinger](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/aedsinger/32/6_2.png) [@aedsinger](https://forum.hello-robot.com/u/aedsinger)\
**Post date:** [January 7, 2021, 4:56pm UTC](https://forum.hello-robot.com/t/arm-stops-abruptly-at-fast-velocity/108/4 "2021-01-07T16:56:32Z")

</div>

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!
