KITmedical / kacanopen

Easy-to-use CanOpen stack and CanOpen-to-ROS bridge.
Other
94 stars 57 forks source link

Add support for velocity/effort mode via ROS bridge #27

Open zal-jlange opened 3 years ago

zal-jlange commented 3 years ago

This PR allows users to use a position, velocity, or effort mode via ROS bridge with kacanopen.

The available modes are: "profile_position_mode", "profile_velocity_mode", and "effort_mode" Thus, instead of

device.set_entry("modes_of_operation", device.get_constant("profile_position_mode"));

you can also write

device.set_entry("modes_of_operation", device.get_constant("profile_velocity_mode"));

or

device.set_entry("modes_of_operation", device.get_constant("torque_mode"));

While this PR does not include mode changes on-the-fly, users could write their ROS bridge to stop the motor and re-initialize it in a different mode.

If you have any more questions or need any help, feel free to contact me :)