-
Notifications
You must be signed in to change notification settings - Fork 147
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
Call reset on new plan, not new goal #27
base: master
Are you sure you want to change the base?
Conversation
So this is a case where I forgot to update the documentation as the interfaces evolved. It should have said new global goal, which was only detected when the global plan's last endpoint shifted. I changed it to make it more explicit. Do you have a use case where you want things to be reset per-global-plan? |
Where? I guess not pushed yet?
Hmmmm... I thought I did: I wrote a Critic that scores the distance to an intermediate goal, and remembers which intermediate goal poses have already been reached to stop oscillations between two intermediate goals. This list of reached goals is cleared on reset(). Since it's somehow related to the current plan, I was surprised that reset() wasn't called. Upon reflection, it's even better to reset this list per-goal, not per-plan: If I set the global planner to continually replan, it would otherwise reset my list too often. So I'm closing this issue now. |
Sorry, dangling reference. It here refers to me the |
The trouble with that is, that the
Thus, the critic will be called with a different global plan on each iteration, and it is not trivial to figure out when there is an actual new global plan was send. It would require to align the transformed plan from the previous iteration with the current one and calculate the difference between them, and that's not even guaranteed to work if the two plans are similar within the current cost map window. It seemed much cleaner to me to explicitly call
Yes. That would fix the bug I described in this comment, but I suspect there might be more such bugs in other critics as well. The current implementation is that Can you come up with an example where the current behavior is more useful than the proposed one? I.e., where the critics should behave differently based on whether replanning or a new goal triggered the new global plan? |
The documentation on `reset()` says: > called at the beginning of every new navigation, i.e. when we get a > new global plan The `reset()` functions were called in `setGoalPose()`, i.e. when the user gives a new goal. However, when the local planner fails and the global planner replans, `setGoalPose()` is not called, but `setPlan()` is. This commit makes sure that `reset()` is also called in this case.
This reverts commit 8248d6c.
The documentation on
reset()
says:The
reset()
functions were called insetGoalPose()
, i.e. when the user gives a new goal. However, when the local planner fails and the global planner replans,setGoalPose()
is not called, butsetPlan()
is. This PR makes sure thatreset()
is also called in this case.