ROS on two machines fails across internet

asked 2021-07-09 14:16:03 -0500

zlg9 gravatar image

updated 2021-07-09 15:13:51 -0500

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:

  • Issuing rostopic echo /my_topic, only CLIENT can see the message published by MASTER. Although MASTER can find the topic name published by CLIENT, it cannot echo the content (nothing gets printed).
  • Moreover, CLIENT nodes which are developed to have nodelets and subscribe to MASTER topics, fail soon after launch with bond broken error. I did use chrony and synched CLIENT clock with MASTER. It sounds synched with an offset of 0.006 sec and 0.1 sec delay!

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?

edit retag flag offensive close merge delete

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 ...(more)

Morgan gravatar image Morgan  ( 2021-07-10 11:43:11 -0500 )edit

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.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-07-11 08:27:23 -0500 )edit