Pausing or aborting movement to a goal
What's the best way to programatically pause or abort movement towards a goal location once it's in the process of being executed?
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
What's the best way to programatically pause or abort movement towards a goal location once it's in the process of being executed?
The move_base node uses an action interface for managing its goals which is built on top of ROS topics one of which is, in this case, move_base/cancel. You can send a message-based cancel request, but I'd recommend using an action client to interact with move_base. Documentation that will probably be useful includes, actionlib documentation (http://www.ros.org/wiki/actionlib), and a tutorial on sending goals to the navigation stack using actionlib (http://www.ros.org/wiki/navigation/Tutorials/SendingSimpleGoals).
Hope this helps.
Is it possible to cancel the goal inside the ActionServer
itself without adding a client side to it. I'm adding priorities to my multiple action servers and whenever any of the callbacks is triggered the server has to check if a goal with a higher priority is currently being executed.
If the received goal is with a higher priority of the currently running goal, the currently running goal needs to be canceled and the new goal is executed.
The action client also defines methods for canceling a goal which just sends a preemption request to the action server. If implemented correctly, the server then stops executing the goal as soon as possible. The method for canceling the goal in SimpleActionServer is cancelGoal.
There is no way to pause an action. You always need to cancel it and re-send the goal when you want to continue.
For an action server, sending an empty goal will stop it. However some action servers don't implement this feature (tuck_arm for example).
Hope this helps,
Guido
Asked: 2011-04-09 02:23:14 -0500
Seen: 6,277 times
Last updated: Apr 11 '11
Custom Global Planner causing problems - undefined symbol
rtabmap and move_base with kinect
Making the robot go straight on an empty map [closed]
Send automatically nav goal based on the map
move_base could not find package manifest
Move_base/dwa parameters for a large robot with rotation center in the front
How to run with keeping one side ?
move_base acting weird with nodes running on different hosts.