Robotics StackExchange | Archived questions

How to communicate ros2 nodes running on different machines and different network?

Running Ubuntu 20.04 on both the machines and connected different network.

Looked into Fast RTPS eprosima documentation, but I'm not a network engineer, so that I'm not able to understand on how to setup the communication between the ROS-2 nodes.

Any help would be great here !

Asked by pmuthu2s on 2021-05-11 10:46:40 UTC

Comments

Answers

You have multiple possibilities, the easiest being a vpn.
This one is easy to set up: https://vpncloud.ddswd.de/

You can follow this tutorial, but keep in mind that it uses an old version of vpncloud: https://matteocontrini.medium.com/how-to-setup-a-peer-to-peer-fully-meshed-vpn-between-servers-249a9071e714

Be sure to use tap mode, since ros2 discovery works with udp broadcast. Once you can ping the machines, you should be able to find each others nodes and topics.

Another way is to use a fastdds discovery server, according to the following tutorial: https://docs.ros.org/en/foxy/Tutorials/Discovery-Server/Discovery-Server.html

Be aware that using command line tools like ros2 topic list does not yet work out of the box, see https://answers.ros.org/question/373070/ros2-topic-empty-with-fastdds-discovery-server/

Asked by highmax1234 on 2021-05-11 15:39:46 UTC

Comments