Setting ROS_MASTER_URI for three connected computers
I am trying to connect three computers together, all three running ROS.
The main computer is connected to two Raspberry Pi's via ethernet. One is connected via the ethernet port on the master and the other is connected via an Ethernet to USB adapter. All three are assigned Static IPs. If I manually set the IPs for both Ethernet connections to 192.168.100.1, I am unable to ping both Raspberry PIs at the same time (research says that you cannot have two network interfaces on the same subnet as Ubuntu does not know which interface to use to contact a specific IP). The two Raspberry Pis have different IPs.
I have set the IPs as follows:
Master PCIe ethernet interface to 192.168.200.1
Master USB ethernet interface to 192.168.100.1
Master computer ROS_MASTER_URI=http://192.168.100.1:11311
Raspberry PI (lowerpi) to 192.168.200.2
lowerpi ROS_MASTER_URI=http://192.168.200.1:11311
Raspberry Pi (upperpi) to 192.168.100.2
upperpi ROS_MASTER_URI=http://192.168.100.1:11311
With this configuration, I am able to run nodes on the three machines and they can talk to each other. However, attempting to use roslaunch from the master fails. It successfully launches the nodes on the "upperpi" which has the same ROS_MASTER_URI as the master. The upperpi, while its ip points to the master pc, does not have the same exact ip set (100.1:11311 vs 200.1:11311).
... logging to /home/mcgreen/.ros/log/3e68f4a0-7db9-11ea-94db-1c697a0a83aa/roslaunch-mcgreen-NUC8i7BEH-14413.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://192.168.100.1:46639/
remote[upper_pi-0] starting roslaunch
remote[upper_pi-0]: creating ssh connection to upper_pi:22, user[upperpi]
launching remote roslaunch child with command: [env ROS_MASTER_URI=http://localhost:11311 ~/upper_ws/devel/remote_env_loader.sh roslaunch -c upper_pi-0 -u http://192.168.100.1:46639/ --run_id 3e68f4a0-7db9-11ea-94db-1c697a0a83aa]
remote[upper_pi-0]: ssh connection created
remote[lower_pi-1] starting roslaunch
remote[lower_pi-1]: creating ssh connection to lower_pi:22, user[lowerpi]
launching remote roslaunch child with command: [env ROS_MASTER_URI=http://localhost:11311 ~/lower_ws/devel/remote_env_loader.sh roslaunch -c lower_pi-1 -u http://192.168.100.1:46639/ --run_id 3e68f4a0-7db9-11ea-94db-1c697a0a83aa]
remote[lower_pi-1]: ssh connection created
remote[lower_pi-1]: Exception while registering with roslaunch parent [http://192.168.100.1:46639/]: Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/server.py", line 506, in _register_with_server
code, msg, _ = server.register(name, self.uri)
File "/usr/lib/python2.7/xmlrpclib.py", line 1243, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python2.7/xmlrpclib.py", line 1602, in __request
verbose=self.__verbose
File "/usr/lib/python2.7/xmlrpclib.py", line 1283, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python2.7/xmlrpclib.py", line 1311, in single_request
self.send_content(h, request_body)
File "/usr/lib/python2.7/xmlrpclib.py", line 1459, in send_content
connection ...