Project

General

Profile

Network configuration » History » Version 1

Kévin Desormeaux, 2021-06-09 11:25

1 1 Kévin Desormeaux
h1. Network configuration for multi-robots
2
3
4
All the machines must be on the same network. So for example laas-secure. 
5
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.
6
By default your ROS configuration in a bashrc look like this:
7
8
<pre>
9
export ROS_HOSTNAME=localhost
10
export ROS_MASTER_URI=http://localhost:11311
11
</pre>
12
13
You should configure it like this:
14
15
<pre>
16
export ROS_HOSTNAME=HOST_NAME  for example export ROS_HOSTNAME=art-kukarm.laas.fr
17
export ROS_MASTER_URI=http://$ROS_HOSTNAME:11311
18
</pre>
19
20
So to summarize, every machine must have the same ROS_HOSTNAME that is the IP of the machine running roscore.
21
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.
22
23
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.
24
25
More informations here: 
26
27
http://wiki.ros.org/ROS/Tutorials/MultipleMachines