In LocomotorActionServer's constructor function, navigate_action_server_.registerPreemptCallback(std::bind(&LocomotorActionServer::preemptCallback, this)); is called for register callback to deal with cancel request.
but in preemptCallback() can not stop the move_base's plan_loop_timer_ and control_loop_timer_.
and this will caused the action server is preempted, but the move_base is still runing the planners, robot is moving.
To solve this problem, I think we should provide a callback function in the LocomotorActionServer like this:
In locomotor_action_server.h
In LocomotorActionServer's constructor function,
navigate_action_server_.registerPreemptCallback(std::bind(&LocomotorActionServer::preemptCallback, this));
is called for register callback to deal with cancel request. but inpreemptCallback()
can not stop the move_base'splan_loop_timer_
andcontrol_loop_timer_
.and this will caused the action server is preempted, but the move_base is still runing the planners, robot is moving.
To solve this problem, I think we should provide a callback function in the LocomotorActionServer like this: In locomotor_action_server.h
In locomotor_action_server.cpp