Can someone show me an example of remote node discovery using ros2 command?

Hi, I have just installed ROS2 on two different hosts (different sub-network, different version operating system, etc), and on one of them I have:

ROS_VERSION=2
ROS_DISTRO=ardent
ROS_DOMAIN_ID=12345

on the other of them I have:

ROS_VERSION=2
ROS_DISTRO=bouncy
ROS_DOMAIN_ID=12345

I can reach the second host from the first host via ssh.

Then I run

ros2 run demo_nodes_cpp talker

on one of them, I can see “ros2 topic list” and “ros2 node list” find out about the talker on that same host, but if I run these commands on the other host then they show nothing.

I am certain that the FastRTPS RMW implementation has been built in both installations.

Can someone show me an example command for discovery of remote ros2 node and topic that I can try on these two hosts? Thanks!

1 Like

First, I would recommend using the same ROS 2 version of both sides (I see you’re using Ardent and Bouncy, which is just master right now).

Second, makes sure multicast UDP is working between machines. You can use netcat to check, see:

If that works and discovery still isn’t happening, then consider filing an issue because that might be a bug.

In addition to what @wjwwood suggested, I would suggest trying a much lower value of ROS_DOMAIN_ID, say something less than 100.

At least with RTI’s version of DDS you cannot go that high with domain IDs. Their maximum recommended Domain ID is 232.
Max RTI DDS Domain ID

Thanks! I see that UDP is not working between them, I will try to get that set up. Thanks very much again!

Now, the ROS2 version of both sides are same and ROS_DOMAIN_ID=10. The iperf show the multicast UDP is working. But when I run talker on one host, the listener on the other host can not get any message. The inner network address is 192.168.0.103 and 192.168.0.104.
Can someone show me an example command for discovery of remote ros2 node and topic that I can try on these two hosts? Thanks!