-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
fix bug in conflict resolution #4375
Conversation
@@ -773,17 +774,18 @@ void TurnHandler::handleDistinctConflict(const EdgeID via_edge, | |||
return; | |||
} | |||
|
|||
if (getTurnDirection(left.angle) == DirectionModifier::Right) | |||
// turn to the right | |||
if (getTurnDirection(left.angle) <= 180) |
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.
this is the main bug here. By checking for the modifier, we do not use right turns when the angles involved are slight/sharp
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.
Urgh this compiled because of the enum not being a strong typedef, right?
{ | ||
if (angularDeviation(left.angle, 85) >= angularDeviation(right.angle, 85)) | ||
{ | ||
left.instruction = {left_type, DirectionModifier::Right}; | ||
right.instruction = {right_type, DirectionModifier::SharpRight}; | ||
left.instruction = {left_type, DirectionModifier::SlightRight}; |
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 notices this bug in the process of fixing the above.
Left
is farther away from a 90 degree turn than right
. So left cannot be a stronger turn than right
.
These two were mixed up.
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.
This needs to go in asap - reporting the opposite direction makes a terrible user experience. Fortunately this is only the conflict resolution code path.
Please rebase, merge, and cherry-pick into the 5.10 branch.
Issue
resolves #4374