Best way to limit Yaw and Pitch of Stretch RE1


I am working on attaching a stock to the hello-robot arm to fix a camera for ego-centric streaming (refer to the image attached).

There is a hurdle to this that hello-robot during calibration moves its arm in certain ways that can break the stock and camera. We also want to avoid any such unintentional movements that may be given manually through commands or teleop.

I think if we could limit the motion of yaw and pitch of the arm, it should solve the issue. So wanted to know what’s the best way to apply this safety limits and ensure they are universally applied.


Hey @Anant_Rai ,

You can create Custom Collision Models for the robot using the RobotCollisionModel class. The RobotCollisionModel is a base class to provide simple self-collision avoidance by defining derived (custom) classes that should implement the collision logic. It works by defining acceptable joint ranges for the joints based on the current kinematic state of the robot. And this collision model can be implemented all over stretch body movements.

You can find the Tutorial: Collision Avoidance, which will discuss the simple collision avoidance system that runs as a part of the Stretch Body and implementing custom collision models.

For the Yaw motion, you have to keep in mind that even if the Range of motion is clipped using an active custom collision model but during the homing process the Yaw moves CW to find the hard-stop which is required to calibrate its home position.