I am using ROS2 real-time (still a lot to learn) to implement the various control element of my robot : SLAM, path planning, controller, etc...

For the first step of prototyping we would like to build a system with only the actuators : A PC will run ROS2 with the controller, an external power supply for the power. Our idea is to have the computer (through ROS2) send the torque control command and receive the sensor info from our actuators.

Our actuators have built in drivers with a CAN Bus interface : What are our options to connect the computer running ROS2 to the drivers of the actuators ?

Since our controller must run real-time, I imagine the bandwidth of the Computer/Actuator interface is a critical factor.


First, you should define what real-time requirements do you have, not necessarily from a CAN-Bus, but from the application perspective. What is your cycle time, what latency can you accept, what jitter is acceptable by your application.

If your requirements can be fulfilled by a PC with a CAN-Open extension, then you can use a ROS CanOpen package (like this) to act as a CAN-Open master and "bridge" the information on ROS and the CAM-Open network. If not, and you need faster cycle time in your control system, then what ROS on a PC with CAN extension can provide, then you can look at running parts of ROS system on a single board computer or to using a different solution (e.g. decoupling your controller loop from ROS).

I am not sure what current CAN-Open extensions are supported, but USB extensions compatible with the PCAN inerface (e.g. PEAK CAN USB converters) are definitely supported. USB obviously will add more latency then a PCI CAN card would.

If you are planning to send torque command form ROS, it is probably not the right approach. ROS should at best be included in the position loop, not in the torque loop.


  • $\begingroup$ Our plan is indeed to move the Position to Torque loop (inverse dynamic) to a dedicated board. Are CAN converter (PCI or USB) usually as expensive as the example you gave ? $\endgroup$ – Dawi Nov 18 '20 at 15:28
  • $\begingroup$ Depending on what you mean by expensive...you can get good ones under 200 USD. Good is relative in this case, no USB converter will complte with a PCI-Express card (slightly more expensive), and no PCI-Express one will complete with an "in-chip" (e.g. a DSP for motor control with build-in CAN) variant. Please cross check compatibly to ROS. $\endgroup$ – 50k4 Nov 18 '20 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.