35. Keep long distance and oncoming in path (KLD-L0)
The keep long distance (KLD-L0) matcher scenarios detect intervals where the Ego drives in lane while maintaining a safe gap to a vehicle contender that constrains forward progress.
Two variants are registered in the NVIDIA evaluation pipeline:
| Variant | Struct | Match label | Contender | Match criterion |
|---|---|---|---|---|
| **Same-lane ** | sut.ego_keep_long_distance |
keep_long_distance |
Same-lane lead vehicle | Time gap |
| Oncoming in path | sut.ego_keep_long_distance_with_oncoming_in_path |
keep_long_distance_with_oncoming_in_path |
Oncoming vehicle in path | Physical distance + oncoming heading |
Both variants are LogIQ C++ matcher scenarios that inherit from [ego_keep_long_distance_lane_following_matcher_base][ego-keep-long-distance-lane-following-matcher-base]. They complement the FTLX shadow scenario sut.keep_long_distance (defined in keep_long_distance_h.osc). Matcher structs use the sut.ego_* prefix to avoid compile-time redefinition conflicts with the FTLX scenario.
Pipeline registration: env/nvidia/evaluation_pipeline/config/all_scenarios.osc
35.1 Same-lane lead vehicle
Matcher location: $FTX/env/nvidia/nvdx_lib/matcher/ego_keep_long_distance/
The ego_keep_long_distance matcher detects intervals where the Ego drives in a lane behind a same-lane lead vehicle while maintaining a time gap between minimum_time_gap_threshold and maximum_time_gap_threshold. This distinguishes intentional long-distance following from close-proximity tailgating or standard vehicle-following behavior.
35.1.1 Actors
| Actor | Description | Type |
|---|---|---|
sut.car |
Vehicle under test (Ego) | vehicle |
vehicle_actor |
Same-lane lead vehicle ahead of the Ego | vehicle, cyclist, truck, emergency_vehicle, bus, motorcycle |
35.1.2 Matcher essence
The core interval (excluding padding) lasts at least minimum_time_gap_threshold. During the core interval:
Ego: The Ego drives in a lane at a speed ≥ ego_vehicle_min_moving_speed.
vehicle_actor: The vehicle_actor is ahead of the Ego in the same lane (nearest_on_lane), and moving at a speed ≥ lead_vehicle_min_moving_speed. The time gap from the Ego to the vehicle_actor stays within [minimum_time_gap_threshold..maximum_time_gap_threshold] throughout the interval.
35.1.2.1 Match modifiers (essence phase)
| Actor | Modifiers |
|---|---|
| Ego | speed, keep_lane |
| vehicle_actor | road (same road), on_road, nearest_on_lane (ahead), speed, keep_lane, position (time gap ahead) |
35.2 Oncoming vehicle in path
Scenario location: $FTX/env/nvidia/nvdx_lib/matcher/ego_keep_long_distance_with_oncoming_in_path/
The ego_keep_long_distance_with_oncoming_in_path matcher detects intervals where the Ego encounters an oncoming vehicle on a head-on closing trajectory and maintains a longitudinal distance from it (e.g., by stopping or slowing down early) until the vehicle is no longer in the Ego's path.
35.2.1 Actors
| Actor | Description | Type |
|---|---|---|
sut.car |
Vehicle under test (Ego) | vehicle |
vehicle_actor |
Oncoming vehicle in the Ego's path | vehicle, cyclist, truck, emergency_vehicle, bus, motorcycle |
35.2.2 Scenario essence
The core interval (excluding padding) lasts at least minimum_scenario_duration. During the core interval:
Ego: The Ego drives in a lane at a speed ≥ ego_vehicle_min_moving_speed.
vehicle_actor: The vehicle_actor is an oncoming vehicle moving at a speed ≥ oncoming_vehicle_min_speed with a heading within 160–200° relative to the Ego. The physical distance from the Ego to the oncoming vehicle stays within [minimum_distance_threshold..maximum_distance_threshold].
35.2.2.1 Match modifiers (essence phase)
| Actor | Modifiers |
|---|---|
| Ego | speed, keep_lane, oncoming, global_position (distance to oncoming vehicle) |
| Oncoming vehicle | on_road, speed, angles_within_range (160–200° vs Ego) |
Implementation detail
The global_position modifier is applied on sut.car.drive(), not on vehicle_actor.drive().
35.3 Parameters
Production defaults (from all_scenarios.osc).
35.3.1 Same lane path
| Parameter | Description | Default |
|---|---|---|
minimum_scenario_duration |
Minimum essence interval duration | 2s |
minimum_time_gap_threshold |
Minimum time gap to the lead vehicle throughout the interval | 2s |
maximum_time_gap_threshold |
Maximum time gap threshold beyond which the lead vehicle is ignored | 8s |
lead_vehicle_min_moving_speed |
Minimum lead-vehicle speed to qualify as a contender | 1kph |
same_road_limit |
How long the lead vehicle must have been on the Ego's road at interval start | 10s |
min_padding_duration |
Minimum time buffer added to the start and end of a mined scenario clip | 0s |
max_padding_duration |
Maximum time buffer allowed for a mined scenario clip | 3s |
ego_vehicle_min_moving_speed |
Speed threshold above which the Ego is considered actively moving | 1kph |
lane_departure_threshold |
Maximum lateral distance the Ego can cross a lane line before a departure triggers | 1m |
Regression tests may use relaxed thresholds (for example minimum_time_gap_threshold: 0.1s) when matching available clips.
35.3.2 Oncoming in path
| Parameter | Description | Default |
|---|---|---|
minimum_scenario_duration |
Minimum essence interval duration | 2s |
minimum_distance_threshold |
Closest allowed distance; any closer is treated as a near-collision | 5m |
maximum_distance_threshold |
Farthest allowed distance; any farther is too far to match | 100m |
oncoming_vehicle_min_speed |
Minimum oncoming-vehicle speed to qualify as a contender | 1kph |
min_padding_duration |
Minimum time buffer added to the start and end of a mined scenario clip | 0s |
max_padding_duration |
Maximum time buffer allowed for a mined scenario clip | 3s |
ego_vehicle_min_moving_speed |
Speed threshold above which the Ego is considered actively moving | 1kph |
lane_departure_threshold |
Maximum lateral distance the Ego can cross a lane line before a departure triggers | 1m |
35.4 Regression tests
| Test | Variant | Clip | Expected |
|---|---|---|---|
keep_long_distance1_nv_test |
Same-lane | Urban clip interval_interval_1728064794097700_1728064802097700 |
One same-lane match interval |
keep_long_distance_with_oncoming_in_path2_nv_test |
Oncoming in path | Generative oncoming highway clip (generative_data_tests/oncoming_vehicle) |
One oncoming-in-path match interval (~11.7s–21.1s) |
Test scripts:
- Same-lane :
$FTX/qa/regression/mfr/tests/nvidia/keep_long_distance/keep_long_distance1.sh - Oncoming in path:
$FTX/qa/regression/mfr/tests/nvidia/keep_long_distance_with_oncoming_in_path/keep_long_distance_with_oncoming_in_path2.sh
35.5 Metrics
35.5.1 Same-lane coverage
[Click] Coverage items defined in sut.ego_keep_long_distance
| Item | Description | Range | Unit/Type |
|---|---|---|---|
min_time_gap_to_lead_vehicle |
Minimum time gap from the Ego to the lead vehicle during the interval | [0..5), every: 0.5 | s |
min_distance_to_lead_vehicle |
Minimum physical distance from the Ego to the lead vehicle during the interval | [0..150), every: 15 | m |
[Click] Coverage items inherited from sut.logiq_base_lane_following_scenario
| Item | Description | Range | Unit/Type |
|---|---|---|---|
ego_min_distance_to_vehicle |
Minimum distance gap throughout the scenario | (config default range) | m |
35.5.2 Same-lane KPIs and records
[Click] Records defined in sut.ego_keep_long_distance
| Item | Description | Unit/Type |
|---|---|---|
ego_speed_at_kld_end |
Ego speed at end of the KLD essence phase | speed |
ego_avg_speed_during_kld |
Ego average speed during the KLD interval | speed |
ego_max_speed_during_kld |
Ego maximum speed during the KLD interval | speed |
ego_min_speed_during_kld |
Ego minimum speed during the KLD interval | speed |
ego_max_lon_acceleration_during_kld |
Ego maximum longitudinal acceleration during the KLD interval | acceleration |
ego_min_lon_acceleration_during_kld |
Ego minimum longitudinal acceleration during the KLD interval | acceleration |
[Click] Records inherited from sut.logiq_base_scenario and sut.logiq_base_vehicle_scenario (Same-lane )
| Item | Description | Unit/Type |
|---|---|---|
ego_speed_at_start |
Ego speed at interval start | speed |
ego_max_speed / ego_min_speed / ego_avg_speed |
Ego speed statistics over the interval | speed |
ego_max_lon_acceleration / ego_min_lon_acceleration |
Ego acceleration statistics | acceleration |
ego_distance_traveled_during_interval |
Total Ego distance during the interval | m |
interval_duration |
Interval duration | s |
vehicle_speed_at_start |
Lead vehicle speed at start | speed |
vehicle_avg_speed / vehicle_max_speed / vehicle_min_speed |
Lead vehicle speed statistics | speed |
vehicle_max_lon_acceleration / vehicle_min_lon_acceleration |
Lead vehicle acceleration statistics | acceleration |
ego_min_ttc_to_vehicle / ego_min_mttc_to_vehicle |
Minimum TTC / MTTC to lead vehicle | time |
vehicle_object_kind |
Lead vehicle object kind | enum |
vehicle_tracking_id |
Lead vehicle tracking ID from object list | string |
35.5.3 Oncoming in path coverage
[Click] Coverage items defined in sut.ego_keep_long_distance_with_oncoming_in_path
| Item | Description | Range | Unit/Type |
|---|---|---|---|
min_distance_to_oncoming_vehicle |
Minimum physical distance from Ego to the oncoming vehicle during the interval | [0..150), every: 15 | m |
[Click] Coverage items inherited from sut.logiq_base_lane_following_scenario (oncoming in path)
| Item | Description | Range | Unit/Type |
|---|---|---|---|
ego_min_distance_to_vehicle |
Minimum distance gap throughout the scenario | (config default range) | m |
35.5.4 Oncoming in path KPIs and records
[Click] Records defined in sut.ego_keep_long_distance_with_oncoming_in_path
| Item | Description | Unit/Type |
|---|---|---|
ego_speed_at_kld_oncoming_end |
Ego speed at end of the KLD-oncoming essence phase | speed |
ego_avg_speed_during_kld_oncoming |
Ego average speed during the KLD-oncoming interval | speed |
ego_max_speed_during_kld_oncoming |
Ego maximum speed during the KLD-oncoming interval | speed |
ego_min_speed_during_kld_oncoming |
Ego minimum speed during the KLD-oncoming interval | speed |
ego_max_lon_acceleration_during_kld_oncoming |
Ego maximum longitudinal acceleration during the KLD-oncoming interval | acceleration |
ego_min_lon_acceleration_during_kld_oncoming |
Ego minimum longitudinal acceleration during the KLD-oncoming interval | acceleration |
[Click] Records inherited from sut.logiq_base_scenario and sut.logiq_base_vehicle_scenario (oncoming in path)
| Item | Description | Unit/Type |
|---|---|---|
ego_speed_at_start |
Ego speed at interval start | speed |
ego_max_speed / ego_min_speed / ego_avg_speed |
Ego speed statistics over the interval | speed |
ego_max_lon_acceleration / ego_min_lon_acceleration |
Ego acceleration statistics | acceleration |
ego_distance_traveled_during_interval |
Total Ego distance during the interval | m |
interval_duration |
Interval duration | s |
vehicle_speed_at_start |
Oncoming vehicle speed at start | speed |
vehicle_avg_speed / vehicle_max_speed / vehicle_min_speed |
Oncoming vehicle speed statistics | speed |
vehicle_max_lon_acceleration / vehicle_min_lon_acceleration |
Oncoming vehicle acceleration statistics | acceleration |
ego_min_ttc_to_vehicle / ego_min_mttc_to_vehicle |
Minimum TTC / MTTC to oncoming vehicle | time |
vehicle_object_kind |
Oncoming vehicle object kind | enum |
vehicle_tracking_id |
Oncoming vehicle tracking ID from object list | string |