Fix buses trying to warp between lanes between stops #892
+74
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#372
This situation was previously happening: a bus stop is on the rightmost lane of a road, and the path to the next bus stop immediately requires a turn from the leftmost lane. Before some extra validation in the previous PR, the bus would just warp in the simulation and crash things.
![Screenshot from 2022-04-18 10-48-20](https://user-images.githubusercontent.com/1664407/163791010-94e0e3b5-1ea7-4bc5-8ddc-d0d7d6f65c27.png)
But really the fix is to force pathfinding from that exact start lane when it's a bus. (Most vehicle drives exit from a driveway and are allowed to immediately enter any starting lane.) This PR probably does that. The one test case I was looking at in SP actually isn't routable with this new constraint, because there's a turn restriction at https://www.openstreetmap.org/node/2389060511.
I need to regenerate maps and prebaked data and validate still.