ros-industrial / ros2_canopen

CANopen driver framework for ROS2
https://ros-industrial.github.io/ros2_canopen/manual/rolling/
141 stars 60 forks source link

Add ros2_control SystemInterface #23

Closed hellantos closed 2 years ago

hellantos commented 2 years ago

Feature request The CANopen stack should expose a ros2_control hardware interface, in order to make control of motion devices easier. Specifically, a SystemInterface could be interesting for enabling control of CANopen-based modular robot arms in ROS2.

The SystemInterface should be integrated into the URDF for example like this:

<ros2_control name=“CanopenSystemInterface" type="system">
  <hardware>
   <plugin>canopen_control/CanopenSystemInterface</plugin>
   <param name="bus_configuration">[bus.yml]</param>
   <param name="can_interface">can0</param>
   <param name="master_configuration">[master.dcf]</param>
   <param name="master_bin">[master.bin]</param>
  </hardware>
  <joint name="joint1">
   <command_interface name="position">
   </command_interface>
   <state_interface name="position"/>
  </joint>
  <joint name="joint2">
​    <command_interface name="position">
​    </command_interface>
    <state_interface name="position"/>
  </joint>
 </ros2_control>

Conventions:

tonynajjar commented 2 years ago

Hi, I'm very new to canopen so excuse my potentially wrong jargon.

I have ros2_control all set up and am now looking to create my own hardware interface. I understand a hardware interface (in ros2_control terms) to be the layer that:

1- Reads from hardware using custom communication protocol 2- applies conversions to values received by the controller (speeds, angles) to something the specific hardware can understand (e.g conversion from speeds to bytes) 3- Writes to hardware using custom communication protocol

Is this what CanopenSystemInterface's aim is?

hellantos commented 2 years ago

Yes. Basically, we aim to setup a ros2_control SystemInterface, that enables interfacing with all motion controller devices that follow CIA402 profile on your bus.

rbordalba commented 2 years ago

hi, when are you planning to add this feature to ros2_canopen? (approx)

Great work!

hellantos commented 2 years ago

We are currently working on it - no PR yet though. First alpha release for testing ros2_control system interface is planned for end of August.

jclinton830 commented 1 year ago

Hi @ipa-cmh,

Have you published any detailed documentation on how to integrate ros2_canopen and ros2_control yet? I see that in your official manual, the ROS2 Control System Interface section is currently blank. The only way to understand how all of this works currently is to go through the code within canopen_ros2_control package.