Robotics StackExchange | Archived questions

ROS on two machines fails across internet

System setting: Ubuntu 16.04 (ROS Kinetic) is set to be MASTER and a remote ubuntu 18.04 (ROS Melodic) is configured as CLIENT. A VPN server exists on the same network as where MASTER locates. So CLIENT successfully acquires a local IP within the same subnet using VPN. Now, CLIENT is attached to the MASTER's network.

MASTER launches a ROS node. CLIENT does the same. I need both machines subscribe to the topics published by each other. Issuing rostopic list command on both machines, I can see all topics from either side. So far so good!

Something is wrong:

I further tried ICMP. CLIENT successfully pings MASTER, however, MASTER fails to ping or ssh into CLIENT. Again, both are in the same subnet, one physically and one through VPN. Same implementation tested successfully without VPN (when both machines physically are on the same LAN).

What makes this implementation to fail? Is there anything I can do to fix it? Do I have alternatives to get both machines across internet find access to all services which ROS requires?

Asked by zlg9 on 2021-07-09 14:16:03 UTC

Comments

VPN is a good approach to making ROS 1 work across the Internet. It can just be a bit tricky to get all the bidirectional comms working via VPN (even before ROS gets involved).

It sounds like the MASTER machine cannot connect to the CLIENT machine. In ROS 1, subscribers connect to publishers. I'd guess that the CLIENT machine is not telling the MASTER machine the IP address it needs to use to access it through the VPN interface. I'd suggest looking into setting ROS_IP on the CLIENT machine to be the IP address that the MASTER would need to use to contact it (like when using ping, etc.).

But if ICMP (ping) isn't working MASTER->CLIENT, then I would not expect ROS to work either. I suspect it's a VPN configuration issue, and would suggest not trying anything in ROS (because it's just adding complexity) until you can ping MASTER->CLIENT. The configuration fix will be specific to your VPN setup.

Asked by Morgan on 2021-07-10 11:43:11 UTC

I agree with @Morgan: first you have to get full network connectivity. For ROS1, no port numbers > 1024 can be blocked.

After that is working, you are going to discover that it's very difficult to use different versions of ros on different hosts. A few trivial things will work, but anything interesting will not work. Just one of the issues is that a large number of messages are incompatible between two different versions of ros.

Asked by Mike Scheutzow on 2021-07-11 08:27:23 UTC

Answers