Closed zacwitte closed 5 years ago
We have the same problem with multiple networks and we search already for a smart solution. Currently you can use
rosrun node_manager_fkie remote_nm.py --package master_discovery_fkie --node_type master_discovery --node_name /master_discovery __name:=master_discovery --masteruri http://HOSTNAME:11311
and
ssh USER@REMOTE_HOST rosrun node_manager_fkie remote_nm.py --package master_discovery_fkie --node_type master_discovery --node_name /master_discovery __name:=master_discovery --masteruri http://REMOTE_HOST:11311
This script starts also the roscore
with given masteruri. So you don't need to change your ROS_MASTER_URI and ROS_IP. (This script cannot be started by a launch file, because roslaunch starts the roscore
before)
BUT, the HOSTNAME's should be resolved to the right IP. If not the topics between two hosts will not be connected by roscore
You can also use node_manager
instead of shell scripts to start your multimaster-network.
"I have the ROS_MASTER_URI on both masters set to http://localhost:11311"
This is the problem, just set your ROS_MASTER_URI to an addressable address.
Please reopen if problem still exists
I'm trying to use the zeroconf master discovery and I'm getting the error you see below on one of the two masters. I have the ROS_MASTER_URI on both masters set to http://localhost:11311. zac-nuc-2 (where the error is occurring) is connected to multiple networks. Ethernet in the office (192.168.1.x) and a separate wifi network that's private to the robot (192.168.0.x). When I unplug from the office network I do not get this error.
The only way I've been able to get multimaster_fkie working with my setup is to manually specify the ROS_MASTER_URI and ROS_IP so they use the IP addresses of the adapters on the same network. Is there any way to make master_discovery node smarter about this? It's a less robust solution because the IP addresses of the computers may change.