-
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
Avoid calling out "keep left/right" when passing an exit #3349
Conversation
src/odin/maneuversbuilder.cc
Outdated
uint32_t curr_lane_count = curr_edge->lane_count(); | ||
// Going from N+1 lanes to N lanes by virtue of a deceleration/exit lane. | ||
if (prev_lane_count == curr_lane_count + 1) { | ||
if (prev_edge->HasTurnLane(kTurnLaneSlightRight) || |
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.
I was thinking about when we have an odd number of lanes on the previous edge - that the middle lane needs to have two directions (split) for us to use as fork. The only downside would be that the lane info must be present for us to mark as fork in these cases.
if (prev_edge->IsHighway() && | ||
((curr_edge->IsHighway() && (xedge->use() == TripLeg_Use_kRampUse)) || | ||
(xedge->IsHighway() && curr_edge->IsRampUse())) && | ||
has_lane_bifurcation(trip_path_, node_index, prev_edge, curr_edge, xedge) && |
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.
Checking for the lane-bifurcation now has precedence over the fork-forward angle checks.
@ktatterso I am trying to understand this diff between master and branch - since I do not see a deceleration lane Request:
MasterBranchTransition point: |
@dgearhart Brilliant find. There are a couple things going on. I'm testing a fix. |
I've tried a bunch of things to more accurately determine the length of a deceleration lane. In short, I've empirically determined that 1) decel lane length as a function of speed is linear, and 2) I've run a whole bunch of routes so I could apply a linear regression to determine the best real world equation for "deceleration lane length as a function of speed". |
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.
Excellent - test results looked good to me. Thanks for the explanation of your analysis. Thank you @ktatterso 🚢
Issue
If passing by an exit that is preceded by a "standard length" deceleration lane, avoid calling out a maneuver, e.g., "Keep left/right" to stay on the main road.
Examples
Example 1
Before
After
Example 2
Before
After
Solution
If we detect that the lane bifurcation/split is due to a deceleration lane, we avoid calling out the "keep left/right" maneuver.
The length of a deceleration lane is predictable as a function of road speed. I used the results from this research paper.
The logic works backwards from the bifurcation, adding up edge lengths until 1) the extra lane goes away, or 2) we exceed the standard (+tol) length of a deceleration lane.
If we determine that the length of the additional lane fits the standard length of a deceleration lane (within tolerance), we do not call out the "keep left/right" maneuver.
Tasklist