Stretch arm hitting collision limit and killing code

For one of our Stretch robots, when it try to extend its telescoping arm, it keeps hitting the torque collision limit (which causes the arm to stop, as if it just collided with something, even though no collision has happened).
When this collision limit occurs, it kills the currently command sent the controller via robot.push_command()
This only just started happening today. It happens even when I use the Xbox controller, the arm keeps stopping and jerking backwards when I try to extend it outwards.

Hi @Zackory, your diagnosis is correct and the solution is to calibrate new collision limits for the arm using: REx_calibrate_guarded_contact.py --arm. This is most commonly necessary when the previous limits were calibrated for a different end-effector (e.g. standard vs dex wrist grippers).

Until recently, this tool didn’t support RE1 robots. I just updated it to do so, so you will need update stretch_factory using: pip3 install -U hello-robot-stretch-factory

Upon running REx_calibrate_guarded_contact.py --arm, you will see the arm telescope fully in and out 5 times. The following will be printed out, and 2 plots will appear. When prompted to save the results, select ‘yes’ and the phantom detection of collisions should disappear.

Output of 'REx_calibrate_guarded_contact.py --arm'
For use with S T R E T C H (R) RESEARCH EDITION from Hello Robot Inc.
---------------------------------------------------------------------

------------------------
Joint Arm will go through its full range-of-motion. Ensure workspace is collision free 
Proceed? [y/N]: y

------------------------------------
Starting data collection...
Positive Motion: Itr 0  Max 32.150461 (Pct)
Negative Motion: Itr 0 Min -26.079486 (Pct)
Positive Motion: Itr 1  Max 26.217793 (Pct)
Negative Motion: Itr 1 Min -28.198471 (Pct)
Positive Motion: Itr 2  Max 26.193351 (Pct)
Negative Motion: Itr 2 Min -26.536788 (Pct)
Positive Motion: Itr 3  Max 27.822741 (Pct)
Negative Motion: Itr 3 Min -28.826646 (Pct)
Maximum effort_pct pos: 32.150461
Minimum effort_pct neg: -28.826646
--------------------------------------

Writing results log: /home/hello-robot/stretch_user/log/calibrate_guarded_contact_arm_results_20230116124840.log
Writing image log: /home/hello-robot/stretch_user/log/calibrate_guarded_contact_arm_pos_effort_pct_20230116124840.png
Writing image log: /home/hello-robot/stretch_user/log/calibrate_guarded_contact_arm_neg_effort_pct_20230116124840.png

Prior contact defaults were:
----------------------------
Positive direction:  35.077034 (Effort)
Negative direction: -30.115570 (Effort)

New contact defaults are:
----------------------------
Positive direction: 42.150461 (Effort)
Negative direction: -38.826646 (Effort)
Save results? [y/N]:

My previous effort limits of [-30.12, 35.08] were calibrated with the standard gripper. I swapped in the Dex Wrist, which is heavier than the standard gripper, so the new calibration increases the effort limits to [-38.83, 42.15]. Effort readings from stretch_body will range [-100, 100], where negative values are reading while the arm is telescoping in, and positive values are readings while the arm is telescoping out.
calibrate_guarded_contact_arm_neg_effort_pct_20230116124840
This plot shows the motor effort measured by this tool while the joint moved inwards over its range (e.g. 0.5m to 0.0m for the arm). The different colors represent each of the 5 cycles the tool did.
calibrate_guarded_contact_arm_pos_effort_pct_20230116124840
This plot shows the motor effort measured by this tool while the joint moved outward over its range (e.g. 0.0m to 0.5m for the arm). The different colors represent each of the 5 cycles the tool did.