0
$\begingroup$

Rosanswers logo

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.


Originally posted by GermanUser on ROS Answers with karma: 125 on 2012-05-15

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by DimitriProsser with karma: 11163 on 2012-05-15

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by GermanUser on 2012-05-18:
Now it does work!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.