Robotics StackExchange | Archived questions

Is there a way to run all nodes under a single launch thread

When my system at time get into a state where too many messages are causing a lockup. I kill the main terminal window but many times the problem nodes that are launched independently from the same launch file are still running. Is there a way to kill all the nodes from a single launch file. Right now I have to do a pkill for each node that is still running.

Asked by rnunziata on 2013-09-18 02:26:27 UTC

Comments

Answers

If you put all nodes in one launch file, killing that will kill all those nodes.

Alternatively, you can call rosnode kill -a, but that requires that the nodes are still "somewhat there" - meaning they react to this kill request. Depending on what your lock is that might not be the case.

Asked by dornhege on 2013-09-18 03:46:17 UTC

Comments

Thats what I've been doing but for some reason...though not all the time.....nodes stay up when the terminal is killed. Killing the terminal should kill the launch process yes?

Asked by rnunziata on 2013-09-18 04:41:05 UTC

I guess those nodes just don't react anymore. If you start things from a roslaunch it will first ask nicely, but eventually resort to killing them hard.

Asked by dornhege on 2013-09-18 05:55:45 UTC