don't assign lanes on delayed turns
This commit is contained in:
parent
af47252efe
commit
b6dbf81206
@ -5,9 +5,7 @@ Feature: Turn Lane Guidance
|
||||
Given the profile "car"
|
||||
Given a grid size of 3 meters
|
||||
|
||||
#requires https://github.com/cucumber/cucumber-js/issues/417
|
||||
#Due to this, we use & as a pipe character. Switch them out for \| when 417 is fixed
|
||||
@bug @WORKAROUND-FIXME
|
||||
@sliproads
|
||||
Scenario: Separate Turn Lanes
|
||||
Given the node map
|
||||
| | | | | | | | e | |
|
||||
@ -36,86 +34,7 @@ Feature: Turn Lane Guidance
|
||||
| a,g | in,straight,straight | depart,new name straight,arrive | ,left:false straight:true right:false, |
|
||||
| a,f | in,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true, |
|
||||
|
||||
@TODO @2650 @bug
|
||||
Scenario: Sliproad with through lane
|
||||
Given the node map
|
||||
| | | | | | | | | | f | | | |
|
||||
| | | | | | | | | | | | | |
|
||||
| | | | | | | | g | | | | | |
|
||||
| | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | e |
|
||||
| | | | | | | | | | | | | |
|
||||
| | | | | | | | | | d | | | |
|
||||
| a | | | | | | | | | | | | |
|
||||
| | | | | | b | | | | | | | |
|
||||
| | | | | | | | | | c | | | |
|
||||
| | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | |
|
||||
| | | | | h | | | | | i | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway | turn:lanes:forward |
|
||||
| ab | ghough | yes | |
|
||||
| bc | ghough | yes | through\|none |
|
||||
| bd | ghough | yes | none\|through |
|
||||
| de | ghough | yes | |
|
||||
| fgb | haight | yes | |
|
||||
| bh | haight | yes | left\|none |
|
||||
| fd | market | yes | |
|
||||
| dc | market | yes | |
|
||||
| ci | market | yes | |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | fgb | bd | b | no_left_turn |
|
||||
| restriction | fgb | bc | b | no_left_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,h | ghough,haight,haight | depart,turn right,arrive | |
|
||||
| a,i | ghough,market,market | depart,turn right,arrive | |
|
||||
| a,e | ghough,ghough,ghough | depart,continue slight left,arrive | |
|
||||
|
||||
@TODO @2650 @bug
|
||||
Scenario: Sliproad with through lane
|
||||
Given the node map
|
||||
| | | | | | | | f | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | g | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | e |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | d | | |
|
||||
| a | | | | | | | | | |
|
||||
| | | | | b | | | | | |
|
||||
| | | | | | | | c | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | h | | | | i | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway | turn:lanes:forward |
|
||||
| ab | ghough | yes | |
|
||||
| bc | ghough | yes | through\|none |
|
||||
| bd | ghough | yes | none\|through |
|
||||
| fgb | haight | yes | |
|
||||
| bh | haight | yes | left\|none |
|
||||
| fd | market | yes | |
|
||||
| dc | market | yes | |
|
||||
| ci | market | yes | |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | bd | dc | d | no_right_turn |
|
||||
| restriction | fgb | bd | b | no_left_turn |
|
||||
| restriction | fgb | bc | b | no_left_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,h | ghough,haight,haight | depart,turn right,arrive | |
|
||||
| a,i | ghough,market,market | depart,turn right,arrive | |
|
||||
| a,e | ghough,ghough,ghough | depart,continue slight left,arrive | |
|
||||
|
||||
@sliproads
|
||||
Scenario: Separate Turn Lanes
|
||||
Given the node map
|
||||
| | | | | | | | e | |
|
||||
@ -144,7 +63,7 @@ Feature: Turn Lane Guidance
|
||||
| a,g | in,straight,straight | depart,new name straight,arrive | ,left:false straight:true right:false, |
|
||||
| a,f | in,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true, |
|
||||
|
||||
@guidance @lanes @sliproads
|
||||
@sliproads
|
||||
Scenario: Separate Turn Lanes Next to other turns
|
||||
Given the node map
|
||||
| | | | | | | | e | |
|
||||
@ -184,3 +103,166 @@ Feature: Turn Lane Guidance
|
||||
| a,j | in,turn,other,other | depart,turn right,turn left,arrive | ,,left:true right:false, |
|
||||
| a,i | in,turn,other,other | depart,turn right,turn right,arrive | ,,left:false right:true, |
|
||||
|
||||
@todo @bug @2654 @none
|
||||
#https://github.com/Project-OSRM/osrm-backend/issues/2645
|
||||
#http://www.openstreetmap.org/export#map=19/52.56054/13.32152
|
||||
Scenario: Kurt-Schuhmacher-Damm
|
||||
Given the node map
|
||||
| | | | g | | f |
|
||||
| | | | | | |
|
||||
| j | | | h | | e |
|
||||
| | | | | | |
|
||||
| a | | | b | | c |
|
||||
| | | | i | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway | turn:lanes |
|
||||
| ab | | motorway_link | yes | left\|none\|right |
|
||||
| bc | | primary_link | yes | |
|
||||
| cd | ksd | secondary | yes | |
|
||||
| cef | ksd | primary | yes | |
|
||||
| hj | | motorway_link | yes | |
|
||||
| eh | | secondary_link | yes | |
|
||||
| gh | ksd | primary | yes | |
|
||||
| hbi | ksd | secondary | yes | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,f | ,ksd,ksd | depart,turn left,arrive | ,left:true none:true right:false, |
|
||||
| a,i | ,ksd,ksd | depart,turn right,arrive | ,left:false none:true right:true, |
|
||||
|
||||
@todo @bug @2650 @sliproads
|
||||
#market and haight in SF
|
||||
#http://www.openstreetmap.org/#map=19/37.77308/-122.42238
|
||||
Scenario: Through Street Crossing Mid-Turn
|
||||
Given the node map
|
||||
| | | | | | | | g | j | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | k | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | f |
|
||||
| | | | | | | | | e | |
|
||||
| | | | | | | | d | | |
|
||||
| | | | | | | | | | |
|
||||
| a | | | b | | | | | | |
|
||||
| | | | | | | | c | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | l | | | | | h | i | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway | turn:lanes:forward |
|
||||
| ab | ghough | secondary | yes | |
|
||||
| bc | ghough | secondary | yes | through\|through |
|
||||
| bd | ghough | secondary | yes | none\|through |
|
||||
| def | ghough | secondary | yes | |
|
||||
| gd | market | primary | yes | |
|
||||
| dc | market | primary | yes | |
|
||||
| ch | market | primary | yes | |
|
||||
| iej | market | primary | yes | |
|
||||
| gkb | haight | residential | yes | |
|
||||
| bl | haight | residential | yes | left\|none |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| relation | bd | dc | d | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,l | ghough,haight,haight | depart,turn right,arrive | ,none:false straight:false straight:false straight:true, |
|
||||
| a,h | ghough,market,market | depart,turn slight right,arrive | ,none:false straight:false straight:true straight:true, |
|
||||
| a,j | ghough,market,market | depart,turn left,arrive | ,none:true straight:false straight:false straight:false, |
|
||||
| a,f | ghough,ghough,ghough | depart,continue slight left,arrive | ,none:true straight:true straight:false straight:false, |
|
||||
|
||||
@todo @bug @2650 @sliproads
|
||||
#market and haight in SF
|
||||
#http://www.openstreetmap.org/#map=19/37.77308/-122.42238
|
||||
Scenario: Market/Haight without Through Street
|
||||
Given the node map
|
||||
| | | | | | | | g | j | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | f |
|
||||
| | | | | | | | | e | |
|
||||
| | | | | | | | d | | |
|
||||
| a | | | | | | b | c | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | l | | | h | i | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway | turn:lanes:forward |
|
||||
| ab | ghough | secondary | yes | |
|
||||
| bc | ghough | secondary | yes | through\|through |
|
||||
| bd | ghough | secondary | yes | none\|through |
|
||||
| def | ghough | secondary | yes | |
|
||||
| gd | market | primary | yes | |
|
||||
| dc | market | primary | yes | |
|
||||
| ch | market | primary | yes | |
|
||||
| iej | market | primary | yes | |
|
||||
| bl | haight | residential | yes | left\|none |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| relation | bd | dc | d | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,l | ghough,haight,haight | depart,turn right,arrive | ,none:false straight:false straight:false straight:true, |
|
||||
| a,h | ghough,market,market | depart,turn slight right,arrive | ,none:false straight:false straight:true straight:true, |
|
||||
| a,j | ghough,market,market | depart,turn left,arrive | ,none:true straight:false straight:false straight:false, |
|
||||
| a,f | ghough,ghough,ghough | depart,continue slight left,arrive | ,none:true straight:true straight:false straight:false, |
|
||||
|
||||
@todo @2650 @bug @sliproads
|
||||
#market and haight in SF
|
||||
#http://www.openstreetmap.org/#map=19/37.77308/-122.42238
|
||||
Scenario: Market/Haight without Through Street
|
||||
Given the node map
|
||||
| | | | | | | | g | j | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | f |
|
||||
| | | | | | | | | e | |
|
||||
| | | | | | | | d | | |
|
||||
| a | | | | | | b | c | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
| | | | | l | | | h | i | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway | turn:lanes:forward |
|
||||
| ab | ghough | secondary | yes | |
|
||||
| bc | ghough | secondary | yes | through\|through |
|
||||
| bd | ghough | secondary | yes | none\|through |
|
||||
| def | ghough | secondary | yes | |
|
||||
| gd | market | primary | yes | |
|
||||
| dc | market | primary | yes | |
|
||||
| ch | market | primary | yes | |
|
||||
| iej | market | primary | yes | |
|
||||
| bl | haight | residential | yes | left\|none |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,l | ghough,haight,haight | depart,turn right,arrive | ,none:false straight:false straight:false straight:true, |
|
||||
| a,h | ghough,market,market | depart,turn slight right,arrive | ,none:false straight:false straight:true straight:true, |
|
||||
| a,j | ghough,market,market | depart,turn left,arrive | ,none:true straight:false straight:false straight:false, |
|
||||
| a,f | ghough,ghough,ghough | depart,continue slight left,arrive | ,none:true straight:true straight:false straight:false, |
|
||||
|
@ -468,7 +468,7 @@ Feature: Turn Lane Guidance
|
||||
| bx | | primary | | abx |
|
||||
| bc | right\|right\|right\|right | primary | | bc |
|
||||
| cd | | primary | roundabout | cdefc |
|
||||
| de | slight_left\|slight_left&slight_left\|slight_right | primary | roundabout | cdefc |
|
||||
| de | slight_left\|slight_left\|slight_left\|slight_right | primary | roundabout | cdefc |
|
||||
| ef | left\|slight_right\|slight_right | primary | roundabout | cdefc |
|
||||
| fc | | primary | roundabout | cdefc |
|
||||
| ey | | primary | | ey |
|
||||
|
@ -758,8 +758,8 @@ Feature: Collapse
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name |
|
||||
| ab | | main |
|
||||
| bc | left\|through&through&through&right | main |
|
||||
| cd | left\|through&right | main |
|
||||
| bc | left\|through\|through\|through\|right | main |
|
||||
| cd | left\|through\|right | main |
|
||||
| de | | main |
|
||||
| cf | | off |
|
||||
| ch | | off |
|
||||
@ -781,8 +781,8 @@ Feature: Collapse
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name |
|
||||
| ab | | main |
|
||||
| bc | left\|through&through&through&right | main |
|
||||
| cd | left\|through&through&through&right | main |
|
||||
| bc | left\|through\|through\|through\|right | main |
|
||||
| cd | left\|through\|through\|through\|right | main |
|
||||
| de | | main |
|
||||
| cf | | off |
|
||||
| ch | | off |
|
||||
|
@ -5,7 +5,7 @@ Feature: Turn Lane Guidance
|
||||
Given the profile "car"
|
||||
Given a grid size of 20 meters
|
||||
|
||||
@bug
|
||||
@simple
|
||||
Scenario: Basic Turn Lane 3-way Turn with empty lanes
|
||||
Given the node map
|
||||
| a | | b | | c |
|
||||
@ -40,6 +40,7 @@ Feature: Turn Lane Guidance
|
||||
| a,c | in,straight,straight | depart,new name straight,arrive | ,straight:true right:false, |
|
||||
| a,d | in,right,right | depart,turn right,arrive | ,straight:false right:true, |
|
||||
|
||||
@simple
|
||||
Scenario: Basic Turn Lane 4-Way Turn
|
||||
Given the node map
|
||||
| | | e | | |
|
||||
@ -62,6 +63,7 @@ Feature: Turn Lane Guidance
|
||||
| d,e | right,left,left | depart,new name straight,arrive | ,left:false none:true, |
|
||||
| d,c | right,straight,straight | depart,turn right,arrive | ,left:false none:true, |
|
||||
|
||||
@simple @none
|
||||
Scenario: Basic Turn Lane 4-Way Turn using none
|
||||
Given the node map
|
||||
| | | e | | |
|
||||
@ -81,6 +83,7 @@ Feature: Turn Lane Guidance
|
||||
| a,d | in,right,right | depart,turn right,arrive | ,none:false right:true, |
|
||||
| a,e | in,left,left | depart,turn left,arrive | ,none:true right:false, |
|
||||
|
||||
@simple @reverse
|
||||
Scenario: Basic Turn Lane 4-Way With U-Turn Lane
|
||||
Given the node map
|
||||
| | | e | | |
|
||||
@ -103,6 +106,7 @@ Feature: Turn Lane Guidance
|
||||
|
||||
|
||||
#this next test requires decision on how to announce lanes for going straight if there is no turn
|
||||
@simple @psv @none
|
||||
Scenario: Turn with Bus-Lane
|
||||
Given the node map
|
||||
| a | | b | | c |
|
||||
@ -158,7 +162,7 @@ Feature: Turn Lane Guidance
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,d | road,turn,turn | depart,turn right,arrive | ,straight:false right:true, |
|
||||
|
||||
@PROFILE @LANES
|
||||
@simple @psv
|
||||
Scenario: Turn with Bus-Lane but without lanes
|
||||
Given the node map
|
||||
| a | | b | | c |
|
||||
@ -177,7 +181,7 @@ Feature: Turn Lane Guidance
|
||||
| a,c | road,road | depart,arrive |
|
||||
|
||||
#turn lanes are often drawn at the incoming road, even though the actual turn requires crossing the intersection first
|
||||
@todo @bug
|
||||
@todo @bug @collapse @partition-lanes
|
||||
Scenario: Turn Lanes at Segregated Road
|
||||
Given the node map
|
||||
| | | i | l | | |
|
||||
@ -222,6 +226,7 @@ Feature: Turn Lane Guidance
|
||||
| i,l | cross,cross,cross | depart,continue uturn,arrive | ,left:true straight:false, |
|
||||
|
||||
#copy of former case to prevent further regression
|
||||
@collapse @partition-lanes
|
||||
Scenario: Turn Lanes at Segregated Road
|
||||
Given the node map
|
||||
| | | i | l | | |
|
||||
@ -255,6 +260,7 @@ Feature: Turn Lane Guidance
|
||||
| i,j | cross,cross | depart,arrive | , |
|
||||
| i,l | cross,cross,cross | depart,continue uturn,arrive | ,left:true straight:false, |
|
||||
|
||||
@partition-lanes
|
||||
Scenario: Turn Lanes at Segregated Road
|
||||
Given the node map
|
||||
| | | g | f | | |
|
||||
@ -277,7 +283,7 @@ Feature: Turn Lane Guidance
|
||||
| a,j | road,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true, |
|
||||
|
||||
#this can happen due to traffic lights / lanes not drawn up to the intersection itself
|
||||
@2654
|
||||
@2654 @previous-lanes
|
||||
Scenario: Turn Lanes Given earlier than actual turn
|
||||
Given the node map
|
||||
| a | | b | c | | d |
|
||||
@ -296,7 +302,7 @@ Feature: Turn Lane Guidance
|
||||
| a,e | road,turn,turn | depart,turn right,arrive | ,none:false right:true, |
|
||||
| a,d | road,road | depart,arrive | , |
|
||||
|
||||
@2654
|
||||
@2654 @previous-lanes
|
||||
Scenario: Turn Lanes Given earlier than actual turn
|
||||
Given the node map
|
||||
| a | | b | c | d | | e | | f | g | h | | i |
|
||||
@ -319,6 +325,7 @@ Feature: Turn Lane Guidance
|
||||
| i,j | road,first-turn,first-turn | depart,turn left,arrive | ,left:true none:false, |
|
||||
| i,a | road,road | depart,arrive | , |
|
||||
|
||||
@previous-lanes
|
||||
Scenario: Passing a one-way street
|
||||
Given the node map
|
||||
| e | | | f | |
|
||||
@ -335,6 +342,7 @@ Feature: Turn Lane Guidance
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,f | road,turn,turn | depart,turn left,arrive | ,left:true straight:false, |
|
||||
|
||||
@partition-lanes
|
||||
Scenario: Passing a one-way street, partly pulled back lanes
|
||||
Given the node map
|
||||
| e | | | f | |
|
||||
@ -352,8 +360,10 @@ Feature: Turn Lane Guidance
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,f | road,turn,turn | depart,turn left,arrive | ,left:true straight;right:false, |
|
||||
| a,d | road,road,road | depart,use lane straight,arrive | ,left:false straight;right:true, |
|
||||
| a,g | road,right,right | depart,turn right,arrive | ,left:false straight;right:true, |
|
||||
|
||||
@partition-lanes @previous-lanes
|
||||
Scenario: Passing a one-way street, partly pulled back lanes, no through
|
||||
Given the node map
|
||||
| e | | | f |
|
||||
@ -373,7 +383,7 @@ Feature: Turn Lane Guidance
|
||||
| a,f | road,turn,turn | depart,turn left,arrive | ,left:true right:false, |
|
||||
| a,g | road,right,right | depart,turn right,arrive | ,left:false right:true, |
|
||||
|
||||
@todo @bug
|
||||
@todo @bug @partition-lanes @previous-lanes
|
||||
Scenario: Narrowing Turn Lanes
|
||||
Given the node map
|
||||
| | | | | g | |
|
||||
@ -396,6 +406,7 @@ Feature: Turn Lane Guidance
|
||||
| a,e | road,through,through | depart,new name straight,arrive | ,left:false straight:true right:false, |
|
||||
| a,f | road,right,right | depart,turn right,arrive | ,left:false straight:false right:true, |
|
||||
|
||||
@previous-lanes
|
||||
Scenario: Turn at a traffic light
|
||||
Given the node map
|
||||
| a | b | c | d |
|
||||
@ -417,7 +428,7 @@ Feature: Turn Lane Guidance
|
||||
| a,d | road,road | depart,arrive | , |
|
||||
| a,e | road,turn,turn | depart,turn right,arrive | ,straight:false right:true, |
|
||||
|
||||
@bug @todo
|
||||
@bug @todo @roundabout
|
||||
Scenario: Theodor Heuss Platz
|
||||
Given the node map
|
||||
| | | | i | o | | | l | |
|
||||
@ -454,6 +465,7 @@ Feature: Turn Lane Guidance
|
||||
| i,l | top,top-right-out,top-right-out | depart,roundabout-exit-4,arrive | ,slight left:true slight left;slight right:true slight right:false slight right:false, |
|
||||
| i,o | top,top,top | depart,roundabout-exit-5,arrive | ,, |
|
||||
|
||||
@sliproads
|
||||
Scenario: Turn Lanes Breaking up
|
||||
Given the node map
|
||||
| | | | g | |
|
||||
@ -466,7 +478,7 @@ Feature: Turn Lane Guidance
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | oneway | highway |
|
||||
| ab | road | left\|left\|through\|through\|right | yes | primary |
|
||||
| bd | road | through\|through | yes | primary |
|
||||
| bd | road | through\|through\|right | yes | primary |
|
||||
| bc | road | left\|left | yes | primary |
|
||||
| de | road | | yes | primary |
|
||||
| fd | cross | | | secondary |
|
||||
@ -484,6 +496,7 @@ Feature: Turn Lane Guidance
|
||||
| a,e | road,road | depart,arrive | , |
|
||||
|
||||
#NEEDS TO BE INVESTIGATED. Turn restriction shouldn't be here. See #2867
|
||||
@reverse @previous-lanes
|
||||
Scenario: U-Turn Road at Intersection
|
||||
Given the node map
|
||||
| | | | | | h | |
|
||||
@ -517,6 +530,7 @@ Feature: Turn Lane Guidance
|
||||
| a | i | 180,180 180,180 | road,road | depart,arrive | , |
|
||||
| b | a | 90,2 270,2 | road,road,road | depart,continue uturn,arrive | ,none:true straight:false right:false, |
|
||||
|
||||
@reverse
|
||||
Scenario: Segregated Intersection Merges With Lanes
|
||||
Given the node map
|
||||
| | | | | | | f |
|
||||
@ -541,7 +555,7 @@ Feature: Turn Lane Guidance
|
||||
| a,e | road,road,road | depart,turn uturn,arrive | ,left:true left:false left:false straight:false straight:false, |
|
||||
| a,g | road,straight,straight | depart,new name straight,arrive | ,left:false left:false left:false straight:true straight:true, |
|
||||
|
||||
@bug @todo
|
||||
@bug @todo @roundabout
|
||||
Scenario: Passing Through a Roundabout
|
||||
Given the node map
|
||||
| | | h | | g | | |
|
||||
@ -568,6 +582,7 @@ Feature: Turn Lane Guidance
|
||||
| i,j | left,bottom,bottom | depart,round-exit-1,arrive | ,0, |
|
||||
| i,k | left,right,right | depart,round-exit-2,arrive | ,1, |
|
||||
|
||||
@previous-lanes
|
||||
Scenario: Crossing Traffic Light
|
||||
Given the node map
|
||||
| a | | b | | c | | d |
|
||||
@ -588,6 +603,7 @@ Feature: Turn Lane Guidance
|
||||
| a,d | road,road | depart,arrive | , |
|
||||
| a,e | road,cross,cross | depart,turn slight right,arrive | ,straight:false straight:false straight;slight right:true slight right:true, |
|
||||
|
||||
@ramp
|
||||
Scenario: Highway Ramp
|
||||
Given the node map
|
||||
| a | | b | | c | | d |
|
||||
@ -626,6 +642,7 @@ Feature: Turn Lane Guidance
|
||||
| a,g | off,road,road | depart,turn_left,arrive | ,left:true right:false, |
|
||||
| a,h | | | |
|
||||
|
||||
@ramp
|
||||
Scenario: Off Ramp In a Turn
|
||||
Given the node map
|
||||
| a | | | | | | | | | | | |
|
||||
@ -644,6 +661,7 @@ Feature: Turn Lane Guidance
|
||||
| a,c | hwy,hwy | depart,arrive | , |
|
||||
| a,d | hwy,ramp,ramp | depart,off ramp slight right,arrive | ,straight:false straight:false slight right:true, |
|
||||
|
||||
@reverse
|
||||
Scenario: Reverse Lane in Segregated Road
|
||||
Given the node map
|
||||
| h | | | | | g | | | | | | f |
|
||||
@ -662,6 +680,7 @@ Feature: Turn Lane Guidance
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,h | road,road,road | depart,continue uturn,arrive | ,uturn:true straight:false straight:false,|
|
||||
|
||||
@reverse
|
||||
Scenario: Reverse Lane in Segregated Road with none
|
||||
Given the node map
|
||||
| h | | | | | g | | | | | | f |
|
||||
@ -680,6 +699,7 @@ Feature: Turn Lane Guidance
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,h | road,road,road | depart,continue uturn,arrive | ,uturn:true straight:false none:false, |
|
||||
|
||||
@reverse
|
||||
Scenario: Reverse Lane in Segregated Road with none, Service Turn Prior
|
||||
Given the node map
|
||||
| h | | | | | g | | | | | | f |
|
||||
@ -700,6 +720,7 @@ Feature: Turn Lane Guidance
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,h | road,road,road | depart,continue uturn,arrive | ,uturn:true straight:false none:false, |
|
||||
|
||||
@simple
|
||||
Scenario: Don't collapse everything to u-turn / too wide
|
||||
Given the node map
|
||||
| a | | b | | e |
|
||||
@ -719,6 +740,7 @@ Feature: Turn Lane Guidance
|
||||
| a,d | depart,continue right,turn right,arrive | road,road,road,road | ,straight:false right:true,, |
|
||||
| d,a | depart,continue left,turn left,arrive | road,road,road,road | ,left:true straight:false,, |
|
||||
|
||||
@simple
|
||||
Scenario: Merge Lanes Onto Freeway
|
||||
Given the node map
|
||||
| a | | | b | c |
|
||||
@ -733,7 +755,7 @@ Feature: Turn Lane Guidance
|
||||
| waypoints | turns | route | lanes |
|
||||
| d,c | depart,merge slight left,arrive | ramp,Hwy,Hwy | ,slight right:true slight right:true, |
|
||||
|
||||
@2654
|
||||
@2654 @simple
|
||||
Scenario: Fork on motorway links - don't fork on through but use lane
|
||||
Given the node map
|
||||
| i | | | | | a |
|
||||
@ -803,7 +825,7 @@ Feature: Turn Lane Guidance
|
||||
| waypoints | route | turns | lanes |
|
||||
| x,d | road,road | depart,arrive | , |
|
||||
|
||||
@partition
|
||||
@partition-lanes
|
||||
Scenario: Partitioned turn, Slight Curve
|
||||
Given the node map
|
||||
| | | f | | e |
|
||||
|
@ -22,6 +22,10 @@ struct TurnLaneData
|
||||
LaneID from;
|
||||
LaneID to;
|
||||
|
||||
// a temporary data entry that does not need to be assigned to an entry.
|
||||
// This is the case in situations that use partition and require the entry to perform the
|
||||
// one-to-one mapping.
|
||||
bool suppress_assignment;
|
||||
bool operator<(const TurnLaneData &other) const;
|
||||
};
|
||||
typedef std::vector<TurnLaneData> LaneDataVector;
|
||||
|
@ -125,9 +125,7 @@ class TurnLaneHandler
|
||||
Intersection handleSliproadTurn(Intersection intersection,
|
||||
const LaneDescriptionID lane_description_id,
|
||||
LaneDataVector lane_data,
|
||||
const Intersection &previous_intersection,
|
||||
const LaneDescriptionID &previous_lane_description_id,
|
||||
const LaneDataVector &previous_lane_data);
|
||||
const Intersection &previous_intersection);
|
||||
|
||||
// get the lane data for an intersection
|
||||
void extractLaneData(const EdgeID via_edge,
|
||||
|
@ -83,7 +83,9 @@ inline void print(const extractor::guidance::lanes::LaneDataVector &turn_lane_da
|
||||
std::cout << "\t" << entry.tag << "("
|
||||
<< extractor::guidance::TurnLaneType::toString(entry.tag)
|
||||
<< ") from: " << static_cast<int>(entry.from)
|
||||
<< " to: " << static_cast<int>(entry.to) << "\n";
|
||||
<< " to: " << static_cast<int>(entry.to)
|
||||
<< " Can Be Suppresssed: " << (entry.suppress_assignment ? "true" : "false")
|
||||
<< "\n";
|
||||
std::cout << std::flush;
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,8 @@ bool collapsable(const RouteStep &step, const RouteStep &next)
|
||||
const auto instruction_can_be_collapsed = isCollapsableInstruction(step.maneuver.instruction);
|
||||
|
||||
const auto is_use_lane = step.maneuver.instruction.type == TurnType::UseLane;
|
||||
const auto lanes_dont_change = step.maneuver.lanes == next.maneuver.lanes;
|
||||
const auto lanes_dont_change =
|
||||
step.intersections.front().lanes == next.intersections.front().lanes;
|
||||
|
||||
if (is_short_step && instruction_can_be_collapsed)
|
||||
return true;
|
||||
|
@ -118,7 +118,8 @@ LaneDataVector augmentMultiple(const std::size_t none_index,
|
||||
lane_data.push_back({tag_by_modifier[intersection[intersection_index]
|
||||
.turn.instruction.direction_modifier],
|
||||
lane_data[none_index].from,
|
||||
lane_data[none_index].to});
|
||||
lane_data[none_index].to,
|
||||
false});
|
||||
}
|
||||
}
|
||||
lane_data.erase(lane_data.begin() + none_index);
|
||||
|
@ -30,6 +30,7 @@ bool TurnLaneData::operator<(const TurnLaneData &other) const
|
||||
if (to > other.to)
|
||||
return false;
|
||||
|
||||
// the suppress-assignment flag is ignored, since it does not influence the order
|
||||
const constexpr TurnLaneType::Mask tag_by_modifier[] = {TurnLaneType::sharp_right,
|
||||
TurnLaneType::right,
|
||||
TurnLaneType::slight_right,
|
||||
@ -106,7 +107,7 @@ LaneDataVector laneDataFromDescription(TurnLaneDescription turn_lane_description
|
||||
// transform the map into the lane data vector
|
||||
LaneDataVector lane_data;
|
||||
for (const auto tag : lane_map)
|
||||
lane_data.push_back({tag.first, tag.second.first, tag.second.second});
|
||||
lane_data.push_back({tag.first, tag.second.first, tag.second.second, false});
|
||||
|
||||
std::sort(lane_data.begin(), lane_data.end());
|
||||
|
||||
@ -158,8 +159,8 @@ bool isSubsetOf(const LaneDataVector &subset_candidate, const LaneDataVector &su
|
||||
auto location = superset_candidate.begin();
|
||||
for (const auto entry : subset_candidate)
|
||||
{
|
||||
location =
|
||||
std::find_if(location, superset_candidate.end(), [entry](const TurnLaneData &lane_data) {
|
||||
location = std::find_if(
|
||||
location, superset_candidate.end(), [entry](const TurnLaneData &lane_data) {
|
||||
return lane_data.tag == entry.tag;
|
||||
});
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "util/simple_logger.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
@ -106,8 +107,6 @@ TurnLaneHandler::assignTurnLanes(const NodeID at, const EdgeID via_edge, Interse
|
||||
previous_lane_data,
|
||||
previous_description_id);
|
||||
|
||||
std::cout << "[turn lane] " << scenario_names[scenario] << std::endl;
|
||||
|
||||
if (scenario != TurnLaneHandler::NONE)
|
||||
(*count_called)++;
|
||||
|
||||
@ -132,9 +131,7 @@ TurnLaneHandler::assignTurnLanes(const NodeID at, const EdgeID via_edge, Interse
|
||||
return handleSliproadTurn(std::move(intersection),
|
||||
lane_description_id,
|
||||
std::move(lane_data),
|
||||
previous_intersection,
|
||||
previous_description_id,
|
||||
previous_lane_data);
|
||||
previous_intersection);
|
||||
case TurnLaneScenario::MERGE:
|
||||
return intersection;
|
||||
default:
|
||||
@ -295,7 +292,7 @@ TurnLaneHandler::deduceScenario(const NodeID at,
|
||||
// FIXME the lane to add depends on the side of driving/u-turn rules in the country
|
||||
if (!lane_data.empty() && canMatchTrivially(intersection, lane_data) &&
|
||||
is_missing_valid_u_turn && !hasTag(TurnLaneType::none, lane_data))
|
||||
lane_data.push_back({TurnLaneType::uturn, lane_data.back().to, lane_data.back().to});
|
||||
lane_data.push_back({TurnLaneType::uturn, lane_data.back().to, lane_data.back().to, false});
|
||||
|
||||
bool is_simple = isSimpleIntersection(lane_data, intersection);
|
||||
|
||||
@ -663,6 +660,8 @@ std::pair<LaneDataVector, LaneDataVector> TurnLaneHandler::partitionLaneData(
|
||||
if (lane == straightmost_tag_index)
|
||||
{
|
||||
augmentEntry(turn_lane_data[straightmost_tag_index]);
|
||||
// disable this turn for assignment if it is a -use lane only
|
||||
turn_lane_data[straightmost_tag_index].suppress_assignment = true;
|
||||
}
|
||||
|
||||
if (matched_at_first[lane])
|
||||
@ -674,7 +673,7 @@ std::pair<LaneDataVector, LaneDataVector> TurnLaneHandler::partitionLaneData(
|
||||
std::count(matched_at_second.begin(), matched_at_second.end(), true)) ==
|
||||
getNumberOfTurns(next_intersection))
|
||||
{
|
||||
TurnLaneData data = {TurnLaneType::straight, 255, 0};
|
||||
TurnLaneData data = {TurnLaneType::straight, 255, 0, true};
|
||||
augmentEntry(data);
|
||||
first.push_back(data);
|
||||
std::sort(first.begin(), first.end());
|
||||
@ -701,15 +700,12 @@ Intersection TurnLaneHandler::simpleMatchTuplesToTurns(Intersection intersection
|
||||
std::move(intersection), lane_data, node_based_graph, lane_description_id, id_map);
|
||||
}
|
||||
|
||||
Intersection
|
||||
TurnLaneHandler::handleSliproadTurn(Intersection intersection,
|
||||
Intersection TurnLaneHandler::handleSliproadTurn(Intersection intersection,
|
||||
const LaneDescriptionID lane_description_id,
|
||||
LaneDataVector lane_data,
|
||||
const Intersection &previous_intersection,
|
||||
const LaneDescriptionID &previous_lane_description_id,
|
||||
const LaneDataVector &previous_lane_data)
|
||||
const Intersection &previous_intersection)
|
||||
{
|
||||
const auto sliproad_index =
|
||||
const std::size_t sliproad_index =
|
||||
std::distance(previous_intersection.begin(),
|
||||
std::find_if(previous_intersection.begin(),
|
||||
previous_intersection.end(),
|
||||
|
@ -256,7 +256,8 @@ Intersection triviallyMatchLanesToTurns(Intersection intersection,
|
||||
BOOST_ASSERT(findBestMatch(lane_data[lane].tag, intersection) ==
|
||||
intersection.begin() + road_index);
|
||||
|
||||
if (TurnType::Suppressed == intersection[road_index].turn.instruction.type)
|
||||
if (TurnType::Suppressed == intersection[road_index].turn.instruction.type &&
|
||||
!lane_data[lane].suppress_assignment)
|
||||
intersection[road_index].turn.instruction.type = TurnType::UseLane;
|
||||
|
||||
matchRoad(intersection[road_index], lane_data[lane]);
|
||||
|
Loading…
Reference in New Issue
Block a user