Node shutdown
Hello,
I'm working on a node with an internal state machine. The node has to run the main loop in the "running" state, then after using Ctrl+C (or sending a rosnode kill
) switch into a "closing" state do some stuff (maybe ROS related, like publishing on a topic) and then shutdown completely.
In synthesis, I need to break the main loop without using ros::shutdown()
.
Currently I'm using an implementation similar to the one suggested here: http://answers.ros.org/question/27655...
Is this one still the best (and probably only) approach? Or there is a way to "split" the shutdown procedure?