Set ROS_MASTER_URI on remote robots
Hi everyone,
I tried searching on the internet, but I didn't find exactly what I wanted.
I have the following infrastructure:
PC : 192.168.0.100 Robot1 : 192.168.10.101 Robot2 : 192.168.10.102 Robot3 : 192.168.10.103
The robots are always the same but the PC can change. If I use mine that is the IP , if someone else uses another one the IP changes.
For this reason everytime I start an experiment I need to make sure to do an export on the Robot1-2-3 of my ROS_MASTER_URI.
I am sure there is a way of doing it in one of the launch files I use but I didn't find yet a solution which is fast and clean.
Could you please point me in the right direction?
EDIT:
I do :
<machine name="Robot1" address="192.168.10.101" user="odroid" env-loader="/home/odroid/catkin_ws/devel/env.sh" default="true"> </machine>
I would like to pass directly the environment variable ROS_MASTER_URI in the previous lines but I know it is not possible anymore. Do you know how should I modify the env.sh file to tell it to do an
export ROS_MASTER_URI="http://192.168.0.100:11311"
Where, as I said before, 192.168.0.100 is the IP of my PC where the ros master is running. Thanks a lot.