Ask Your Question

No data from SSH Connection

asked 2014-07-28 14:44:54 -0500

mattc12345 gravatar image

updated 2014-07-30 14:42:58 -0500

EDIT: Solved, see solution at the bottom of this comment.

I'm trying to get two computers set up to communicate between ROS. I set up SSH, and can access the terminals of each computer from the other. (One is Ubuntu 12.04 and the other is 13.04). From one computer, I try to run this tutorial:

I did the tutorial using one computer. The other master already had roscore running on it. To start the listener on this machine, I did

ssh <master>@<master's IP>
export ROS_MASTER_URI=http://<master>@<master's IP>:11311
rosrun rospy_tutorials

When I run this, the listener doesn't print anything, but looks ready to print. In a new terminal, I used the main computer as the slave to run

export ROS_MASTER_URI=http://<master>@<master's IP>:11311
rosrun ropsy_tutorials

and ran the talker, which continuously printed lines like:

[INFO] [WallTime: 1406648603.610351] hello world 1406648603.61

With everything closed, I tried to see if the slave computer could subscribe to topics on the other computer, with ROS and some nodes already running from earlier. I did

rostopic list

in a new terminal and it said

ERROR: Unable to communicate with master!

I did

export ROS_MASTER_URI=http://<master>@<master's IP>:11311

and then tried to list the topics, and they all listed. When I did

rostopic echo /joint_states

nothing printed. It looked like it was ready to print, but nothing did. I tried

ssh <master>@<master's IP>
rostopic echo /joint_states

and the info printed out no problem.

Does anyone know what the issue is? I never got any error codes. When I tried the tutorial again, using

export ROS_MASTER_URI=http://<master's hostname>:11311

instead, I got this error:

Unable to register with master node [http://<master's hostname>:11311]: master may not be running yet. Will keep trying.



First terminal:

ssh <master>@<master's IP>
export ROS_IP=<master's IP>

Second terminal:

ssh <master>@<master's IP>
export ROS_IP=<master's IP>
export ROS_MASTER_URI=http://<master's IP>:11311
rosrun rospy_tutorials

Third Terminal:

export ROS_MASTER_URI=http://<master's IP>:11311
export ROS_IP=<slave's IP>
rosrun rospy_tutorials
edit retag flag offensive close merge delete


Please copy and paste your actual console output into your question so we can see the output as well and try to reproduce. You are probably entering the wrong MASTER_URI but we cannot help you without the actual inputs and outputs.

tfoote gravatar image tfoote  ( 2014-07-28 18:19:55 -0500 )edit

I don't think there is any output from the console. The talker runs fine and prints what it did from the original example, but there is no output at all from the listener. What console output would you expect?

mattc12345 gravatar image mattc12345  ( 2014-07-28 21:43:24 -0500 )edit

We need to see what you typed on the command line and what the errors or non errors were, including the actual IPs and hostnames. With your sanitization of the outputs the critical information has been removed. With a multiple machine setup the correct usage of the two different IPs and hostnames is important.

tfoote gravatar image tfoote  ( 2014-07-28 22:27:19 -0500 )edit

Okay, I edited the main post with all the info. I don't have enough Karma to include links, so I had to add a space after http:// to be able to post.

mattc12345 gravatar image mattc12345  ( 2014-07-29 10:52:24 -0500 )edit

Shouldn't it be export `ROS_MASTER_URI=`. Without the quan then ? My guess is that it doesn't know baxterbox as a name

Maya gravatar image Maya  ( 2014-07-29 11:34:10 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-07-29 12:29:49 -0500

ahendrix gravatar image

Your slave machine probably cannot resolve the hostname of the primary machine.

From the slave machine, you should be able to do rosnode list and then use rosnode ping <node> to ping one of the remote nodes. If rosnode ping fails, try running rosnode info <node> on the node in question to get its hostname, and try to ping that hostname directly.

If it doesn't resolve or can't ping, you need to set ROS_IP on the master before running nodes there.

For more information on why this happens and how it works, watch my roscon talk from last year:

edit flag offensive delete link more


It seems strange that if I run the listener through ssh on the master, after I set the master URI I can see the listener on the slave rosnode list. But when I try to ping the node, I get this error: ERROR: Unknown host [baxterbox] for node [/listener_6260_1406746344405]

mattc12345 gravatar image mattc12345  ( 2014-07-30 14:00:06 -0500 )edit

I just tried switching master and slave, and the old process worked. When I try only exporting ROS_MASTER_URI on the slave computer, I get this error in roscore on the ssh of the master: Couldn't find an AF_INET address for [robotics] robotics is the hostname of the slave.

mattc12345 gravatar image mattc12345  ( 2014-07-30 14:08:49 -0500 )edit looks like it is a ROS_IP problem then. EDIT: Solved, solution at bottom of answer above. Thanks, ahendrix.

mattc12345 gravatar image mattc12345  ( 2014-07-30 14:13:25 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-07-28 14:44:54 -0500

Seen: 2,490 times

Last updated: Jul 30 '14