SMACH: How to stop an action currently run by the ActionServerWrapper?
This question follows this old one. As @bit-pirate, I have my SM running inside an action server wrapper. Following @jbohren explanatios, my SM receives the Ctrl+C properly and stops. So all is fine if my SM wrapper action server is not executing a goal. But when it is, its internal thread(s) keeps running and the SM node always escalates to SIGTERM, then SIGKILL on ROS shutdown. The SM is waiting for a SimpleActionState to complete, but as I'm amidst a ROS shutdown, that never happens
I have tried all tricks i can think about...
- request_preempt to the SM
- call _action_server.set_aborted
- send the action server wrapper a goal that should stop intermediately
- ...
And all fails. So I must be missing an important point
Here is the code in question
Any clues?