-
Notifications
You must be signed in to change notification settings - Fork 698
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
U-turns being forbidden at barriers, leading to no-routes when inputs force conditions that would require a u-turn #2875
Conversation
yeah |
@danpat im a bit confused though. i think recently we (@danpaz) changed this behavior to allow a uturn even where the node has no access: https://github.com/valhalla/valhalla/blob/master/src/thor/bidirectional_astar.cc#L142 🤔 |
The change in bidirectional at https://github.com/valhalla/valhalla/pull/2705/files#r534545579 was meant to address cases like these, by allowing a uturn at nodes where access is disallowed. Essentially we now enqueue the reverse edge, where before we were bailing and returning a NoRoute. Now it seems we're back to the old behavior. It seems like there was a regression around that code, or around the special case handling uturns just below it. |
When routing with multiple waypoints, do we have to start at the same location the previous leg ended on? Is it not acceptable to, say snap to a different edge if its not possible to continue on the edge the previous leg ended on? |
so currently the code will look at the edge the last leg ended on and remove all candidates but that one when its a "*_through" location. for other types i forget if it does weed them out or not. but if it didnt the route would be pretty wild in that there would be a teleport between snap locations |
To be clear - the test isn't expecting a u-turn at the middle waypoint (1) here - it's expecting to continue through the waypoint, then perform the u-turn at the I'm wondering whether use of |
Just pushed an additional test using |
access=no
on nodes prevents u-turns, leading to no routes when type=break_through used at waypoints requiring a u-turn to escapecbbf719
to
210699e
Compare
8c99fd3
to
dd076bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @danpat !
6cd6e95
to
37a529d
Compare
…dge as a deadend so other admissibility logic will behave consistently. Graph preparation will not mark these edges as deadends, because deadendiness is access mode specific (e.g. foot may be allowed). Many *::Allowed() methods check for u-turns and depend on the "edgelabel.deadend()" flag to detect u-turns at the end of a dead-end street.
9cc0cec
to
c1110e5
Compare
Did some cleanup on the test - @mandeepsandhu @danpaz @kevinkreiser anyone mind 👍 on this again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks again!
Issue
Not 100% sure what the issue here is yet, but this test case demonstrates the problem. When you use
type=break_through
at waypoints, and a u-turn is required at a dead-end, a NoRoute result is the outcome.I'm not sure whether it's the
break_through
that's the root cause, or theaccess=no
on the necessary u-turn location in this test, but the test shows the problem.cc @gknisely
Tasklist
Requirements / Relations
Link any requirements here. Other pull requests this PR is based on?