Gracefully stopping robot & roslaunch
Hi!
I am writing a ROS node that takes control of the NAO, and upon receiving a Ctrl+C (or rosnode kill) signal, puts the NAO back to its original position.
In order to do that nao_driver/nao_controller.py (another ROS node) must be running in the background.
The problem crops up when I put both my node and nao_controller in the same roslaunch file. Roslaunch immediately stops nao_controller and my node never has the opportunity of stopping gracefully (ie. going back to the original position).
I've checked the wiki and roslaunch does not seem to have any support for adding node dependencies.
I reckon this must be a fairly common issue (shutdown ordering) and that there must be some guidelines and best practices that I am not following.
Can anyone help?
Thanks!