[ROS2] Set 2 different ROS_DOMAIN_IDs for one node

asked 2020-09-29 11:31:31 -0500

gdmd gravatar image

I am familiar with ROS and new to ROS2. I have several nodes (named A, B, C) running two machines at the same time. In order to avoid interferences between PCs, we seta ROS_DOMAIN_ID for each one. This works fine, without any interference among nodes from one machine on the other ones.

Now, I need to add a supervisor node on each machine that read some status flags on basic nodes (A, B, C) via ROS2 and send them to another machine, also via ROS2. However, I am unable to make this work since I cannot make the supervisor node to receive messages from two different domains at the same time. I have made this on the past using other multicast tool such as LCM (Lightweight Communication and Marshaling) but I cannot find the way of do it on ROS2.

Any suggestion?

edit retag flag offensive close merge delete

Comments

Did you find a solution to this problem? I am really interested.

fabbro gravatar image fabbro  ( 2023-04-19 04:36:33 -0500 )edit

No. I tried some approaches but in the end the DDS protocol does not allow you to work in that way. I finally used a TCP socket to connect the machines. Another option is to use LCM for the connection but as I was using WiFi connection, multicast was not an option.

gdmd gravatar image gdmd  ( 2023-04-19 05:06:35 -0500 )edit

It won't do a single node AFAIK, but ros2/domain_bridge does exist.

See the design document for information on how it's supposed to work.

gvdhoorn gravatar image gvdhoorn  ( 2023-04-19 08:33:30 -0500 )edit