-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Graceful cancel (preempt) #171
Comments
Sounds reasonable; did you try to move the |
I tried to move the line and that seemed to work. I was surprised they run in a separated thread. However still a goal of 0.0 is send at the end. Which might or might not be what somebody wants. |
Can make this line parametrizable, yes. We added on request by another user to ensure that the robot doesn't keep moving at a fixed speed if the controller dies |
Would it be okay if this becomes the default if Or perhaps always leave it up to the user to implement this. |
I would say the last option is the simplest and more predictable, defaulting to pub the zero vel. @spuetz , your thoughts? |
Solved with #172 |
@corot I ran into an error, since the default value of |
I think false is fine. Because preempts also occur when new goals are send. This leads to a short 0.0 publish in between. See comment here: e4cdbb9#commitcomment-37274956 I can also remember a discussion where 'doing nothing should be the default': #173 (comment) I think 'doing nothing by default' (so not publish 0.0 unless told to do so) is nicer. It also has been the default on every buildfarm release until now. But I don't have a very strong opinion about it. |
But, cancelling without sending a new goal will just tun off the controller and the last |
Well, if the executive cancels the navigation, makes sense that it also
stops the robot if needed.
Moreover, the controller cancel method gets called, so he too has the
opportunity to stop the robot.
…On Fri, Apr 24, 2020 at 5:39 PM Sebastian Pütz ***@***.***> wrote:
But, cancelling without sending a new goal will just tun off the
controller and the last cmd_vel will be valid and the robot just moves on
without stopping. (In the default case)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#171 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACOYMS3T7YLIEUJLBJ44YTROFF4RANCNFSM4KUTTBDA>
.
|
Yes, of course. I'm just saying we changed the behaviour. I had the problem: I updated the robot, which also installed the new version of MBF, and after that the robots crashed into walls. That should not happen. |
Therefore I suggested to set the default value of |
To me, now we have the right behavior. Your client code relies on a "wrong" (too strong word, for sure) behavior introduced on 16 October 2019 |
Can we close this? |
We already do successfully for a year now. I can compare our implementation with that one later today. Thanks for the ping! |
Is required if these 3 conditions meet
|
This is the content of our cancel method: bool TrackingPidLocalPlanner::cancel()
{
// This function runs in a separate thread
cancel_requested_ = true;
cancel_in_progress_ = true;
ros::Rate r(10);
ROS_INFO("Cancel requested, waiting in loop for cancel to finish");
while (active_goal_)
{
r.sleep();
}
ROS_INFO("Finished waiting loop, done cancelling");
return true;
} Maybe the rate sleep is identical to a |
No, afaik. But during this time your controller is not getting any callbacks, I guess; |
It could be that odom is not coming in. It might be something that got unnoticed (we decelerate open-loop, but the a curve won't be followed correctly then). We'll migrate to the solution in #274. Thanks for the clear example in there! We're using the apt version currently. Happy to evaluate master if the merge is completed. |
Welcome! Feedback will be highly appreciated! |
When preempting the "exe_path" action we would like to come to a graceful stop and then say we succeeded in cancelling.
Current implementation:
sets the
cancel_
flag op true before we can handle any actions in our overloaded cancel function.This results in an immediate zero publish on the
cmd_vel
topic.Desired behavior:
Allow for a custom implementation upon receiving a preempt on an "exe_path" action. For example: We want to adhere to deceleration limits and still follow the current active path. So it could also take some time before the cancel is acknowledged.
The text was updated successfully, but these errors were encountered: