Skip to content

Commit

Permalink
use enter + exit for roundabout instructions (#4358)
Browse files Browse the repository at this point in the history
* Expose roundabout/rotary exit instructions as a new instruction type.
  • Loading branch information
Moritz Kobitzsch authored and danpat committed Sep 5, 2017
1 parent 0fc1aa2 commit c2dc7e9
Show file tree
Hide file tree
Showing 24 changed files with 563 additions and 1,186 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# UNRELEASED
- Changes from 5.11:
- Guidance
- now announcing turning onto oneways at the end of a road (e.g. onto dual carriageways)
- Adds new instruction types at the exit of roundabouts and rotaries `exit roundabout` and `exit rotary`.
- HTTP:
- New query parameter for route/table/match/trip plugings:
`exclude=` that can be used to exclude certain classes (e.g. exclude=motorway, exclude=toll).
Expand Down
2 changes: 2 additions & 0 deletions docs/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,8 @@ step.
| `rotary` | a traffic circle. While very similar to a larger version of a roundabout, it does not necessarily follow roundabout rules for right of way. It can offer `rotary_name` and/or `rotary_pronunciation` parameters (located in the RouteStep object) in addition to the `exit` parameter (located on the StepManeuver object). |
| `roundabout turn`| Describes a turn at a small roundabout that should be treated as normal turn. The `modifier` indicates the turn direciton. Example instruction: `At the roundabout turn left`. |
| `notification` | not an actual turn but a change in the driving conditions. For example the travel mode or classes. If the road takes a turn itself, the `modifier` describes the direction |
| `exit roundabout`| Describes a maneuver exiting a roundabout (usually preceeded by a `roundabout` instruction) |
| `exit rotary` | Describes the maneuver exiting a rotary (large named roundabout) |

Please note that even though there are `new name` and `notification` instructions, the `mode` and `name` can change
between all instructions. They only offer a fallback in case nothing else is to report.
Expand Down
4 changes: 2 additions & 2 deletions features/car/classes.feature
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,6 @@ Feature: Car - Mode flag
| df | yes | motorway| | yes |

When I route I should get
| from | to | route | turns | classes |
| a | f | ab,df,df | depart,roundabout-exit-2,arrive | [()],[(),(motorway),(toll,motorway)],[()] |
| from | to | route | turns | classes |
| a | f | ab,df,df,df | depart,roundabout-exit-2,exit roundabout slight right,arrive | [()],[(),(motorway)],[(toll,motorway)],[()] |

29 changes: 0 additions & 29 deletions features/car/side_bias.feature
Original file line number Diff line number Diff line change
Expand Up @@ -47,32 +47,3 @@ Feature: Testbot - side bias
| d | a | bd,ab,ab | 27s +-1 |
# should be inverse of left hand bias
| d | c | bd,bc,bc | 24s +-1 |

Scenario: Roundabout exit counting for left sided driving
Given the profile file "testbot" initialized with
"""
profile.left_hand_driving = true
profile.turn_bias = 1/1.075
"""
And a grid size of 10 meters
And the node map
"""
a
b
h g c d
e
f
"""
And the ways
| nodes | junction |
| ab | |
| cd | |
| ef | |
| gh | |
| bcegb | roundabout |

When I route I should get
| waypoints | route | turns |
| a,d | ab,cd,cd | depart,roundabout turn left exit-1,arrive |
| a,f | ab,ef,ef | depart,roundabout turn straight exit-2,arrive |
| a,h | ab,gh,gh | depart,roundabout turn right exit-3,arrive |
40 changes: 20 additions & 20 deletions features/guidance/anticipate-lanes.feature
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,8 @@ Feature: Turn Lane Guidance
| fy | | primary | |

When I route I should get
| waypoints | route | turns | lanes |
| a,h | ab,gh,gh | depart,roundabout-exit-5,arrive | ,;;;;;, |
| waypoints | route | turns | lanes |
| a,h | ab,gh,gh,gh | depart,roundabout-exit-5,exit roundabout right,arrive | ,;;;;,, |

@anticipate
Scenario: No Lanes for Roundabouts, see #2626
Expand All @@ -569,16 +569,16 @@ Feature: Turn Lane Guidance
| nodes | turn:lanes:forward | highway | junction | name |
| xb | slight_right\|slight_right | primary | | xb |
| dy | | primary | | dy |
| ab | | primary | roundabout | roundabout |
| bc | | primary | roundabout | roundabout |
| cd | left\|slight_right | primary | roundabout | roundabout |
| da | | primary | roundabout | roundabout |
| ab | | primary | roundabout | rotary |
| bc | | primary | roundabout | rotary |
| cd | left\|slight_right | primary | roundabout | rotary |
| da | | primary | roundabout | rotary |

When I route I should get
| waypoints | route | turns | lanes |
| x,y | xb,dy,dy | depart,roundabout-exit-1,arrive | ,;, |
| x,c | xb,roundabout,roundabout | depart,roundabout-exit-undefined,arrive | ,, |
| x,a | xb,roundabout,roundabout | depart,roundabout-exit-undefined,arrive | ,;, |
| waypoints | route | turns | lanes |
| x,y | xb,dy,dy,dy | depart,rotary-exit-1,exit rotary right,arrive | ,,, |
| x,c | xb,rotary,rotary | depart,rotary-exit-undefined,arrive | ,, |
| x,a | xb,rotary,rotary | depart,rotary-exit-undefined,arrive | ,;, |

@anticipate
Scenario: No Lanes for Roundabouts, see #2626
Expand Down Expand Up @@ -614,8 +614,8 @@ Feature: Turn Lane Guidance
| fy | | primary | |

When I route I should get
| waypoints | route | turns | lanes |
| a,h | ab,ch,ch | depart,roundabout-exit-5,arrive | ,;;;;;, |
| waypoints | route | turns | lanes |
| a,h | ab,ch,ch,ch | depart,roundabout-exit-5,exit roundabout left,arrive | ,;;;;,, |

@anticipate
Scenario: No Lanes for Roundabouts, see #2626
Expand All @@ -635,16 +635,16 @@ Feature: Turn Lane Guidance
| nodes | turn:lanes:forward | highway | junction | name |
| xb | slight_right\|slight_right | primary | | xb |
| dy | | primary | | dy |
| ab | | primary | roundabout | roundabout |
| bc | | primary | roundabout | roundabout |
| cd | left\|slight_right | primary | roundabout | roundabout |
| da | | primary | roundabout | roundabout |
| ab | | primary | roundabout | rotary |
| bc | | primary | roundabout | rotary |
| cd | left\|slight_right | primary | roundabout | rotary |
| da | | primary | roundabout | rotary |

When I route I should get
| waypoints | route | turns | lanes |
| x,y | xb,dy,dy | depart,roundabout-exit-1,arrive | ,;, |
| x,c | xb,roundabout,roundabout | depart,roundabout-exit-undefined,arrive | ,, |
| x,a | xb,roundabout,roundabout | depart,roundabout-exit-undefined,arrive | ,;, |
| waypoints | route | turns | lanes |
| x,y | xb,dy,dy,dy | depart,rotary-exit-1,exit rotary right,arrive | ,,, |
| x,c | xb,rotary,rotary | depart,rotary-exit-undefined,arrive | ,, |
| x,a | xb,rotary,rotary | depart,rotary-exit-undefined,arrive | ,;, |

@anticipate @todo @2032
Scenario: No Lanes for Roundabouts, see #2626
Expand Down
Loading

0 comments on commit c2dc7e9

Please sign in to comment.