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

cancellAllGoals() to stop a robot?

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

Tambo gravatar image

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

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 -0500

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

Question Tools

Stats

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

Seen: 649 times

Last updated: Nov 23 '12