cancellAllGoals() to stop a robot?
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)