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

Revision history [back]

click to hide/show revision 1
initial version

You need to connect your virtual machine and the other computer as ROS master/slave.

Here is ROS wiki about master/slave and networking. And here is a tutorial that is a bit more straight forward to follow.

Basically what you need to do is (change the ip's to the ip's of your setup):

  1. Choose which computer will be master (Running roscore, doing calculations that are more time-critical)
  2. On the slave machine ping the master
  3. Set the slave pc ROS_MASTER_URI to the ip you pinged ($ export ROS_MASTER_URI=http://192.168.0.4:11311)
  4. Set the slave pc ROS_IP to the ip of the slave ($ export ROS_IP=192.168.0.5)

To verify that you have ROS connected on the two computers:

  1. Start roscore on the master $ roscore
  2. On the slave PC $ printenv | grep ROS to verify the before-mentioned variables are set correctly
  3. On the slave PC ($ rostopic list )

If everything works as expected you should see the /rosout and /rosout_agg topics listed on the slave terminal. You could now run your launch files in these terminals and it should work. With this setup you have to set the variables for each terminal you want to communicate with the master. If this is not to your liking read the links posted above.