ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OK, @kwc confirmed two bugs which caused the above mentioned behavior, the tickets are:

  • https://code.ros.org/trac/ros/ticket/3801
  • https://code.ros.org/trac/ros/ticket/3802

The problem can be temporarily solved by setting ROS_MASTER_URI to point to hostname instead of localhost before launching remote systems via roslaunch.

Example: Say your local system's hostname is beta and you're using roslaunch to start a distributed ROS system on alpha (remote) and beta (local) - as in the launchfile cited in question. Per default, ROS_MASTER_URI on beta would be:

ROS_MASTER_URI=http://localhost:11311

which then falsely gets set on alpha too, and in effect two roscore's are being started which don't know about each other. Instead, setting:

ROS_MASTER_URI=http://beta:11311

on beta before executing launchfile causes ROS_MASTER_URI on both machines to be set to http://beta:11311 which is correct.

click to hide/show revision 2
corrected a meritorical mistake according to @kwc 's comment

OK, @kwc confirmed two bugs which caused the above mentioned behavior, the tickets are:

  • https://code.ros.org/trac/ros/ticket/3801
  • https://code.ros.org/trac/ros/ticket/3802

The problem can be temporarily solved only occurs when ROS_MASTER_URI is set to localhost on the machine where a distributed ROS system is being launched from. It is desired to set ROS_MASTER_URI depending on hostname instead (the bug is that roslaunch doesn't catch when you fail to set this, and compounds it by setting ROS_MASTER_URI to point to hostname instead of localhost before launching starting an extra remote systems via roslaunch.core).

Example: Say your local system's hostname is beta and you're using roslaunch to start a distributed ROS system on alpha (remote) and beta (local) - as in the launchfile cited in question. Per default, ROS_MASTER_URI on beta would be:

ROS_MASTER_URI=http://localhost:11311

which then doesn't get cought by the system and gets falsely gets set on alpha too, and in effect two roscore's are being started which don't know about each other. Instead, setting:

ROS_MASTER_URI=http://beta:11311

on beta before executing launchfile causes ROS_MASTER_URI on both machines to be set to http://beta:11311 which is correct.