neomanic / odrive_ros

ROS driver for the ODrive motor drive
Other
70 stars 48 forks source link

Changes with fw v0.5.x #22

Open SamAlexandrov opened 3 years ago

SamAlexandrov commented 3 years ago

The control mode names have changed, for example: axis.controller.config.control_mode = CONTROL_MODE_VELOCITY_CONTROL instead of axis.controller.config.control_mode = CTRL_MODE_VELOCITY_CONTROL

I personally edited it in the odrive_interface.py and now the ROS node works again. Not sure how to approach it - maybe create a release with tag 0.5.x?

neomanic commented 3 years ago

Hi Sam,

I've just added an archive notice since I no longer have access to testing. If you want to prep a pull request for the change, I can add it. But try to keep backwards compatibility, perhaps the easiest way is to replace the old constants, but at the top of the file do a version check for older versions, and add the equivalents of CONTROL_MODE_VELOCITY_CONTROL = CTRL_MODE_VELOCITY_CONTROL