Codesys Ros2 | Complete

For years, there has been a quiet war in the automation world: The deterministic, rugged world of PLCs (IEC 61131-3) vs. the flexible, modular world of robotics (ROS 2).

If you build mobile robots, autonomous guided vehicles (AGVs), or industrial manipulators, you’ve likely faced this painful choice. Do you use a standard PLC for safety and I/O but struggle with complex navigation? Or do you use ROS 2 for perception and planning but struggle with real-time fieldbus control?

Thanks to the CODESYS ROS 2 SLAM, you no longer have to choose. codesys ros2


If you'd like, I can also provide a sequence diagram of the data flow or a pseudo‑implementation of one of the function blocks.

Integrating CODESYS with ROS 2 allows you to combine the deterministic hardware control of industrial PLCs with the advanced motion planning and perception capabilities of the Robot Operating System. 🚀 Direct Integration Methods For years, there has been a quiet war

Shared Memory Bridge (Recommended for High Speed): Use the ROBIN project (ScalABLE40/robin) for high-performance data exchange on the same hardware (e.g., Raspberry Pi, Beaglebone).

OPC UA Bridge: Set up an OPC UA Server in CODESYS and use a ROS 2 node as an OPC UA Client with libraries like asyncua (Python) or open62541 (C++). If you'd like, I can also provide a

MQTT Messaging: Use the CODESYS MQTT library to publish PLC variables to a broker and subscribe to them via a ros2_mqtt bridge for non-real-time tasks.

Micro-ROS Agent: For microcontrollers or lightweight PLCs, run a micro-ROS node directly on the target hardware to communicate with the ROS 2 Global Data Space. 🛠️ Strategic Setup: Why use both?

Recognizing the need for connectivity, CODESYS Group released the CODESYS Edge Gateway. This software component runs on the PLC (or a Linux container alongside it) and can map PLC variables to different protocols.

Developers can map IEC variables to MQTT or other standard protocols, which can then be ingested by a ROS2 node. This abstracts away the complex socket programming, allowing the PLC engineer to "tag" a variable in the development environment and have it instantly available to the network.