Ask Your Question
0

Communication error between two nodes on two distributed machines

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

GermanUser gravatar image

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

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: 192.168.56.1 (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 '192.168.56.1'.

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]
Publications: 
 * /rosout [rosgraph_msgs/Log]

Subscriptions: 
 * /chatter [std_msgs/String]

Services: 
 * /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]
Publications: 
 * /rosout [rosgraph_msgs/Log]
 * /chatter [std_msgs/String]

Subscriptions: None

Services: 
 * /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
1

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

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
export ROS_IP=MASTER_IP

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
export ROS_IP=SLAVE_IP

You must do this in every terminal that you use.

edit flag offensive delete link more

Comments

Now it does work!

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

Stats

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

Seen: 3,481 times

Last updated: May 15 '12