Ask Your Question
0

cancellAllGoals() to stop a robot?

asked 2012-11-23 05:38:04 -0600

Tambo gravatar image

updated 2014-01-28 17:14:21 -0600

ngrennan gravatar image

I'm quite new to ActionLibs and while going trough the several tutorials regarding action servers and clients, I started to think about the client functions

  • cancellAllGoals()
  • cancellGoal()

I'm currently using move_base to send goals to a robot, with action libs. Supposing I gave to a robot a goal position in a map, can I stop it using one of the two aforementioned functions?

Thank you all, T

EDIT after dornhege reply: This is the reply I hoped to receive. Assuming that cancellAllGoals() actually stops the robot's motion, I have the following problem..

typedef actionlib::SimpleActionClient<move_base_msgs::movebaseaction> MoveBaseClient; MoveBaseClient ac("move_base", true); …

ac.cancelAllGoals();

Previous code doesn't stop the robot. Am i doing something wrong? (consider that the way I send goals works fine)

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2012-11-23 05:48:25 -0600

dornhege gravatar image

Yes, that's what they're intended for.

For example, I usually put this in a SIGINT handler for our executive to stop all actions, when the user interrupts with Ctrl-C.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-11-23 05:38:04 -0600

Seen: 292 times

Last updated: Nov 23 '12