I've recently added support for the control method offered by this dynamixel_hardware_interface + ros2 control for my 4 legged 4-dof robot. The process was relatively smooth however the interface seems to be missing diagnostic state information required for safe operation.
The current dxl_state i.e.
header:
stamp:
sec:
nanosec:
frame_id:
comm_state:
id:
torque_state:
dxl_hw_state:
Lacks present temperature & hardware error status fields.
As far as I can tell the only way to expose these are via the service: dynamixel_hardware_interface/get_dxl_data which uses item names found in the .model (https://github.com/ROBOTIS-GIT/dynamixel_hardware_interface/blob/main/param/dxl_model/ph54_200_s500.model).
From my usage of dynamixel_hardware_interface/get_dxl_data via command line so far. I've found that the service itself to be very slow... and the return type uint32 isn't great for many of the fields.
First attempt with 5 second timeout - FAILS with timeout output
$ ros2 service call /dynamixel_hardware_interface/port1/get_dxl_data dynamixel_interfaces/srv/GetDataFromDxl "{header: {stamp: {sec: 0, nanosec: 0}, frame_id: ''}, id: 11, item_name: 'Present Temperature', timeout_sec: 5.0}"
requester: making request: dynamixel_interfaces.srv.GetDataFromDxl_Request(header=std_msgs.msg.Header(stamp=builtin_interfaces.msg.Time(sec=0, nanosec=0), frame_id=''), id=11, item_name='Present Temperature', timeout_sec=5.0)
response:
dynamixel_interfaces.srv.GetDataFromDxl_Response(item_data=0, result=False)
Second attempt with 10 second timeout - SUCCEEDS
$ ros2 service call /dynamixel_hardware_interface/port1/get_dxl_data dynamixel_interfaces/srv/GetDataFromDxl "{header: {stamp: {sec: 0, nanosec: 0}, frame_id: ''}, id: 11, item_name: 'Present Temperature', timeout_sec: 10.0}"
requester: making request: dynamixel_interfaces.srv.GetDataFromDxl_Request(header=std_msgs.msg.Header(stamp=builtin_interfaces.msg.Time(sec=0, nanosec=0), frame_id=''), id=11, item_name='Present Temperature', timeout_sec=10.0)
response:
dynamixel_interfaces.srv.GetDataFromDxl_Response(item_data=42, result=True)
This demonstrates:
- A simple temperature read requires >5 seconds but <10 seconds to complete
- The same call succeeds or fails purely based on timeout value
And this is the result of a working field! Many of the others listed in the [control table] simply don't. For instance Hardware Error Status.
Please let me know if I'm missing something and/or if there's another method for getting these states.
I've recently added support for the control method offered by this dynamixel_hardware_interface + ros2 control for my 4 legged 4-dof robot. The process was relatively smooth however the interface seems to be missing diagnostic state information required for safe operation.
The current dxl_state i.e.
Lacks present temperature & hardware error status fields.
As far as I can tell the only way to expose these are via the service:
dynamixel_hardware_interface/get_dxl_datawhich uses item names found in the .model (https://github.com/ROBOTIS-GIT/dynamixel_hardware_interface/blob/main/param/dxl_model/ph54_200_s500.model).From my usage of dynamixel_hardware_interface/get_dxl_data via command line so far. I've found that the service itself to be very slow... and the return type uint32 isn't great for many of the fields.
First attempt with 5 second timeout - FAILS with timeout output
Second attempt with 10 second timeout - SUCCEEDS
This demonstrates:
And this is the result of a working field! Many of the others listed in the [control table] simply don't. For instance
Hardware Error Status.Please let me know if I'm missing something and/or if there's another method for getting these states.