On cancelling move_base action, we were calling goalhandle.setCanceled only while running get_path, but not during exe_path nor recovery. So the action client didn't get any result (I noticed that because SMACH simple action state freezes after sending a cancel)
Other related changes (sorry, was too cumbersome to make a separated PR):
Cancel whatever is running on oscillation (we can be also planning or recovering)
Refactored a bit the code
Easily tested by sending any goal with axclient and canceling it, cause the status bar gets frozen in pink with the msg "Canceling goal":
On cancelling move_base action, we were calling goalhandle.setCanceled only while running get_path, but not during exe_path nor recovery. So the action client didn't get any result (I noticed that because SMACH simple action state freezes after sending a cancel)
Other related changes (sorry, was too cumbersome to make a separated PR):
Easily tested by sending any goal with axclient and canceling it, cause the status bar gets frozen in pink with the msg "Canceling goal":
rosrun actionlib axclient.py /move_base_flex/move_base