[ROS2] Set 2 different ROS_DOMAIN_IDs for one node
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?
Did you find a solution to this problem? I am really interested.
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.
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.