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
To configure the environment for multi-robots, ROS_MASTER_URI must design the host machine. So let's say this machine is named "kukarm", then every machine on the network must have this in its environment:
export ROS_HOSTNAME=kukarm export ROS_MASTER_URI=http://$ROS_HOSTNAME:11311
To finish every non-host machine must provide its IP address to be known on the network. This is done by setting the ROS_IP variable:
This is not needed for the machine running roscore.
I have added scripts in the package of CM2C/MP2 to set the ROS environment for the computers kukarm and truyere.
I will paste below the configuration i used for the three computers:
#personnal laptop running the planning stack (CM2P) export ROS_HOSTNAME=azjol-nerub export ROS_MASTER_URI=http://$ROS_HOSTNAME:11311 #kukarm, operating panda_1 export ROS_IP=220.127.116.11 export ROS_MASTER_URI=http://Azjol-Nerub:11311 #truyere, operating panda_2 export ROS_IP=18.104.22.168 export ROS_MASTER_URI=http://Azjol-Nerub:11311
More informations here: