-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ODrive Node Does Not Feed Watchdog Timer Fast Enough #32
Comments
ros_odrive/odrive_node/src/odrive_can_node.cpp Lines 179 to 184 in d2f0f54
/request_axis_service includes a 1-second wait process in service callback. I think it is timing out because the subscriber is not receiving the speed command topics while waiting. related to #26 . |
Yeah from looking at it I think "/request_axis_service" is probably the reason for the watchdog timeout. The ROS-side of the node runs on a single thread, so when The solution is to make Here's a draft how it can be done: https://github.com/odriverobotics/ros_odrive/compare/async-service (An alternative solution would be to use a |
I'm using the ODrive node in an application where I want to set the watchdog timeout to something around 100ms. But no matter how quickly I send control messages the axis state gets set back to IDLE. I'm currently sending control messages at 100Hz and the timeout is set to 0.1s. The only way I can prevent the ODrive from leaving the CLOSED_LOOP_CONTROL state is by setting the watchdog timeout to something larger than 1.0s. Anything lower than 1.0s and for some reason the watchdog does not stay fed even if I'm sending control messages at 100Hz. Not sure if this is a related issue but I'm suspicious it may be. When I continuously send control messages and then set the requested axis state to CLOSED_LOOP_CONTROL the odrive node will print many "Failed to send CAN frame" messages. I can kind of fix this by setting the QoS for the control message subscriber to only keep the last message instead of keeping all the messages as it is written right now. But this does not fix the watchdog issue and I'm not totally sure the implications of modifying the message queue length.
The text was updated successfully, but these errors were encountered: