Feature: Maintain driving speed according to regulation#
Ensures that ego is able to limit its driving speed based on the road regulations. This is required for ego to follow the law.
Scenario Outline: Update driving speed when a entering a lower speed limit section#
Confirm that ego is able to adjust its speed before entering the new regulation area and avoid law infringements.
- Given a road section with speed limit
- And Ego is driving at a velocity
, smaller or equal to
- When Ego approaches a road area with new speed limitation
, below the current ego speed - Then Ego starts decelerating to match the new speed limit
- And Ego drives continuously at all times
- And Ego keeps its deceleration rate slower than
at all times
Examples:#
| 70 km/h | 70 km/h | 60 km/h | -1.5 m/s^2 |
| 90 km/h | 100 km/h | 80 km/h | -1.5 m/s^2 |
| 100 km/h | 110 km/h | 80 km/h | -1.5 m/s^2 |
Scenario Outline: Update driving speed when a entering a higher speed limit section#
Confirm that ego is able to adjust its speed when entering the new regulation area
- Given a road section with speed limit
- And Ego is driving at a velocity restricted to
- When Ego approaches a road area with new speed limitation
, higher than the current one - Then Ego starts accelerating to match the lowest value between the new speed limit
and Ego's intended driving speed - And Ego drives continuously at all times
Examples:#
| 90 km/h | 70 km/h | 80 km/h |
| 110 km/h | 80 km/h | 120 km/h |
| 120 km/h | 110 km/h | 120 km/h |