RLException: Machine [ubuntu2] already added and does not match duplicate entry
I have had a working multi-machine environment for a while but today I get this error that I cannot debug myself.
RLException: Machine [ubuntu2] already added and does not match duplicate entry
I have set the following environment variables:
Machine 1 ubuntu1:
export ROS_MASTER_URI=http://10.0.0.2:11311
export ROS_IP=10.0.0.1
export ROS_HOSTNAME=10.0.0.1
Machine 2 ubuntu2:
export ROS_MASTER_URI=http://localhost:11311
export ROS_IP=10.0.0.2
export ROS_HOSTNAME=10.0.0.2
In my launch file, I declare machine like:
<machine name="ubuntu2" address="10.0.0.2" env-loader="/home/ubuntu/catkin_ws/src/env.sh" user="ubuntu"/>
Machine 2 runs the roscore master node. The namespaces resolves in ssh (ssh ubuntu2). Machine1 runs the launch files. I am not sure what do to fix this.
I'm not sure whether it's the cause, but in any case: do not set both
ROS_HOSTNAME
andROS_IP
(and don't setROS_HOSTNAME
to an IP). Use one or the other, in your case you should probably only setROS_IP
.