+-----------------------------------------------------------+ | ROS 2 NETWORK | | [Nav2 / MoveIt] <---> [ROS 2 Node] <---> [DDS / UDP] | +-----------------------------------------------------------+ | (Communication Bridge) | +-----------------------------------------------------------+ | CODESYS RUNTIME | | [Fieldbus Master] <---> [IEC 61131-3 Logic] <---> [IO] | +-----------------------------------------------------------+ 1. Shared Memory (Ultra-High Speed, Co-located)
The integration of CODESYS and ROS 2 represents a major step forward for industrial automation. It eliminates the traditional boundary between rigid industrial control and flexible robotic intelligence. By assigning high-level perception and planning to ROS 2, and deterministic execution and safety to CODESYS, engineers can build smarter, safer, and highly adaptable automated systems ready for the demands of tomorrow.
In the world of automation, we often see a "Great Divide." On one side, you have the Industrial PLC
No standard solution exists for bidirectional, low-latency communication between a CODESYS PLC and a ROS2 system.
ROS2 MoveIt provides path planning, and the command is sent over the bridge to CODESYS for real-time EtherCAT execution. 5. Summary and Future Outlook codesys ros2
Install the robin package on your Linux machine (Ubuntu/ROS 2).
return 0;
In your ROS 2 workspace, create a new package (e.g., codesys_ros2_bridge ). Below is a conceptual example of a ROS 2 Python node acting as an OPC UA client to bridge data:
Create global variables (GVLs) that map to the shared memory structure, such as joint_states , joint_commands , or robot_mode . By assigning high-level perception and planning to ROS
The CODESYS‑ROS2 integration opens the door to many practical applications:
user wants a long article about "CODESYS ROS2". This is a technical topic likely covering integration between CODESYS (a PLC development environment) and ROS 2 (Robot Operating System). I need to produce a comprehensive article. To do this, I need to gather information. I'll search for general information, tutorials, technical details, GitHub repositories, and vendor solutions. search results include some forum discussions, a Reddit post, a GitHub bridge, and a Chinese article. I need to open some of these to get more details. search results provide some information, but I need more. I will search for more specific terms like "CODESYS ROS2 shared memory", "CODESYS ROS2 DDS", "CODESYS ROS2 industrial", "CODESYS ROS2 real-time", "CODESYS ROS2 modbus", and "CODESYS ROS2 tutorial pdf". search results are quite fragmented. I will also search for "CODESYS ROS2 bridge github" and "CODESYS ROS2 tutorial". need to open the Chinese article (how to integrate CodeSys and ROS) for more details. I also need to open the ROBIN bridge GitHub repository. links might be invalid. I'll open the Chinese article from the search results. The search result for the Chinese article is at index 7. I'll open that. Chinese article continues. I'll open more lines. Chinese article provides a basic overview. Now, I need to find more technical details. I'll search for "CODESYS ROS2 real-time bridge". will also search for "CODESYS ROS2 shared memory bridge". will also search for "CODESYS ROS2 industrial robotics". will also search for "CODESYS ROS2 controller". have gathered some information. Now I will also search for "CODESYS ROS2 EtherCAT". will also search for "CODESYS ROS2 OPC UA". I have a good amount of information. I will structure the article with the following sections: Introduction, Why Integrate CODESYS with ROS2, Technical Approaches (OPC UA, Shared Memory Bridge, ROS Bridge, WebSocket, CANopen), The ROBIN Project, Real-time Communication, Use Cases and Applications, Getting Started, Challenges and Best Practices, Future Outlook, and Conclusion. I'll cite the sources appropriately. CODESYS and ROS2 Integration: Bridging Industrial Automation with Advanced Robotics
The combination of CODESYS and ROS2 is expanding across several key industrial sectors:
Eliminates the middleman translator; ROS2 treats the CODESYS PLC as just another native node. real-time control of factory machines. Meanwhile
Rather than writing custom ROS 2 drivers for every fieldbus protocol—CANopen, EtherCAT, Modbus, Ethernet/IP, and others—developers can let CODESYS handle the hardware layer and expose a clean, high‑level interface to ROS 2. This separation of concerns reduces complexity, speeds up development, and improves reliability. In a typical scenario, CODESYS manages all low‑level I/O and fieldbus communication, while ROS 2 focuses on higher‑level motion planning, perception, and overall system coordination.
Here's an example code snippet in C++ that demonstrates how to integrate a CoDeSys controller with ROS 2:
The convergence of Industrial Automation (Operational Technology, or OT) and advanced robotics (Information Technology, or IT) is redefining the manufacturing landscape. At the heart of this revolution is the integration of , the leading IEC 61131-3 development environment for programmable logic controllers (PLCs), with ROS2 (Robot Operating System 2) , the de facto standard framework for open-source robotics research and advanced autonomous systems.
: ROS 2 provides ready-to-use libraries for SLAM, navigation, and computer vision that are not natively available in traditional PLC environments. Developer Accessibility
The lines between traditional industrial automation (Operational Technology) and advanced robotics (Information Technology) are blurring. For decades, Programmable Logic Controllers (PLCs) running CODESYS have mastered deterministic, real-time control of factory machines. Meanwhile, the Robot Operating System 2 (ROS2) has become the standard for intelligent, high-level robotic tasks, navigation, and perception.