Project

General

Profile

Actions

Network configuration for multi-robots

All the machines must be on the same network. So for example laas-secure.
One machine must be the host, hence running roscore, and every other machine must know which machine is the host. For that we need to configure the bashrc of every machine.
By default your ROS configuration in a bashrc look like this:

export ROS_HOSTNAME=localhost
export ROS_MASTER_URI=http://localhost:11311

You should configure it like this:

export ROS_HOSTNAME=HOST_NAME  for example export ROS_HOSTNAME=art-kukarm.laas.fr
export ROS_MASTER_URI=http://$ROS_HOSTNAME:11311

So to summarize, every machine must have the same ROS_HOSTNAME that is the IP of the machine running roscore.
ROS_MASTER_URI is usually the ROS_HOSTNAME with the port 11311. But to be sure you can run roscore on the host machine and look at the prints in the terminal.

Sometimes the name of the host machine cannot be resolved. You can try to ping it. If it fails try to directly ping the IP of the machine. If it works, you might want to replace ROS_HOSTNAME with ROS_IP.

More informations here:

http://wiki.ros.org/ROS/Tutorials/MultipleMachines

Updated by Kévin Desormeaux over 3 years ago · 1 revisions