hello-robot/stretch_body

Introduce `wrist` attribute to robot class

Opened this issue · 1 comments

When discussing the joints on Stretch, it's common to refer to the pitch/roll/yaw joints at the end of the robot's arm as the robot's "wrist". I think it would be nice to extend this nomenclature into the code as robot.wrist. For example:

import stretch_body.robot
r = stretch_body.robot.Robot()
r.startup()
r.wrist.move_to('wrist_pitch', 1.57)
print(r.wrist.status['wrist_pitch']['pos'])
r.wrist.get_joint('wrist_yaw').set_velocity(0.01)
r.stop()

We wouldn't have to get rid of r.end_of_arm. It would continue to be available. The only change would be to set an additional attribute called wrist to the tool class that end_of_arm is pointing to.

Seems like a good idea to me.