ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Do computers need to be on the same internet connection as master?

asked 2019-03-06 09:10:21 -0500

cameron_r gravatar image

ROS Kinetic, Ubuntu 16.04 I'm trying to establish a connection across two computers.

I have edited the .bashrc files on both with the appropriate ROS_IP, ROS_HOSTNAME, and ROS_MASTER_URI fields (running localhost:11311 on my machine, with my IP address subbed into the second machine) and the echo command returns the expected result, however connection is not successful. I run roscore on my machine, then publish a simple message (which I have confirmed by echoing that topic on my own computer).

The second machine returns: ERROR: Unable to communicate with master!

I am not experienced with computer networks, so troubleshooting this has been difficult. My assumption is that both computers need to be on the same internet connection (they are not even in the same building). I was hoping someone could clarify for me.

Thanks for your time

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-03-06 09:38:12 -0500

bpinaya gravatar image

Check the tutorial for multiple machines:

But to answer your question yes, both machines must be on the same network or reachable via the internet (vpn counts too). To check that the IP you are using is ok, try ssh-ing to the MASTER machine from your node machine, and vice-versa, if both ssh-ing attempts work then ROS should also work.

You can also ping that IP and check if it's on the network. I'm guessing you are just having an issue of IPs.

Best of luck!

edit flag offensive delete link more



if both ssh-ing attempts work then ROS should also work.

that is a good test, but if this is a (consumer) NAT<->NAT setup, then SSH could fail while -- with suitable port forwarding configured -- other connections might succeed.

gvdhoorn gravatar image gvdhoorn  ( 2019-03-06 10:06:44 -0500 )edit

True!! Also sometimes the port 11311 could be blocked (had this happen to me on a university network) and while ssh can succeed no ros connection would be established .

bpinaya gravatar image bpinaya  ( 2019-03-07 08:08:28 -0500 )edit

Question Tools

1 follower


Asked: 2019-03-06 09:10:21 -0500

Seen: 381 times

Last updated: Mar 06 '19