ros2_canopen: Natively Integrating CANopen Devices into the ROS 2 Ecosystem
/CANopen has long been one of the most widely used communication standards in industrial automation. Built on top of the CAN bus and standardised by CAN in Automation (CiA), it connects motor drives, I/O modules, sensors and other field devices across machines, robots and vehicles. The ros2_canopen stack, maintained under the ROS-Industrial umbrella, brings this ecosystem natively into ROS 2. It lets developers describe a CAN bus, bring up a CANopen master, and talk to every device on the bus through standard ROS 2 nodes, services, topics and ros2_control interfaces.
Built on the lely-core from Lely Industries N.V.
Rather than reimplementing the CANopen protocol, ros2_canopen builds on lely-core, the professional, open-source CANopen library from Lely Industries N.V. lely-core handles the demanding low-level work: the CANopen event loop, NMT state management, SDO and PDO communication, and a configuration toolchain that turns a human-readable bus description into the device configuration files (DCF) the master needs at runtime.
Basic capability
At the heart of the stack is a device container that reads a single YAML bus description. In that file you declare each node on the bus (its node ID, its EDS file, and the driver to load for it) together with any parameters that override the device defaults. From that one description, the container launches the CANopen master and the per-device drivers.
To accommodate a wide range of industrial use cases, ros2_canopen offers three flexible operation modes depending on your application's requirements:
- Standard ROS2 Nodes: Best for simple setups. Each CANopen device is run as a standard ROS2 node, communicating through basic topics and services.
- Managed Lifecycle Nodes: Adds system reliability and recovery. Devices are wrapped as lifecycle nodes, allowing a manager to bring the entire CAN bus online or offline in a precise, safe sequence.
ros2_controlIntegration: Built for high-performance and low-latency control. This mode exposes CANopen devices directly as hardware interfaces for the broader ROS 2 control framework.
To interface with your hardware, the stack provides two primary drivers out of the box:
- The Proxy Driver: A generic bridge that forwards raw CANopen messages (such as SDOs and PDOs) to and from ROS 2. It is perfect for custom sensors, debugging, or devices without a standardized profile.
- The CiA 402 Driver: A specialized motion-control driver that implements the industry-standard profile for motor drives and servo controllers, allowing you to command positions, velocities, and torques natively.
New feature: Multi-drive systems
Multi-drive coordination has become a particular focus of the project's recent development. The stack has always been able to run several drives on a single bus, each as its own CANopen node sharing one master, with the CiA 402 driver providing the full motion-control profile: control and status words, profiled and cyclic position, velocity and torque modes, and interpolated position mode. Every node is configured independently in the bus description, with its own PDO mappings and unit-scaling factors.
The most recent releases added CiA 402 multi-channel support, which lets a single CANopen node expose more than one drive axis. Many modern servo controllers pack two or more axes behind a single node, and the driver now maps each axis to its own channel, with its own state machine and operation mode, so each can be commanded individually. Together with the existing multi-node setup, the stack now covers both ways of building a multi-drive system.
Behind the scenes, the CANopen master automatically coordinates all communication. It manages the flow of commands so you can control multiple motor axes simultaneously without worrying about network conflicts. It also keeps the motors perfectly synchronized, which is essential when multiple joints must move in harmony.
On the ROS 2 side, the stack groups these individual drives together and presents them to the system as a single, unified robot. Each motor axis is mapped directly to a standard robot joint. As a result, you can control your entire multi-axis machine using familiar ROS 2 controllers and visualize its movement in RViz just like any other robot.
Acknowledgments
the ros2_canopen stack provides a robust, modern, and highly flexible framework for integrating industrial CANopen devices into the ROS2 ecosystem. By leveraging a reliable open-source CANopen engine and integrating tightly with ros2_control, it lowers the barrier to building and controlling complex multi-drive robot systems.
This progress is a true community effort. A huge thank you goes to all the contributing developers and partner organizations whose dedication has shaped the core architecture, hardware interface capabilities, and testing infrastructure. We are particularly grateful for the community-contributed CiA 402 multi-channel support, which has made orchestrating multi-axis drives easier than ever.
To explore the codebase, report issues, or contribute to the project, check out the official https://github.com/ros-industrial/ros2_canopen