odriverobotics / ros_odrive

MIT License
47 stars 28 forks source link

Getting joint_state nan in ros2 control #20

Open ErikParkerrr opened 2 months ago

ErikParkerrr commented 2 months ago

Hi all, I have two ODrives working perfectly with ros2 control thanks to this repo. I'm just using simple velocity controllers.

On the joint_states topic I get the joint states of my other ODrives perfectly, but the third one reports nan. I can control the third ODrive perfectly, so I don't think it can be an issue with how ros2 control is setup.

I've tried factory resetting, etc. The position reports correctly in the web GUI. Not sure how to diagnose this further, looking for suggestions.

Thank you.

samuelsadok commented 2 months ago

Is the configuration on all three ODrives identical? In particular, maybe feedback messages weren't enabled on the third one? If you have odrivetool installed, you can dump the config with odrivetool backup-config myconfig.json and compare them.

If that doesn't help, the next step I can think of would be to add log output to the ROS hardware interface on every incoming CAN message (lmk if more details needed).