Skip to content
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

New turn lanes conception #17421

Merged
merged 1 commit into from
Jun 16, 2023
Merged

New turn lanes conception #17421

merged 1 commit into from
Jun 16, 2023

Conversation

ivanPyrohivskyi
Copy link
Contributor

@ivanPyrohivskyi ivanPyrohivskyi commented Jun 14, 2023

Main issue #15930
Other issues #17238
#16752 (comment)

}};
Set<Integer> sharpRightDirections = new HashSet<Integer>(){{
add(TurnType.TSHR);
add(TurnType.TRU);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something could be wrong TRU = TU in data so it might not work as expected

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is compare with syntetic mainTurnType that calculated using angles. Just to know if we select right direction.

}
boolean left = TurnType.isLeftTurnNoUTurn(mainTurnType);
boolean right = TurnType.isRightTurnNoUTurn(mainTurnType);
Set<Integer> leftDirections = new HashSet<Integer>(){{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it needed if there are methods TurnType.isLeftTurnNoUTurn - too much copy / paste

}
}
TurnType t = TurnType.valueOf(tp, leftSide);
if (cnt == 3 && TurnType.isSlightTurn(t.getValue())) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here we need to add comment what 3 means

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
int[] uniqTurnTypes = getUniqTurnTypes(turnLanesPrevSegm);
for (int lane : uniqTurnTypes) {
if (lane == TurnType.TSHL || lane == TurnType.TSHR || lane == TurnType.TU || lane == TurnType.TRU) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same method as below could be added TurnType.sharpOrReverse(..)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants