0
$\begingroup$

Rosanswers logo

Hi,

I want to shutdown all nodes from within a ros node. ros::shutdown() kills the current node but does not kill the other nodes.

I know that all nodes can be killed using the terminal and through the launch file. But I test if a certain condition is met and only in such a circumstance I want all the nodes to shutdown.

Thanks!


Originally posted by ashwath1993 on ROS Answers with karma: 70 on 2018-05-28

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

If all your nodes are launched by a single launch file, you could make your checking node required and let it stop itself to take down the whole launch file. If you have several launch files, have a required node in each launch and connect the killer nodes with bonds.


Originally posted by NEngelhard with karma: 3519 on 2018-05-28

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by ashwath1993 on 2018-05-28:
Thanks a lot! I didn't know of this parameter.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.