Ask Your Question
0

close roscore after running with roslaunch

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

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/

SUMMARY
========

PARAMETERS
 * /rosdistro
 * /rosversion

NODES
  /
    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]
ROS_MASTER_URI=http://localhost:11311

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]
 -1 

[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
2

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

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

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: 2014-07-28 17:34:38 -0600

Seen: 1,466 times

Last updated: Jul 28 '14