377. Lane Departure
The lane_departure_checker monitors whether the vehicle maintains its lane throughout the simulation and detects any deviation that indicates the vehicle has crossed a lane boundary.
It continuously evaluates the vehicle's lateral position, orientation, and signaling behavior to determine when a lane departure occurs, ensuring that intentional maneuvers such as lane changes or turns are properly distinguished from unintended deviations.
When a lane departure is detected, the checker begins an interval during which it measures the vehicle's motion characteristics, including speed, acceleration, and distance from the lane boundary, and tracks how the event evolves over time. At the end of this interval, the checker classifies the outcome as return_to_lane, lane_change, timeout, or undefined_maneuver, depending on the vehicle's behavior after the initial lane departure.
377.0.1 Start condition
The interval starts when the vehicle begins to leave its lane and exceeds the leaving_lane_threshold. This threshold defines the distance from the crossed lane boundary to the vehicle's outermost edge, expressed as a percentage of the vehicle's width. Lane departure is based solely on the positions of the vehicle's front corners, so only the leading edge of the vehicle is considered when determining the start and end of the interval. The interval begins only if the vehicle's relative yaw angle exceeds the relative_yaw_threshold and the turn signal is inactive. Turn signal detection can be disabled during checker initialization by setting turn_signal_detection_enabled to false.
377.0.2 End condition
The interval can end under any of the following conditions:
- Return to lane: The vehicle is considered to have re-entered its lane when the portion of its width overlapping the adjacent lane falls below the threshold defined by the
re_entering_lane_thresholdparameter. This condition ends the interval with areturn_to_laneoutcome. - Lane change: The vehicle is considered to have completed a lane change when the portion of its width remaining within the original lane falls below the threshold defined by the
lane_change_thresholdparameter. This condition ends the interval with alane_changeoutcome. - Timeout: If the vehicle neither returns to its original lane nor completes a lane change within the period specified by the
lane_departure_timeout_thresholdparameter, the interval ends with atimeoutoutcome. - Undefined maneuver: If the vehicle performs an unexpected maneuver or the checker receives inconclusive data, the interval ends with an
undefined_maneuveroutcome.
377.1 Plot
The figure below illustrates the lane departure start condition.
The figure below illustrates the lane departure end condition.
377.2 Attributes
The following attributes define the behavior and characteristics of the evaluator.
| Checker attribute | Description |
|---|---|
| Parent object | vehicle.lane_departure |
| Issue category | sut or other |
| Issue kind | lane_departure |
| Default severity | warning |
| Trigger condition | Based on lane_departure watcher |
| Operation modes | lane_departure_checker |
377.3 Configuration parameters
The following parameters can be configured to customize the evaluator's behavior.
| Parameter | Type | Description | Default Value |
|---|---|---|---|
leaving_lane_threshold |
float | Percentage of the vehicle's width that must cross the lane boundary before the check is triggered. | 0.15 |
re_entering_lane_threshold |
float | Percentage of the vehicle's width that must remain in the adjacent lane to be considered a return_to_lane. | 0.05 |
lane_change_threshold |
float | Percentage of the vehicle's width that must remain in the original lane before it is considered a lane_change. | 0.05 |
lane_departure_timeout_threshold |
time | Maximum time allowed for the vehicle to either complete a lane change or return to its original lane. | 30s |
relative_yaw_threshold |
angle | Minimum relative yaw angle between the vehicle and the lane direction that triggers the start of a lane departure interval. | 0.2deg |
turn_signal_detection_enabled |
bool | Enables or disables turn signal detection. When enabled, the interval will not start if the vehicle's turn signal is active. When disabled, the interval starts regardless of the turn signal state. | true |
377.4 Metrics
The following metrics are recorded and tracked by the evaluator.
| Metric item | Unit / Type | Description |
|---|---|---|
min_speed |
kph | The vehicle's minimum speed during the interval |
max_speed |
kph | The vehicle's maximum speed during the interval |
min_lon_acceleration |
mpsps | The vehicle's minimum longitudinal acceleration during the interval |
max_lon_acceleration |
mpsps | The vehicle's maximum longitudinal acceleration during the interval |
interval_duration |
s | The duration of the interval |
vehicle_category |
enum (sedan, van, bus, box_truck, semi_trailer_truck, full_trailer_truck, motorcycle, bicycle) |
The vehicle's category |
is_valid_lane_position_at_interval |
Indicates if the vehicle has a valid lane position during the interval | |
side |
enum (left, right) |
The vehicle's movement direction during the interval |
end_condition |
enum (undefined_maneuver, return_to_lane, lane_change, timeout) |
The vehicle's end condition for the interval |
max_distance_to_lane |
m | The vehicle's maximum distance to the lane during the interval (If the vehicle did not return to the lane, the value is set to MAX_LENGTH) |
average_distance_to_lane |
m | The vehicle's average distance to the lane during the interval (If the vehicle did not return to the lane, the value is set to MAX_LENGTH) |
377.5 Log and Error Messages
| Output Condition | Description | Default Severity |
|---|---|---|
| After the interval ends, a warning is issued. | Vehicle left its lane for << lane_departure_checker.data.interval_duration >>. Outcome: << lane_departure_checker.data.end_condition >> |
Warning |
377.6 Additional information
Limitations
- The checker does not detect a lane departure if the vehicle drives toward an off-road area.
- The checker relies solely on data from the vehicle's front corners.
- The checker may fail to start the interval when the vehicle is in overlapping lanes (i.e., when lane geometry is shared), such as at a junction. In these cases, the checker cannot identify the departure lane, so the start condition is not triggered.
- The interval starts only when both
vehicle.stateandvehicle.prev_stateare available. - The start condition is evaluated only when the current lane has a valid driving lane index and the vehicle occupies that lane according to
get_occupied_driving_lanes(). undefined_maneuvercan be reported when the vehicle crosses more than one lane during the interval or when the checker cannot confirm a lane-change or return-to-lane condition.
Note
- Negative values for the start or end condition thresholds are not recommended. They should only be used intentionally and with caution, as they may lead to unreliable or meaningless results, particularly for wide vehicles and narrow lanes. It is recommended to limit both the start and end condition thresholds to a maximum of 50% (0.5) of the vehicle's width.