-
Notifications
You must be signed in to change notification settings - Fork 4.4k
fix the loops on autodriving routes #83777
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
Conversation
|
So if I'm reading this correctly your patch essentially clears all 'passed' nodes if it detects that the vehicle is on a later one. What if the vehicle is on a 'passed' node but the orientation makes it impossible to continue on the path? In other words, if the loop occurs regardless. |
|
After some consultation on the development discord, I'm tentatively going to assign this to be a 0.I backport. The issue being fixed is present on 0.I and the fix isn't too invasive, so assuming it passes testing I'm relatively confident in it. |
Basically it doesn't care about 'passed' nodes, the only point is that - if we've managed to occur later on the global path, no need to visit any previous nodes. Whatever the reasons were, like we probably got teleported almost to the end of the route never touching any of the previous nodes - it doesn't matter.
Given the current way how it works, only skidding can lead to that situation, and we stop autodrive in this case. In the other cases it looks mostly like broken pathfinding (or we've got suddenly teleported, but it's a legit reason to turn around and form a loop). |
|
It looks like failed tests are a bit unrelated to any of the changes - like some problems with items and pockets. |
a8cdc40 to
6c17168
Compare
|
I have automatically backported this PR to "0.I-branch", please check out #83806 |
|
I was unable to backport this PR to "0.I-branch" cleanly; |
Summary
Bugfixes "loops on autodrive routes"
Purpose of change
Fixes #83776
Describe the solution
Detailed problem description is in the issue, and the solution is removing not just the last matching node from the global path, but whole section of the global path from the end to the current vehicle position.
It scans the path from the end, so in the most cases it matches the first encountered element and removes it. But in case if we jumped over a few (most probably just one) path nodes, it removes the whole section to avoid "visiting" that skipped node.
Describe alternatives you've considered
Don't know.
Testing
Using bug report save
Additional context
There is a single-line kind of unrelated change where I removed unnecessary
pop_backjust before explicitclearcall. I don't feel that it requires separated PR, but it's doable.