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

Revision history [back]

click to hide/show revision 1
initial version

I know it has been a while, but I did end up finding a working (but not ideal) solution for my problem. As the other's mentioned, there is not a guaranteed way to enforce a shutdown order when killing a launch file. However, I was able to find a solution that worked for our needs. For any node that we needed killed before the low level controller, it was launched with the output='screen' and the launch-prefix="xterm-e" as shown in the example below.

<node name="pressure_commander" pkg='louie_control' type='control_to_pressure.py' output='screen' launch-prefix="xterm -e"/>

This makes an individual terminal for each of these nodes. You can kill these nodes individually with ctrl-c in its respective terminal. This way you can regulate the order that the nodes are killed. The disadvantage is that you have to individually kill each of these nodes. However, you do get the advantage of still being able to start them in one launch file.