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 24 forks source link

Populate or remove Dxl shutdown flag from status dictionary #308

Open hello-binit opened 6 months ago

hello-binit commented 6 months ago

There is a "shutdown" key in the status dictionary that isn't populated or used.

https://github.com/hello-robot/stretch_body/blob/e7bb48ff8ca7ff9b5f483000ce3f520dbc8cbd45/body/stretch_body/dynamixel_hello_XL430.py#L62

Screenshot from 2024-04-26 00-27-54

According to the Dynamixel docs (https://emanual.robotis.com/docs/en/dxl/x/xl430-w250/#shutdown), the shutdown byte can report whether the servo is experiencing:

Confusingly, we also have "hardware_error", "input_voltage_error", "overheating_error", "motor_encoder_error", "electrical_shock_error", "overload_error", "stalled", and "stalled_overload" flags. Furthermore, "stalled" always reports True, even if the servo is clearly not stalled. I think some consolidation and documentation around these error states would be useful.