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

Does a roslaunch start roscore when needed?

asked 2015-09-05 07:54:55 -0500

Nap gravatar image

updated 2015-09-05 12:48:04 -0500

[Ubuntu 14.04, ROS Hydro]

As per the title.
It seems to me that it does. However I would like to have it confirmed. (Sorry if this is silly question.)

Cheers, Nap
(Thank you for the answer and explanations.)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
5

answered 2015-09-05 08:43:01 -0500

Yes, it does. If there is no roscore already running.

As per Wiki on roslaunch:

roscore is a specialization of the roslaunch tool for bringing up the "core" ROS system.

And on roscore itself:

NOTE: If you use roslaunch, it will automatically start roscore if it detects that it is not already running.

edit flag offensive delete link more

Comments

May be as an addition: It works, but can lead to strange behaviours if you start the core with a launch file, then some other launch files, you kill the first launchfile (and the core), start a new and nodes will not be able to connect anymore as they still rely on the old (vanished) roscore.

NEngelhard gravatar image NEngelhard  ( 2015-09-05 08:56:30 -0500 )edit
1

True, but that is always the case, even if roscore was started separately. Unfortunately ROS 1.0 is designed this way. Not sure, but this behaviour might change in ROS 2.0.

Boris gravatar image Boris  ( 2015-09-05 09:31:40 -0500 )edit
1

But It's harder to kill a terminal with a roscore in it than relaunching a launch-file and forgetting which launch contained the master. I normally use a seperate tmux for the roscore so that I can forget it and not accidentially kill it together with some other terminals.

NEngelhard gravatar image NEngelhard  ( 2015-09-05 10:14:05 -0500 )edit
3

ROS 2 does not have a master anymore but works completely peer-to-peer thanks to DDS.

Dirk Thomas gravatar image Dirk Thomas  ( 2015-09-05 11:18:51 -0500 )edit

I read the specialisation comment, but didn't see the one in the roscore documentation. Cheers.

Nap gravatar image Nap  ( 2015-09-05 12:49:36 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-09-05 07:54:55 -0500

Seen: 5,445 times

Last updated: Sep 05 '15