Is there an example command for remote discovery?

asked 2018-05-05 06:11:51 -0500

djyifly gravatar image

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

ROS_VERSION=2 ROS_DISTRO=ardent ROS_DOMAIN_ID=10

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't listen anything on the other computer. Only run talker and listener on the same host, the message can be receive. I test the multicast by iperf, the multicast is working.

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

edit retag flag offensive close merge delete

Comments

1

Running the talker on one machine and the listener on another machine should work if both use the same domain id and both machines can exchange multicast packets.

Dirk Thomas gravatar image Dirk Thomas  ( 2018-05-07 11:48:26 -0500 )edit

Thanks, the problem has been resolved. The reason may be I run talker and listener on virtual machines. Running them on the physical machine, they can exchange packets. Thanks again.

djyifly gravatar image djyifly  ( 2018-05-09 09:42:52 -0500 )edit