Search code examples
ipcroboticsros2

What is the difference between ROS2 and IPC(Inter Process Communication)?


I am a student studying robotics.

As for as I know, the ROS2 provides the process communication through publisher and subscriber.

On the other hand, the IPC through shared memory also provides the process communication and allows us to use the shared memory.

For me, They look alike and I don't see the difference.

What is the difference between them?

Does there exist the performance difference?


Solution

  • ROS2 uses a new communications infrastructure based on Data Distribution Service (DDS), which improves performance, scalability, and security over the ROS1 infrastructure based on the TCP/UDP Protocol. enter image description here

    By default the Pub/Sub uses the DDS layer for Communication. Other experimental work uses IPC shared memory.

    https://discourse.ros.org/t/using-zero-copy-transport-in-ros2-with-ros2-shm-msgs/26226