No data from SSH Connection
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:
wiki.ros.org/ROS/Tutorials/MultipleMachines
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 listener.py
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 talker.py
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.
Thanks!
SOLUTION:
First terminal:
ssh <master>@<master's IP>
export ROS_IP=<master's IP>
roscore
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 listener.py
Third Terminal:
export ROS_MASTER_URI=http://<master's IP>:11311
export ROS_IP=<slave's IP>
rosrun rospy_tutorials talker.py
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.
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?
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.
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.
Shouldn't it be export `ROS_MASTER_URI=http://10.243.44.19:11311`. Without the quan then ? My guess is that it doesn't know baxterbox as a name