Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only launch core nodes if master was launched by roslaunch #1327

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions tools/roslaunch/src/roslaunch/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,9 @@ def _launch_nodes(self):
def _launch_master(self):
"""
Launches master if requested.
@return: True if a master was launched, False if a master was
already running.
@rtype: bool
@raise RLException: if master launch fails
"""
m = self.config.master
Expand Down Expand Up @@ -426,6 +429,8 @@ def _launch_master(self):
self.logger.info("setting /roslaunch/uris/%s__%s' to %s"%(hostname, port, self.server_uri))
param_server.setParam(_ID, '/roslaunch/uris/%s__%s'%(hostname, port),self.server_uri)

return not is_running

def _check_and_set_run_id(self, param_server, run_id):
"""
Initialize self.run_id to existing value or setup parameter
Expand Down Expand Up @@ -627,8 +632,9 @@ def _setup(self):
self.remote_runner.add_process_listener(self.listeners)

# start up the core: master + core nodes defined in core.xml
self._launch_master()
self._launch_core_nodes()
launched = self._launch_master()
if launched:
self._launch_core_nodes()

# run exectuables marked as setup period. this will block
# until these executables exit. setup executable have to run
Expand Down