ros_odrive icon indicating copy to clipboard operation
ros_odrive copied to clipboard

Service call to set axis state: blinking red and cant be cleared without the gui

Open anthonywebb opened this issue 1 year ago • 2 comments

When changing to state 8 I get brief flash of green, and then it starts blinking red. The only remedy seems to be to plug in a USBC and open the gui and clear the error.

I see in the canbus docs that there is a way to clear errors but I am not finding a service call to do that from this package.

admin@ros2:/workspaces/isaac_ros-dev$ ros2 service call /odrive_axis0/request_axis_state odrive_can/srv/AxisState "{axis_requested_state: 8}"
waiting for service to become available...
requester: making request: odrive_can.srv.AxisState_Request(axis_requested_state=8)

response:
odrive_can.srv.AxisState_Response(active_errors=16777216, axis_state=1, procedure_result=3)

anthonywebb avatar Jan 18 '24 04:01 anthonywebb

I've been developing some basic tools for odrive-can communication for my own use, I think they can help you out assuming you are running an a can hat + pi type of setup.

https://github.com/JesseDarr/odrive_can_tools

There are python scripts in the root directory that allow you to clear all errors, configure odrive settings, and a few that move the odrives. All of these scripts auto-discover all of the odrives on the CAN bus. It pretty much replaces my need to interact with the web UI. The exception, is that you will need to use the web UI or the odrive python tool via USB to configure the node IDs for all of the odrives first.

JesseDarr avatar Feb 22 '24 00:02 JesseDarr

Nice! Note that firmware 0.6.9 now supports pure-CAN, GUI-less node ID assignment and we also added some example scripts to aid in bringing up ODrives: https://docs.odriverobotics.com/v/latest/guides/can-guide.html#setting-up-the-odrive-can-only

Regarding clearing errors in ROS, I think we should probably autoclear them when CLOSED_LOOP_CONTROL is requested. I can look into it some time soon (PRs also welcome).

samuelsadok avatar Feb 26 '24 09:02 samuelsadok