Codesys Ros2 File

: Simple to implement using standard CODESYS libraries; works on almost any modern PLC.

The marriage of CODESYS and ROS 2 isn't just a trend—it’s the future of Software-Defined Automation

As of 2025 (and looking beyond), several trends are accelerating this integration: codesys ros2

As hardware becomes more powerful, the lines between PLC and PC are blurring. Edge controllers can now run an industrial Linux kernel capable of hosting a deterministic CODESYS runtime in one container and a ROS2 environment in another—all on the same physical chip.

We evaluated the system on a dual-core x86_64 Linux with PREEMPT_RT (5.15 kernel), CODESYS Control RTE V3.5 SP19, and ROS2 Humble. : Simple to implement using standard CODESYS libraries;

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?

In this scenario, CODESYS acts as a WebSocket client. It connects to the ROS bridge server, then can publish and subscribe to ROS topics by sending appropriately formatted JSON frames. For example, to publish velocity commands on the /cmd_vel topic, CODESYS sends a message like: We evaluated the system on a dual-core x86_64

For low-latency data exchange on a single hardware unit (like a Raspberry Pi running both CODESYS and ROS 2), developers often use shared memory interfaces or MQTT brokers to pass variables between the PLC runtime and ROS nodes.

import rclpy from geometry_msgs.msg import Twist from rclpy.node import Node

If your CODESYS runtime and ROS 2 are running on the same Industrial PC (IPC) under a Real-Time Linux kernel (like Preempt-RT).

Today, bridging these two worlds is no longer a luxury—it is a necessity. The most powerful manifestation of this integration is connecting , the leading IEC 61131-3 development environment for PLCs, with the Robot Operating System 2 (ROS2) , the gold standard for advanced robotics software. Why Connect CODESYS and ROS2?