-
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
Full CAN Interface Support #23
Comments
Currently this is not on our roadmap, but we're open to suggestions. Can you tell us more about your use case? Are you using the standalone For the standalone For the If you only need it at startup, the approach could be based on a config file. |
We currently use the standalone node and have implemented a "side-channel" node to send
I thought it would be helpful for us if the odrive_node supports such value change through ROS2 parameters.
I am unfamiliar with ROS2 control, but GPIO interfaces can be used. |
Meanwhile there have been multiple users wanting to access more ODrive parameters, so I took a closer look at the possibilities. Here are some approaches how this could look like. If anyone who's reading this is interested in this, please drop a comment or reaction. Also let us know what approach would work best for you or if you have other ideas or comments. Curated ROS messagesThis is what we've been doing so far, except that there are only very few exposed parameters currently. Adding more curated message might make sense but it will be hard to get exactly right what users want to access. Adding too many parameters to one ROS message introduces CAN overhead, unless we make the fields optional by adding a Applies to: ROS node: yes, ROS control: indirectly (*) 1:1 mapping between CAN messages and ROS messagesThe ODrive CAN messages are documented here.
Cons:
Applies to: ROS node: yes, ROS control: indirectly (*) Static config fileThis would be intended for configuring ODrive parameters with statically known values. User defines static list of ODrive configuration parameters in a JSON/YAML file: axis0.controller.config.vel_limit: 10
axis0.controller.config.vel_limit_tolerance: 2.0
... The configuration file would be written when the ROS node starts and whenever the ODrive reboots. The file can be copied straight out of the GUI during initial development of the robot. After that, an ODrive fresh from factory only needs to be connected to the ROS node and will be automatically configured. (user action needed to invoke initial calibration sequence.) Applies to: ROS node: yes, ROS control: yes Custom topicsThis is intended for when you need to read/write a parameter at runtime which is not part of the predefined ROS messages. User defines the desired pub/sub topics in a YAML/JSON file: publishers:
estimates: # user-defined topic name
fields:
fet_temp: axis0.motor.fet_thermistor.temperature
motor_temp: axis0.motor.motor_thermistor.temperature
interval: 0.5
subscribers:
limits:
fields:
torque_soft_min: axis0.config.torque_soft_min
torque_soft_max: axis0.config.torque_soft_max Based on that, the ROS node publishes
and subscribes on
(possibly relevant for dynamic message types: ros2/rclcpp#2260 (comment), but that's only needed at the ODrive node side. Users can just type out their desired message format statically.) Applies to: ROS node: yes, ROS control: yes/indirectly (*) (*) A custom controller might be required to expose ROS topics when using ROS Control. The GPIO demo linked by @daisukes appears to be doing something like that. In the last approach, it may be sufficient to expose custom "command interfaces" and "state interfaces" based on the config file. |
Thank you for the consideration! I like 1:1 mapping for the ROS node. As for the arbitrary parameter access, I think if the node exposes I think |
Hello @samuelsadok,
Thank you for providing ROS2/CAN support for Odrive!
We have been developing robots with Pro and S1 connected through CAN and wanted to use
SetVelGain
and Arbitrary Parameter Access, but it looks like the current implementation supports a part of the interface.Do you plan to support all CAN interfaces listed in the link?
The text was updated successfully, but these errors were encountered: