ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Communication error between two nodes on two distributed machines

asked 2012-05-15 06:24:29 -0600

GermanUser gravatar image

updated 2012-05-15 06:26:31 -0600

Hello everyone,

I estabilshed a network enviromnent between two machines. The first machine is a local host and the second machine is a Virtual Machine (VM). I've tested the network configuration and all worked fine. I have a bi-directional connectivity between the two machines.

  • The local host has a static IP: (name is lap64)

  • The virtual machine has a IP of: 192.1168.56.101 (name is vm_vbox)

  • And I set the ROS_MASTER_URI to ''.

According to this, I build up a simple Publisher and Subscriber Node in C++ to transmit data between the network. First of all, I tested the Publisher and Subscriber on the local machine and it workd fine.

Next, I tried to transmit data from the Publisher (talker) running on the local machine to the Subscriber (listener) running on the Virtual machine. By typing rostopic on both sides, I can see each others nodes and topics.

But, by transmitting data I get and communication error in each node. Here some more informations:

Local host (running on electric)

userA@lap64:~/ros_workspace/topic_tutorial$ rosnode info /listener
Node [/listener]
 * /rosout [rosgraph_msgs/Log]

 * /chatter [std_msgs/String]

 * /listener/get_loggers
 * /listener/set_logger_level

contacting node http://vm_vbox:43126/ ...
ERROR: Communication with node[http://vm_vbox:43126/] failed!

Virtual machine (running on fuerte)

userB@vm_vbox:~/ros_workspace$ rosnode info /talker
Node [/talker]
 * /rosout [rosgraph_msgs/Log]
 * /chatter [std_msgs/String]

Subscriptions: None

 * /talker/set_logger_level
 * /talker/get_loggers

contacting node http://lap64:52729/ ...
ERROR: Communication with node[http://lap64:52729/] failed!

What could I have missed or configured wrong?

Best regards from Germany.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-05-15 07:00:58 -0600

DimitriProsser gravatar image

First, I'm not sure it's a good idea to try and communicate between two different versions of ROS. That could lead to some problems.

Second, have you configured the network properly? Try taking a look here. The general idea is that you choose a PC to be your "master". On this machine, before starting roscore or a roslaunch, you must perform (where MASTER_IP is the IP address of your "master" computer):

export ROS_MASTER_URI=http://MASTER_IP:11311

On your second machine, you perform the following (where SLAVE_IP is the IP address of the second machine):

export ROS_MASTER_URI=http://MASTER_IP:11311

You must do this in every terminal that you use.

edit flag offensive delete link more


Now it does work!

GermanUser gravatar image GermanUser  ( 2012-05-18 23:55:04 -0600 )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


Asked: 2012-05-15 06:24:29 -0600

Seen: 5,551 times

Last updated: May 15 '12