-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Refactor post-processing and add test for turn location #3495
Conversation
140de4e
to
dfe975d
Compare
// both angles are in the same direction, the total turn gets increased | ||
// | ||
// a ---- b | ||
// \ |
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.
Not really a code change, but for collapse_turns.cpp:61:9: warning: multi-line comment [-Wcomment]
it is possible to put a NO-BREAK SPACE character 0xA0 ' '. It will not be removed as a trailing white space, is invisible and suppresses the warning. The same for src/engine/guidance/post_processing.cpp:343:9: warning: multi-line comment [-Wcomment]
3d0524b
to
9df440f
Compare
Note: test case for collapsing away signage data is here #3097 - could potentially be included here. |
84e6e8c
to
e3f179c
Compare
| |'d._ | ||
| | 'e | ||
| |' d._ | ||
| | 'e | ||
j k |
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.
| a | g | abc,cde,efg,efg | cycling,cycling,cycling,cycling | 5 km/h | | ||
| b | f | abc,cde,efg,efg | cycling,cycling,cycling,cycling | 4 km/h | | ||
| a | g | abc,cde,efg,efg | cycling,cycling,cycling,cycling | 6 km/h | | ||
| b | f | abc,cde,efg,efg | cycling,cycling,cycling,cycling | 5 km/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.
longer ways -> better average speed
features/car/bridge.feature
Outdated
| c | e | cde,cde | driving,driving | 2 km/h | | ||
| e | c | cde,cde | driving,driving | 2 km/h | | ||
| from | to | route | modes | speed | | ||
| a | g | abc,cde,efg,efg | driving,driving,driving,driving | 12 km/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.
longer ways -> less impact of turn penalties -> better speed
| restriction | fg | gb | g | no_left_turn | | ||
| restriction | gb | bc | b | no_left_turn | | ||
| restriction | cf | fg | f | no_left_turn | | ||
| restriction | xb | xf | x | only_straight_on | |
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.
changed paradigm to more easily give correct turn restrictions
| a,d | horiz,horiz | true:90,false:0 true:60 true:90 true:180 false:270,false:0 true:90 false:180 false:270 true:300;true:270 | | ||
| j,h | vert,horiz,horiz | true:0;true:0 true:90 false:180 false:270 true:300,true:60 false:120 true:240 true:300,false:0 false:90 false:120 false:180 true:270;true:90 | | ||
| j,l | vert,vert | true:0,true:0 true:90 false:180 false:270 true:300,true:0 false:90 false:180 true:240 false:270;true:180 | | ||
| waypoints | route | intersections | |
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.
all due to the now correct turn restrictions
12e85b7
to
01f59ff
Compare
01f59ff
to
91e822d
Compare
4a528ab
to
abe2652
Compare
Rebased to fix the merge conflicts caused by merging #3628 but getting the following build errors locally with GCC 6:
|
abe2652
to
98f45ab
Compare
@@ -65,6 +65,11 @@ class SliproadHandler final : public IntersectionHandler | |||
const IntersectionViewData &first, | |||
const IntersectionViewData &second) const; | |||
|
|||
// check if no mode changes are involved | |||
bool allSameMode(const EdgeID in_road, |
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.
fixes a problem in sliproad handling, since we didn't check for this before
643e63e
to
b36af4a
Compare
} | ||
|
||
// Just like a link step, but shorter and no name restrictions. | ||
bool isCollapsableSegment(const RouteStep &step) |
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.
Carrying over from #3705 (review), the name of this function should be made a bit clearer.
@@ -55,7 +55,7 @@ bool isLinkroad(const RouteStep &pre_link_step, | |||
} | |||
|
|||
// Just like a link step, but shorter and no name restrictions. | |||
bool isCollapsableSegment(const RouteStep &step) | |||
bool isShortAndUndisturbed(const RouteStep &step) |
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.
Thanks!
14ba76d
to
8dfecda
Compare
8dfecda
to
524b107
Compare
@daniel-j-h @oxidase was this reviewed? |
No. |
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.
LGTM! But i have doubts in using distance measure to suppress names: 105 for a car is ~ 6-8 seconds, but walking it will be ~ 1-2 minutes. Would it be possible to use duration in reduce_verbosity_if_possible
instead of NAME_SEGMENT_CUTOFF_LENGTH
after #77?
start assigning turn locations to test / further locations add locations/make roads not overlapping - staggered larger grid size for utf tests (new name)
- moves collapse into a dedicated set of functions / files - make collapse scenarios distinct (slight performance cost) - reduce verbosity for short name segments (now actually working, was supposed to do so before)
6684820
to
de82dee
Compare
@oxidase sure. distance is not the best measure here. The full guidance system is only reasonable for car as of now. So we need a complete overhaul here. |
Issue
Works towards #3158 and #3293
Tasklist
Requirements / Relations
Link any requirements here. Other pull requests this PR is based on?
Guide:
route
fieldlane processing
. Lane processing should not handle collapse functionality. Collapse should run after lane processing and consider lanes to decide if collapse is possible.locations
check as well, especially for collapse scenarios