Ask Your Question
2

[ROS2] Intra-process communication and QoS

asked 2020-10-23 03:35:42 -0600

Myzhar gravatar image

updated 2020-10-23 03:36:37 -0600

Hi, using Eloquent I wanted to test intra-process communication with manual composition but I bumped into a wall really difficult to overcome.

Intra-process communication requires that ALL publishers and subscribers use "volatile" as "reliability" configuration for QoS, I guess this is coherent.

My problem is that my node has a static TF publisher member that instantiates its internal publisher with "transient_local" setting, also this is coherent.

Is there a smart way to overcome this conflict?

Thank you, Walter

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-10-26 09:39:05 -0600

EduardoPonz gravatar image

updated 2020-10-26 10:53:49 -0600

Hi!

Starting in Eloquent, the ROS 2 default middle-ware (Fast DDS) supports intra-process delivery. If you run publishers and subscribers in the same process, the communication occurs through Fast DDS' intra-process mechanism. Using that feature, you can use any DDS QoS configuration of your choice, such ad VOLATILE durability or RELIABLE reliability. By default, this feature is disabled in ROS 2 Eloquent (in ROS 2 Foxy is enabled by default). You can activate it using a XML profiles file as described here.

Mind that this intra-process mechanism is not the same as the ROS 2 "built-in" intra-process mechanism, but will most likely get you were you want to go.

Furthermore, if you're interested in overcoming network traffic between separate processes running in the same machine, starting ROS 2 Foxy, you could checkout Fast DDS Shared Memory Transport (SHM).

I hope that helps!

edit flag offensive delete link more

Comments

Hi, I'm using FastDDS, so you are saying that in this case, even if I force ROS2 intra-process communication to false to be able to start the nodes, under the hood it is used, and latency and overhead are reduced?

Myzhar gravatar image Myzhar  ( 2020-10-26 10:32:00 -0600 )edit

I'm sorry, my answer was not 100% complete, I've update it. If you configure Fast DDS to use intra-process communication, then it will use it when possible, effectively improving latency performance. In ROS 2 Eloquent, this feature can be activated using and XML profiles file as explained here. This step is not necessary from ROS 2 Foxy on, since intra-process delivery is enabled by default.

Please, do let me know if you need some assistance configuring the feature.

EduardoPonz gravatar image EduardoPonz  ( 2020-10-26 10:58:31 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-10-23 03:35:42 -0600

Seen: 81 times

Last updated: Oct 26