ROS2 Humble (C++) Communication with Siemens PLC — Modbus TCP vs OPC UA?

Hello ROS Community,

We are currently working on a project involving ROS2 Humble (C++) and need to establish communication with a Siemens PLC. We are evaluating two commonly used industrial communication protocols:

  • Modbus TCP
  • OPC UA

Our goal is to build a robust and future-ready integration between the ROS2 environment and industrial PLCs, especially in the context of scalable systems and Industry 4.0 readiness.

Which protocol do you recommend for integrating ROS2 Humble (C++) with Siemens PLCs?
Has anyone here implemented either protocol in real-world industrial setups?
Are there any reliable and maintained C++ libraries or ROS2 packages (client/server) that you’d recommend for either Modbus TCP or OPC UA?

1 Like

We use Profinet for interfacing with Siemens PLCs.
As stack we use GitHub - rtlabs-com/p-net: PROFINET device stack for embedded devices
Note that you need to obtain a license for commercial use.

What are your requirements and criteria for the integration ? Real-time capable, easy to use as a PLC programmer ?

2 Likes

It is worth mentioning that during ROSCon 2024, Siemens presented their developments toward the integration of ROS 2 and SIMATIC. I only got one photo of their stand:

The only resource I can find online is their blog post about it; however, it doesn’t contain any significant details.

1 Like

Hi @Apurva_Nikhare
Welcome to discourse! And thank you all for your interest in this topic.

I like to take the opportunity to showcase you what we have crafted at the Siemens HQ in Germany. This technology will be hopefully made available to the broad public in the following weeks after easter. (End of April - May 2025).

For the time being, we choose a different communication protocol: the SIEMENS RIB = Realtime Information Backbone; meaning shared-memory. This means: up to 1 kHz speed and a proper amount of bandwidth. Configuring of this interface is 100% done by our generator where you get a complete tailor-made C++ node and corresponding PLC blocks as output.

To learn more about our approach, I encourage you to watch one of our 2 ROSCon talks.

First the more recent talk from me regarding some rough strategy for our Siemens contributions regarding ROS and a user story about why one might want to connect to a Siemens PLC from ROS:

And second, our combined talk with our pilot customer BMW on the global ROSCon stage in Odense (which seems to be the banner slide of the ROSCon24 Global Vimeo :grinning_face: ):


Quote from BMW slide about their situation before (as seen in screenshot)

“…it is quite complicated to configure the PLC and IPC side”

With our approach, it is quite a bit more smooth sailing :slightly_smiling_face:

Thank you @macale for putting a picture of our booth stand from ROSCon Odense there!

If you are interested in how to get this today, please contact me on LinkedIn as long as the official process is currently put in place.

Also, feel free to leave any comments or questions about this. We really had a blast at the BoF session in Odense to connect with all of you!

Cheers from Germany :clinking_beer_mugs:
Florian

2 Likes

Hi ROS Community,

Thank you so much for the detailed response and for sharing the insights from ROSCon — I really appreciate the direction and clarity!

The Siemens RIB (Realtime Information Backbone) approach sounds very promising, especially with its high-speed, shared-memory communication and automatic code generation. That level of performance and integration would definitely simplify the complexity of bridging PLCs with ROS2 in industrial environments.

I’m particularly interested in learning more about how we could try out or evaluate this integration. Since our use case is very much aligned with scalable Industry 4.0 systems, this solution seems like a great fit.

I’ll connect with you on LinkedIn as suggested to follow up directly and learn about any potential early access or technical documentation. Also looking forward to the official release of this technology post-Easter.

2 Likes