Ask Your Question
1

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
3

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 imageNEngelhard ( 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 imageBoris ( 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 imageNEngelhard ( 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 imageDirk 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 imageNap ( 2015-09-05 12:49:36 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 2,478 times

Last updated: Sep 05 '15