ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
4

Pausing or aborting movement to a goal

asked 2011-04-09 02:23:14 -0600

What's the best way to programatically pause or abort movement towards a goal location once it's in the process of being executed?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
3

answered 2011-04-11 04:50:36 -0600

eitan gravatar image

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.

edit flag offensive delete link more

Comments

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.

rbaleksandar gravatar image rbaleksandar  ( 2016-06-27 06:24:41 -0600 )edit

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.

rbaleksandar gravatar image rbaleksandar  ( 2016-06-27 06:25:29 -0600 )edit
1

answered 2011-04-11 03:39:20 -0600

Lorenz gravatar image

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.

edit flag offensive delete link more

Comments

There is a topic called /move_base/cancel. If this is what I should be publishing to what type of messages should I be sending?
JediHamster gravatar image JediHamster  ( 2011-04-11 04:30:27 -0600 )edit
0

answered 2011-04-11 01:09:30 -0600

Guido gravatar image

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

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2011-04-09 02:23:14 -0600

Seen: 6,516 times

Last updated: Apr 11 '11