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

close roscore after running with roslaunch

asked 2014-07-28 17:34:38 -0500

VahidD gravatar image

Hi there,

I have a roslaunch that i run two node with it in my pc, but when i close both of them, roscore are still is running, any tip appreciated. it is the output of my roslaunch:

vahid@vahid:~/catkin_ws$ roslaunch jur_gui_segmentation jur_gui_segmentation.launch 
... logging to /home/vahid/.ros/log/39b07ff0-16a4-11e4-815e-0024beb250ed/roslaunch-vahid-13418.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://vahid:58428/


 * /rosdistro
 * /rosversion

    jur_gui_segmentation (jur_gui_segmentation/jur_gui_segmentation)
    jur_opencv_segmentation_node (jur_opencv_segmentation/jur_opencv_segmentation_node)

auto-starting new master
process[master]: started with pid [13432]

setting /run_id to 39b07ff0-16a4-11e4-815e-0024beb250ed
process[rosout-1]: started with pid [13445]
started core service [/rosout]
process[jur_gui_segmentation-2]: started with pid [13457]
process[jur_opencv_segmentation_node-3]: started with pid [13458]

[jur_gui_segmentation-2] process has finished cleanly
log file: /home/vahid/.ros/log/39b07ff0-16a4-11e4-815e-0024beb250ed/jur_gui_segmentation-2*.log
[jur_opencv_segmentation_node-3] process has finished cleanly
log file: /home/vahid/.ros/log/39b07ff0-16a4-11e4-815e-0024beb250ed/jur_opencv_segmentation_node-3*.log
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-07-28 18:05:30 -0500

ahendrix gravatar image

If you add the required="true" option to one of the <node> tags in your launch file, roslaunch will shut down when that node exits. This includes stopping any of the other nodes that are running and then stopping the roscore, if it was started.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-07-28 17:34:38 -0500

Seen: 2,115 times

Last updated: Jul 28 '14