I would like to establish a communication between my PLC (RevPi) which runs Codesys and a Jetson Nano (or Rasperry Pi) which will be running ROS2. The latter will be connected to a Router (for uploading data to a server), as can be seen on the image below.

My question is therefore: Is it possible to use OPC UA in ROS 2 to transfer the data to my PLC?

Thank you for your answers! Hardware Setup

Edit: I am aware of this package and this solution, but it doesn't seem to be compatible with ROS 2.

  • $\begingroup$ I have the same question regarding a project I am working on. Have you found anything in the meantime concerning the communication via OPC UA with ROS2? $\endgroup$
    – ptrs_a
    Mar 14, 2022 at 10:33
  • $\begingroup$ I am working on it. Please send me a message and we can discuss in detail. $\endgroup$
    – Dr. No
    Mar 15, 2022 at 11:18
  • $\begingroup$ You can run one script that can gather or send the data from/to the PLC and then connect to the ROS node on rapsberry pi ? Note that you can run this script on Raspbery PI itself. If you are using Python , it has a cool opc-ua module . $\endgroup$
    – McLovin
    Sep 9, 2022 at 17:21

1 Answer 1


So to your direct question there is work to provide OPC-UA as a ROS 2 transport "inside" of ROS 2. See these slides form the 2016 ROS I conference

However, I think that the more practical approach will be not to try to run ROS 2 on your PLC, but to bridge it out with a standard OPC-UA client on the Jetson, and then republish it on the ROS 2 communications channel. This will keep things separate and not require you to try to merge two different communication protocols.

Alternatively you could also consider running a ROS 2 node on your PLC and then publishing it via ROS 2 messages to the Jetson as well. Which will require compiling onto the PLC but then just be one more network connection in ROS 2.

  • $\begingroup$ > Alternatively you could also consider running a ROS 2 node on your PLC. How on Earth can you do that? $\endgroup$ Jan 16, 2023 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.