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

Move_base: cannot cancel while executing recovery behavior

asked 2013-04-28 20:28:46 -0600

jorge gravatar image

updated 2014-01-28 17:16:22 -0600

ngrennan gravatar image

Hi all, I'm using move_base action client to send goals to my robot and cancel if necessary. It works fine, but I have realized that cancelGoal doesn't work while executing recovery behavior. That is, if I call cancelGoal or cancelAllGoals, the subsequent call to waitForResult doesn't return until all recovery fails. I have tried to disable recovery behavior with:

rosrun dynamic_reconfigure dynparam set move_base recovery_behavior_enabled false

Again, this doesn't returns until recovery fails (more than 2 minutes!). I suppose move_base gets somehow blocked when running recovery behavior and don't even attend reconfigure requests.

Btw, I'm using hydro-devel code navigation stack, but experienced the same with groovy package installation.

Thanks

edit retag flag offensive close merge delete

Comments

me have the same issue either . need to repeatly send the cancel command to stop robot from rotating around.

C3MX gravatar image C3MX  ( 2016-03-25 09:11:04 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-04-29 16:36:29 -0600

joq gravatar image

Sounds like a bug.

Why not open a defect ticket?

edit flag offensive delete link more

Comments

You are right; ticket #34

jorge gravatar image jorge  ( 2013-05-02 03:01:26 -0600 )edit

Hello from 2016, Is this problem solved ?

C3MX gravatar image C3MX  ( 2016-11-13 22:46:21 -0600 )edit

Unfortunately no. A PR would be more than welcome

jorge gravatar image jorge  ( 2016-11-14 03:24:12 -0600 )edit

Alright, it may takes a while to learn the nav stack from under the hood T_T. If i can archive it, i will do that PR. :D

C3MX gravatar image C3MX  ( 2016-11-15 05:20:13 -0600 )edit
0

answered 2017-01-19 23:38:31 -0600

i think i've found the solution . You can clone the move_base package , have it hacked and build by your own

in this file :
https://github.com/ros-planning/navig...

void move_base_cancel_callback(......){
 goalIsCancelled = true;
}



 //Create move_base/cancel Subscriber
   ros::Subscriber move_base_cancel_sub  = nh.subscribe<actionlib_msgs::GoalID>                                                ("/move_base/cancel",1,move_base_cancel_callback);

   while(n.ok()){
    ......    
         // Add code here
         if(goalIsCancelled){
               goalisCancelled = false;
               break; // to break the rotation infinite loop
         }       
    ......
   }
edit flag offensive delete link more

Comments

1

This isn't terribly elegant, and it ignores all of the framework that actionlib already has in place for cancelling goals. I'd suggest that you submit this to the navigation stack as a pull request and discuss the right way to do it there.

ahendrix gravatar image ahendrix  ( 2017-01-20 00:35:05 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-04-28 20:28:46 -0600

Seen: 1,349 times

Last updated: Jan 19 '17