Skip to content

196. Slow Driving Checker

The slow_driving_checker detects situations where the Ego is driving significantly below the posted speed limit without a valid reason. It raises a flag when the Ego's speed drops below a configurable percentage of the speed limit or when the Ego maintains an unusually low speed without an apparent external cause.

This is particularly important for identifying cases where an autonomous driving system becomes overly cautious or fails to maintain appropriate speeds despite having a clearly defined speed limit.

196.0.1 Start condition

An interval starts when all the following conditions are met continuously for a configurable debounce duration:

  • A speed limit is defined for the current road segment, and it must be lower than the maximum representable speed.
  • The Ego's speed drops below the configured percentage threshold of the allowed speed limit, such as 75%.
  • The vehicle is driving at least a minimum absolute speed threshold, to avoid false positives when the vehicle is intentionally stopped or starting. For example, 5 km/h is the least minimum speed.
  • The Ego's longitudinal acceleration remains below a configurable maximum threshold, preventing false flags in situations where the vehicle is slow but already accelerating back to normal speed.
  • None of the justification conditions are met.

196.0.2 End condition

The interval ends when any one or more of the following conditions are met:

  • The Ego's speed returns above the threshold, calculated as (speed ≥ percentage_threshold × speed_limit + tolerance).
  • The Ego's speed drops below the minimum absolute speed threshold, indicating that the vehicle has stopped or is moving extremely slowly. For example, speed below 5km/h.
  • The Ego's longitudinal acceleration exceeds the maximum acceleration threshold plus tolerance for a configurable debounce duration, indicating that the vehicle is accelerating significantly. This prevents transient acceleration spikes from ending the interval prematurely.
  • The speed limit is no longer defined for the current road segment.
  • Any of the justification conditions are met during an active interval.

196.1 Attributes

The following attributes define the behavior and characteristics of the evaluator.

Checker attribute Description
Parent object vehicle.slow_driving
Issue category sut or other
Issue kind slow_driving
Default severity warning
Trigger condition Based on slow_driving watcher
Operation modes slow_driving_checker

196.2 Configuration parameters

The following parameters can be configured to customize the evaluator's behavior.

Parameter Type Unit Description Default Value Range
speed_limit_factor_threshold float Speed limit factor threshold - defines what percentage of speed limit is considered slow 0.75 [0.0, 1.0]
speed_limit_threshold_tolerance speed kph Absolute speed tolerance for end condition - adds hysteresis to prevent rapid on/off cycling 5kph [0, 100]kph
min_absolute_speed_threshold speed kph Minimum absolute speed threshold - filters out stopped vehicles to avoid false positives 5kph [0, 100]kph
debounce_start_time time s Minimum sustained slow driving duration before starting interval - prevents transient speed drops from triggering 0s [0, 30]s
max_acceleration_threshold acceleration mpsps Maximum longitudinal acceleration threshold - used for start condition justification 0.5mpsps [0, 30]mpsps
max_acceleration_threshold_tolerance acceleration mpsps Acceleration threshold tolerance for ending interval - end condition is max_acceleration_threshold + max_acceleration_threshold_tolerance 0.5mpsps [0, 30]mpsps
debounce_acceleration_end_time time s Debounce time for acceleration exceeded end condition - prevents transient acceleration spikes from ending interval 0s [0, 30]s
lat_acceleration_magnitude_threshold acceleration mpsps Lateral acceleration magnitude threshold - used to justify slow driving in curves 2.0mpsps [0, 30]mpsps
relevant_objects_detection_range length m Detection range for relevant objects - distance threshold for detecting vehicles, VRUs, and traffic lights 75m [0, 300]m
log_level enum (info_level, debug_level, trace_level) Log level for debugging output info_level
issue_severity enum (ignore, info, warning, error_continue, error, error_stop_now) Issue severity level for slow driving violations warning
enabled bool Whether the checker is enabled true

196.3 Metrics

The following metrics are recorded and tracked by the evaluator.

Metric Type Description Range Unit
speed_limit speed Speed limit at the start of the slow driving interval kph
speed_threshold speed Slow driving speed threshold at the start of the interval kph
end_reason enum (unknown, speed_below_minimum, speed_limit_undefined, speed_above_threshold, acceleration_exceeded, lateral_acceleration_exceeded, traffic_light_detected, stop_sign_detected, yield_sign_detected, turn_indicator_enabled, slow_vehicle_ahead, vru_or_object_detected, intersection_or_roundabout_detected, scenario_ended) Reason why the slow driving interval ended
min_speed speed Vehicle minimum speed during the slow driving interval kph
avg_speed speed Vehicle average speed during the slow driving interval kph
min_speed_limit_factor float Minimum speed as a factor of the speed limit during the interval
avg_speed_limit_factor float Average speed as a factor of the speed limit during the interval
speed_limit_factor_threshold float Speed limit factor threshold used for this interval
min_lon_acceleration acceleration Vehicle minimum longitudinal acceleration during the slow driving interval mpsps
max_lon_acceleration acceleration Vehicle maximum longitudinal acceleration during the slow driving interval mpsps
interval_duration time Duration of the interval s

196.4 Log and Error Messages

Output Condition Description Default Severity Action
After the interval ends (if interval started without justification) Slow driving: min speed slow_driving_checker.data.min_speed (below slow_driving_checker.data.speed_limit_factor_threshold * 100% of limit slow_driving_checker.data.speed_limit which is slow_driving_checker.data.speed_limit * slow_driving_checker.data.speed_limit_factor_threshold) | End reason: slow_driving_checker.data.end_reason Warning Investigate the vehicle's behaviour.

196.5 Usage

196.5.1 How to instantiate

The slow_driving_checker can be instantiated for any vehicle actor.

checker slow_driving_checker is slow_driving(vehicle: actor,
        speed_limit_factor_threshold: ftlx_global_eval_config.ego_slow_driving_checker_config.speed_limit_factor_threshold,
        speed_limit_threshold_tolerance: ftlx_global_eval_config.ego_slow_driving_checker_config.speed_limit_threshold_tolerance,
        min_absolute_speed_threshold: ftlx_global_eval_config.ego_slow_driving_checker_config.min_absolute_speed_threshold,
        debounce_start_time: ftlx_global_eval_config.ego_slow_driving_checker_config.debounce_start_time,
        max_acceleration_threshold: ftlx_global_eval_config.ego_slow_driving_checker_config.max_acceleration_threshold,
        max_acceleration_threshold_tolerance: ftlx_global_eval_config.ego_slow_driving_checker_config.max_acceleration_threshold_tolerance,
        debounce_acceleration_end_time: ftlx_global_eval_config.ego_slow_driving_checker_config.debounce_acceleration_end_time,
        lat_acceleration_magnitude_threshold: ftlx_global_eval_config.ego_slow_driving_checker_config.lat_acceleration_magnitude_threshold,
        relevant_objects_detection_range: ftlx_global_eval_config.ego_slow_driving_checker_config.relevant_objects_detection_range,
        log_level: ftlx_global_eval_config.ego_slow_driving_checker_config.log_level)

196.5.2 Set parameters at instantiation time

Pass parameters in the keep(...) binding at instantiation time, either from ftlx_global_eval_config or as explicit values.

checker slow_driving_checker is slow_driving(vehicle: sut.car):
        keep(speed_limit_factor_threshold == ftlx_global_eval_config.ego_slow_driving_checker_config.speed_limit_factor_threshold)
        keep(speed_limit_threshold_tolerance == 5kph)
        keep(min_absolute_speed_threshold == 5kph)
        keep(debounce_start_time == 0s)
        keep(max_acceleration_threshold == 0.5mpsps)
        keep(max_acceleration_threshold_tolerance == 0.5mpsps)
        keep(debounce_acceleration_end_time == 0s)
        keep(lat_acceleration_magnitude_threshold == 2.0mpsps)
        keep(relevant_objects_detection_range == 75m)
        keep(log_level == ftlx_global_eval_config.ego_slow_driving_checker_config.log_level)

196.5.3 Define and use a custom parameter set

Define a slow_driving_checker_config struct to customize the checker's parameters:

const custom_slow_driving_checker_config: slow_driving_checker_config = new
set custom_slow_driving_checker_config.speed_limit_factor_threshold = 0.75
set custom_slow_driving_checker_config.speed_limit_threshold_tolerance = 5kph
set custom_slow_driving_checker_config.min_absolute_speed_threshold = 5kph
set custom_slow_driving_checker_config.debounce_start_time = 0s
set custom_slow_driving_checker_config.max_acceleration_threshold = 0.5mpsps
set custom_slow_driving_checker_config.max_acceleration_threshold_tolerance = 0.5mpsps
set custom_slow_driving_checker_config.debounce_acceleration_end_time = 0s
set custom_slow_driving_checker_config.lat_acceleration_magnitude_threshold = 2.0mpsps
set custom_slow_driving_checker_config.relevant_objects_detection_range = 75m
set custom_slow_driving_checker_config.log_level = trace_level
Then pass the struct value to the checker at instantiation:
checker custom_slow_driving_checker is slow_driving(vehicle: sut.car,
        speed_limit_factor_threshold: custom_slow_driving_checker_config.speed_limit_factor_threshold,
        speed_limit_threshold_tolerance: custom_slow_driving_checker_config.speed_limit_threshold_tolerance,
        min_absolute_speed_threshold: custom_slow_driving_checker_config.min_absolute_speed_threshold,
        debounce_start_time: custom_slow_driving_checker_config.debounce_start_time,
        max_acceleration_threshold: custom_slow_driving_checker_config.max_acceleration_threshold,
        max_acceleration_threshold_tolerance: custom_slow_driving_checker_config.max_acceleration_threshold_tolerance,
        debounce_acceleration_end_time: custom_slow_driving_checker_config.debounce_acceleration_end_time,
        lat_acceleration_magnitude_threshold: custom_slow_driving_checker_config.lat_acceleration_magnitude_threshold,
        relevant_objects_detection_range: custom_slow_driving_checker_config.relevant_objects_detection_range,
        log_level: custom_slow_driving_checker_config.log_level)

196.5.4 Disabling the checker

To disable the checker, set the enabled flag to false in the slow_driving_checker_config struct:

const slow_driving_checker_config: slow_driving_checker_config = new
set slow_driving_checker_config.enabled = false

196.6 Additional information

All parameters are required, but you don't need to customize all of them. For any parameter you don't customize with set, the default value defined in slow_driving_checker_config is used.

196.6.1 Justification conditions for slow_driving_checker

The checker is not triggered, or an active interval ends, when any of the following conditions are met:

  • High lateral acceleration: The magnitude of lateral acceleration is above a configurable threshold, indicating that the vehicle is driving through a curve where higher speeds may not be safe.
  • Slow vehicle ahead: Any vehicle ahead of the Ego, traveling in the same direction in any lane, within the configurable detection range relevant_objects_detection_range with a default value of 75m, is driving below the speed threshold (speed_limit × speed_limit_factor_threshold).
  • Pedestrian/VRU/Object detected: Pedestrians or vulnerable road users (VRUs) are detected nearby within the configurable detection range relevant_objects_detection_range with a default value of 75m using Euclidean distance.
  • Traffic light detected: A traffic light is detected within the configurable detection range relevant_objects_detection_range with a default value of 75m.
  • Stop sign detected: A stop sign is detected on the route within the configurable detection range relevant_objects_detection_range with a default value of 75m.
  • Yield sign detected: A yield sign is detected on the route within the configurable detection range relevant_objects_detection_range with a default value of 75m.
  • Turn indicator enabled: The Ego's turn indicator, either left or right, is enabled, indicating preparation for or execution of a lane change or turn.
  • Intersection or roundabout detected: An intersection or roundabout element (internal road, roundabout entry/exit) is detected ahead on the planned route within the configurable detection range relevant_objects_detection_range with a default value of 75m.
Figure 1: Slow driving justification conditions

196.6.2 Justification detection for slow_driving_checker

Justification checks run continuously:

  • Before interval starts: If justification is present, no interval is started
  • During active interval: If justification is found (even during hysteresis gap), the interval ends immediately with the specific end_reason corresponding to the justification type: lateral_acceleration_exceeded, slow_vehicle_ahead, traffic_light_detected, stop_sign_detected, yield_sign_detected, turn_indicator_enabled, vru_or_object_detected, or intersection_or_roundabout_detected

This ensures the checker is responsive to changing conditions throughout the entire monitoring period. The end_reason field in the metrics records the specific reason why the interval ended, allowing for detailed analysis of slow driving scenarios. When the vehicle drives significantly below the speed limit without any valid justification, an interval is triggered and a warning is issued.

Figure 2: Slow driving warning without justification conditions

196.7 Implementation details for slow_driving_checker

196.7.1 Hysteresis (Flicker Prevention)

Hysteresis creates a dead zone to prevent interval flickering during minor fluctuations.

- Speed: Starts when speed falls below threshold; ends only when speed exceeds threshold plus a tolerance buffer.
- Acceleration: Starts below threshold; ends when acceleration exceeds threshold plus tolerance for a specific duration.

196.7.2 Debounce (Stability Logic)

- Start Debounce: Slow driving must persist for `debounce_start_time` to trigger an interval, filtering out brief hesitations.
- End Debounce: Acceleration must stay above the limit for `debounce_acceleration_end_time` to close an interval, filtering out transient spikes.