-
Notifications
You must be signed in to change notification settings - Fork 660
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
Obvious maneuvers #2436
Obvious maneuvers #2436
Conversation
disabled turn channel for obvious maneuver
…vious_maneuvers
…vious_maneuvers
…vious_maneuvers
…vious_maneuvers
@@ -1297,6 +1300,24 @@ bool EnhancedTripLeg_Node::HasIntersectingEdgeCurrNameConsistency() const { | |||
return false; | |||
} | |||
|
|||
bool EnhancedTripLeg_Node::HasNonBackwardTraversableSameNameIntersectingEdge( |
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.
Can you add some comments on what this function does?
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.
@mandeepsandhu i added comments
@@ -2421,8 +2519,14 @@ void ManeuversBuilder::ProcessRoundaboutNames(std::list<Maneuver>& maneuvers) { | |||
// Process roundabout exit names and signs | |||
if (next_man->type() == DirectionsLeg_Maneuver_Type_kRoundaboutExit) { | |||
if (next_man->HasBeginStreetNames()) { | |||
curr_man->set_roundabout_exit_begin_street_names(next_man->begin_street_names().clone()); | |||
curr_man->set_roundabout_exit_street_names(next_man->street_names().clone()); | |||
if (next_man->contains_obvious_maneuver()) { |
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.
Any concerns that this will cause issues when we merge it with #2437 ?
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.
No issues
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.
@danpaz I tested - this looks good
Fixed the FormVerbalPostTransitionInstruction method for obvious maneuvers No default values for the test_instructions method
…vious_maneuvers
…vious_maneuvers
"Continue toward B1, Little Italy. Then You will arrive at your destination.", | ||
"Continue for 200 meters."); | ||
} | ||
// TODO: expand map for obvious maneuver |
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.
Is this still a TODO @dgearhart ?
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.
yes - I will update in separate PR
src/odin/maneuversbuilder.cc
Outdated
@@ -2369,6 +2397,76 @@ bool ManeuversBuilder::AreRampManeuversCombinable(std::list<Maneuver>::iterator | |||
return false; | |||
} | |||
|
|||
bool ManeuversBuilder::IsNextManeuverObvious(std::list<Maneuver>& maneuvers, |
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 think all the args can be const
refs? Or are we modifying them somewhere within (I couldn't find any place where we were, but I might've missed something)?
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.
made params const
|
||
// Return true if a short continue maneuver | ||
// and the following maneuver is not a continue | ||
if (next_man->length(Options_Units_kilometers) < kShortContinueThreshold) { |
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.
Could this function be called with next_man
pointing to the last/arrival maneuver? If so, should we return false
if next_next_man == maneuvers.end()
?
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.
next_man
must be a DirectionsLeg_Maneuver_Type_kContinue
@@ -0,0 +1,128 @@ | |||
#include "gurka.h" |
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.
Thank you for these tests! Its really easy to visualize how the continue collapsing is working! 🙏
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.
Just a few minor comments. Rest LGTM!
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.
👍 nice work!
Issue
Identify and collapse obvious maneuvers
Fixes #1744
Fixes #91
Fixes #82
Stats for 1k user routes
Example#1
Example#2
Example#3
Tasklist