ROS Multimaster for ros master on Wifi and Ethernet

asked 2019-10-29 01:13:16 -0600

lyf44 gravatar image

I have a robot which establishes its own Wifi network called A and creates a ROS master via the network. I have a laptop connected to the wifi network and can access topics created by the robot. Meanwhile, the laptop is connected to another network called B via ethernet and the laptop creates its own ROS master to communicate with other machines in network B. I am trying to run ROS multimaster_fkie on the laptop but the two masters can not discover each other. I am assuming it is because one is on network A and another is on network B. Could anyone tell me how to establish connections between the two ros masters?

Currently, when I run the following in my laptop.

export ROS_MASTER_URI="http://10.66.171.1:11311" # ROS_MASTER_URI for ROS Master on network A rosrun master_discovery_fkie master_discovery

I get

[INFO] [WallTime: 1572328934.230123] ROS Master URI: http://10.66.171.1:11311
[INFO] [WallTime: 1572328934.261932] Check the ROS Master[Hz]: 1
[INFO] [WallTime: 1572328934.262249] Heartbeat [Hz]: 0.02
[INFO] [WallTime: 1572328934.262452] Active request after [sec]: 60
[INFO] [WallTime: 1572328934.262631] Remove after [sec]: 300
[INFO] [WallTime: 1572328934.262809] Robot hosts: []
[INFO] [WallTime: 1572328934.262983] Approx. mininum avg. network load: 1.36 bytes/s
[INFO] [WallTime: 1572328934.275997] Start RPC-XML Server at ('0.0.0.0', 11611)
[INFO] [WallTime: 1572328934.276577] Subscribe to parameter /roslaunch/uris
[INFO] [WallTime: 1572328934.302547] + Bind to specified unicast socket @(137.132.82.147:11511)
[INFO] [WallTime: 1572328934.302908] Create multicast socket at ('226.0.0.0', 11511)
[INFO] [WallTime: 1572328934.624952] Detected master discovery: http://localhost:11611
[INFO] [WallTime: 1572328934.729224] Added master with ROS_MASTER_URI=http://10.66.171.1:11311/

And then I run the following in another terminal:

export ROS_MASTER_URI=http://localhost:11311 # ROS_MASTER_URI on network B
rosrun master_discovery_fkie master_discovery

I get:

[INFO] [WallTime: 1572329338.024654] ROS Master URI: http://localhost:11311
[INFO] [WallTime: 1572329338.041032] Check the ROS Master[Hz]: 1
[INFO] [WallTime: 1572329338.041357] Heart beat [Hz]: 0.02
[INFO] [WallTime: 1572329338.041591] Active request after [sec]: 60
[INFO] [WallTime: 1572329338.041808] Remove after [sec]: 300
[INFO] [WallTime: 1572329338.042024] Robot hosts: []
[INFO] [WallTime: 1572329338.042234] Approx. mininum avg. network load: 1.36 bytes/s
[WARN] [WallTime: 1572329338.050148] Error while start RPC-XML server on port 11611: [Errno 98] Address already in use Try again...
[WARN] [WallTime: 1572329339.051930] Error while start RPC-XML server on port 11611: [Errno 98] Address already in use Try again...
[WARN] [WallTime: 1572329340.053891] Error while start RPC-XML server on port 11611: [Errno 98] Address already in use Try again...
[WARN] [WallTime: 1572329341.055901] Error while start RPC-XML server on port 11611: [Errno 98] Address already in use Try again...
[WARN] [WallTime: 1572329342.058117] Error while start RPC-XML server on port 11611: [Errno 98] Address already in use Try again...

edit retag flag offensive close merge delete