-
Notifications
You must be signed in to change notification settings - Fork 661
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
Enhanced fork assignment logic #1912
Conversation
Enhanced ramp fork determination Collapse straight ramps
@@ -1243,6 +1243,21 @@ void ManeuversBuilder::SetManeuverType(Maneuver& maneuver, bool none_type_allowe | |||
LOG_TRACE("ManeuverType=RAMP_STRAIGHT"); | |||
break; | |||
} | |||
case Maneuver::RelativeDirection::KReverse: { |
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 was to compensate for bad data
@@ -1645,6 +1660,10 @@ bool ManeuversBuilder::CanManeuverIncludePrevEdge(Maneuver& maneuver, int node_i | |||
return false; | |||
} | |||
if (maneuver.ramp() && prev_edge->IsRampUse()) { | |||
// Do not combine if ramp to ramp is not forward |
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.
to make sure we call out a ramp-to-ramp turn
|
||
// If node is fork | ||
// and prev to curr edge is relative straight | ||
if (node->fork() && ((turn_degree > 315) || (turn_degree < 45))) { | ||
// and the intersecting edge count is less than 3 |
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.
improved logic for fork determination - to remove the invalid forks
@@ -2195,7 +2220,8 @@ bool ManeuversBuilder::AreRampManeuversCombinable(std::list<Maneuver>::iterator | |||
auto node = trip_path_->GetEnhancedNode(next_man->begin_node_index()); | |||
if (!node->HasTraversableOutboundIntersectingEdge(next_man->travel_mode()) || | |||
node->IsStraightestTraversableIntersectingEdgeReversed(curr_man->end_heading(), | |||
next_man->travel_mode())) { | |||
next_man->travel_mode()) || |
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.
collapse straight ramps
Issue
Currently, there are instances where invalid fork instructions are produced or a ramp-to-ramp turn is missed.
Logic was added to do the following:
Improved 11% of the sample routes
Example
Tasklist