Skip to content

Commit c2dc7e9

Browse files
Moritz Kobitzschdanpat
authored andcommitted
use enter + exit for roundabout instructions (#4358)
* Expose roundabout/rotary exit instructions as a new instruction type.
1 parent 0fc1aa2 commit c2dc7e9

24 files changed

+563
-1186
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# UNRELEASED
2-
- Changes from 5.11:
32
- Guidance
43
- now announcing turning onto oneways at the end of a road (e.g. onto dual carriageways)
4+
- Adds new instruction types at the exit of roundabouts and rotaries `exit roundabout` and `exit rotary`.
55
- HTTP:
66
- New query parameter for route/table/match/trip plugings:
77
`exclude=` that can be used to exclude certain classes (e.g. exclude=motorway, exclude=toll).

docs/http.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,8 @@ step.
668668
| `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). |
669669
| `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`. |
670670
| `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 |
671+
| `exit roundabout`| Describes a maneuver exiting a roundabout (usually preceeded by a `roundabout` instruction) |
672+
| `exit rotary` | Describes the maneuver exiting a rotary (large named roundabout) |
671673

672674
Please note that even though there are `new name` and `notification` instructions, the `mode` and `name` can change
673675
between all instructions. They only offer a fallback in case nothing else is to report.

features/car/classes.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,6 @@ Feature: Car - Mode flag
122122
| df | yes | motorway| | yes |
123123

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

features/car/side_bias.feature

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -47,32 +47,3 @@ Feature: Testbot - side bias
4747
| d | a | bd,ab,ab | 27s +-1 |
4848
# should be inverse of left hand bias
4949
| d | c | bd,bc,bc | 24s +-1 |
50-
51-
Scenario: Roundabout exit counting for left sided driving
52-
Given the profile file "testbot" initialized with
53-
"""
54-
profile.left_hand_driving = true
55-
profile.turn_bias = 1/1.075
56-
"""
57-
And a grid size of 10 meters
58-
And the node map
59-
"""
60-
a
61-
b
62-
h g c d
63-
e
64-
f
65-
"""
66-
And the ways
67-
| nodes | junction |
68-
| ab | |
69-
| cd | |
70-
| ef | |
71-
| gh | |
72-
| bcegb | roundabout |
73-
74-
When I route I should get
75-
| waypoints | route | turns |
76-
| a,d | ab,cd,cd | depart,roundabout turn left exit-1,arrive |
77-
| a,f | ab,ef,ef | depart,roundabout turn straight exit-2,arrive |
78-
| a,h | ab,gh,gh | depart,roundabout turn right exit-3,arrive |

features/guidance/anticipate-lanes.feature

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,8 @@ Feature: Turn Lane Guidance
553553
| fy | | primary | |
554554

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

559559
@anticipate
560560
Scenario: No Lanes for Roundabouts, see #2626
@@ -569,16 +569,16 @@ Feature: Turn Lane Guidance
569569
| nodes | turn:lanes:forward | highway | junction | name |
570570
| xb | slight_right\|slight_right | primary | | xb |
571571
| dy | | primary | | dy |
572-
| ab | | primary | roundabout | roundabout |
573-
| bc | | primary | roundabout | roundabout |
574-
| cd | left\|slight_right | primary | roundabout | roundabout |
575-
| da | | primary | roundabout | roundabout |
572+
| ab | | primary | roundabout | rotary |
573+
| bc | | primary | roundabout | rotary |
574+
| cd | left\|slight_right | primary | roundabout | rotary |
575+
| da | | primary | roundabout | rotary |
576576

577577
When I route I should get
578-
| waypoints | route | turns | lanes |
579-
| x,y | xb,dy,dy | depart,roundabout-exit-1,arrive | ,;, |
580-
| x,c | xb,roundabout,roundabout | depart,roundabout-exit-undefined,arrive | ,, |
581-
| x,a | xb,roundabout,roundabout | depart,roundabout-exit-undefined,arrive | ,;, |
578+
| waypoints | route | turns | lanes |
579+
| x,y | xb,dy,dy,dy | depart,rotary-exit-1,exit rotary right,arrive | ,,, |
580+
| x,c | xb,rotary,rotary | depart,rotary-exit-undefined,arrive | ,, |
581+
| x,a | xb,rotary,rotary | depart,rotary-exit-undefined,arrive | ,;, |
582582

583583
@anticipate
584584
Scenario: No Lanes for Roundabouts, see #2626
@@ -614,8 +614,8 @@ Feature: Turn Lane Guidance
614614
| fy | | primary | |
615615

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

620620
@anticipate
621621
Scenario: No Lanes for Roundabouts, see #2626
@@ -635,16 +635,16 @@ Feature: Turn Lane Guidance
635635
| nodes | turn:lanes:forward | highway | junction | name |
636636
| xb | slight_right\|slight_right | primary | | xb |
637637
| dy | | primary | | dy |
638-
| ab | | primary | roundabout | roundabout |
639-
| bc | | primary | roundabout | roundabout |
640-
| cd | left\|slight_right | primary | roundabout | roundabout |
641-
| da | | primary | roundabout | roundabout |
638+
| ab | | primary | roundabout | rotary |
639+
| bc | | primary | roundabout | rotary |
640+
| cd | left\|slight_right | primary | roundabout | rotary |
641+
| da | | primary | roundabout | rotary |
642642

643643
When I route I should get
644-
| waypoints | route | turns | lanes |
645-
| x,y | xb,dy,dy | depart,roundabout-exit-1,arrive | ,;, |
646-
| x,c | xb,roundabout,roundabout | depart,roundabout-exit-undefined,arrive | ,, |
647-
| x,a | xb,roundabout,roundabout | depart,roundabout-exit-undefined,arrive | ,;, |
644+
| waypoints | route | turns | lanes |
645+
| x,y | xb,dy,dy,dy | depart,rotary-exit-1,exit rotary right,arrive | ,,, |
646+
| x,c | xb,rotary,rotary | depart,rotary-exit-undefined,arrive | ,, |
647+
| x,a | xb,rotary,rotary | depart,rotary-exit-undefined,arrive | ,;, |
648648

649649
@anticipate @todo @2032
650650
Scenario: No Lanes for Roundabouts, see #2626

0 commit comments

Comments
 (0)