Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

In case of a multi-homed system that is running the master, you need to make sure to set ROS_MASTER_URI to a hostname or IP address that is reachable by the hosts on each respective segment.

As you have all interfaces in the same network, it doesn't really matter what you do, as all hosts will be able to reach all hosts.

So you could choose to either use the .3 or .4 address for ROS_MASTER_URI.

If you'd used different networks, then it would start to matter which IP address you'd use for each host.

In case of a multi-homed system that is running the master, you need to make sure to set ROS_MASTER_URI to a hostname or IP address that is reachable by the hosts on each respective segment.

As you have all interfaces in the same network, it doesn't really matter what you do, as all hosts will be able to reach all hosts.

So you could choose to either use the .3 or .4 address for ROS_MASTER_URI.

If you'd used different networks, then it would start to matter which IP address you'd use for each host.


Edit: after your edit:

All your network interfaces are in the same network (ie: 192.168.0). Or at least, that's what I'm assuming, as you don't mention the netmask that you've configured (but I'll assume it's /24 or 255.255.255.0).

So it shouldn't matter which IP for your master you configure, as both .3 and .4 should be reachable by all machines. Try ping 192.168.0.3 and ping 192.168.0.4 from both Slave1 and Slave2. You should always get responses.

Pick one of the IPs of your master and configure it as the ROS_MASTER_URI on all machines (including the master itself).

Don't set ROS_HOSTNAME to an IP. Use ROS_IP only.

And don't set ROS_MASTER_URI to localhost for your master. Set it to http://$ROS_IP:11311.

And again I will state that with a good switch, this should not be necessary.