hello-robot / stretch_body

Python packages to interact with the hardware of the Stretch mobile manipulators from Hello Robot Inc.
https://docs.hello-robot.com/0.2/stretch-tutorials/stretch_body/
28 stars 25 forks source link

Introduce `wrist` attribute to robot class #281

Open hello-binit opened 8 months ago

hello-binit commented 8 months ago

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.

aedsinger commented 8 months ago

Seems like a good idea to me.