On your development computer running Ubuntu and ROS2 (e.g., Jazzy Jalisco or Humble), create a new workspace and package:
subgraph main_pc [<b>Main Processing Unit (Linux/ROS 2 PC)</b>] ros2[<b>ROS 2 Stack</b><br/>▪ Navigation2 / MoveIt 2<br/>▪ SLAM & Perception<br/>▪ High-level Decision Making] bridge[<b>ROBIN ROS 2 Wrapper Node</b><br/>▪ Communicates via shared memory<br/>▪ Translates CODESYS <-> ROS 2 msgs] end
🏆
Define the ROS2 topics that will receive data from the PLC (e.g., sensor data) and send commands to the PLC (e.g., motion targets). Step 3: Mapping and Data Exchange
Use CODESYS for safety-critical logic, I/O handling, and motion control, while using ROS2 for complex decision-making, mapping, navigation (SLAM), and computer vision. codesys ros2
Mira watched the new morning shift from the mezzanine as a fleet of robots danced between stations. She remembered the first night when the two systems had merely eyed each other across an electrical divide. Now they conversed in a hybrid tongue—deterministic reliability fused with adaptive intelligence. It wasn’t perfect; there were still edge cases and a continuous need for careful mapping between worlds. But the plant had gained something more than productivity: an architecture that respected the strengths of both CODESYS and ROS 2, married by disciplined interface contracts and sober safety thinking.
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++). On your development computer running Ubuntu and ROS2 (e
: High-speed communication is often achieved via shared memory. A ROS 2 node reads and writes data to a specific memory location that the CODESYS runtime can also access, enabling extremely low-latency data exchange. ROBIN Project
Handles the wheel encoders, motor drives, safety scanners, and battery management. She remembered the first night when the two
: The ROS2 node translates ROS2 messages ( sensor_msgs , nav_msgs ) into OPC UA variables, which the CODESYS PLC reads during its cyclic execution. 3. Shared Memory (For Single-IPC Deployments)