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

Cannot get listener and talker working on two machines

asked 2013-06-08 17:19:35 -0500

Bholms gravatar image

updated 2014-01-28 17:16:49 -0500

ngrennan gravatar image

So I have two machines #1 and #2. I selected #1 as the master by

$ ssh #1
$ roscore

Now I opened a new terminal on #1 and then

$ export ROS_MASTER_URI=http://#1:11311
$ rosrun test1 listener

(Now the terminal is halting, waiting for messages to be posted on the topic)

Now I go on machine #2 and

$ ssh #2
$ export ROS_MASTER_URI=http://#1:11311
$ rosrun test2 talker

(The "Helloworld x" pops up continuously with incrementing x)

When I look at #1, the listener is still halting, I should expect "heard x" with incrementing x. If I try the two nodes on each machine, they work perfectly fine. It is just when I now use two machines.

Btw, they are in the same wireless network and I already check the network setup as in the ROS tutorial.

Could anyone solve my problem? Thanks.

edit retag flag offensive close merge delete


I have the same problem and setting the ROS_IP and ROS_HOSTNAME did not do it for me...

GeneralSpoonFul gravatar image GeneralSpoonFul  ( 2013-11-02 12:32:34 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-06-08 20:52:30 -0500

updated 2013-06-08 20:59:06 -0500

Most probably you forgot to specify ROS_IP or ROS_HOSTNAME environment variables to make it work. From the manual:

With the exception of 'localhost', it does not affect the actual bound address as ROS components bind to all available network interfaces. If the value is set to localhost, the ROS component will bind only to the loopback interface. This will prevent remote components from being able to talk to your local component.

edit flag offensive delete link more

Question Tools


Asked: 2013-06-08 17:19:35 -0500

Seen: 662 times

Last updated: Jun 08 '13