Skip to content

260. Oncoming with lateral swirl

Scenario location: $FTX_PACKAGES/base_scenarios/scenarios/oncoming_vehicles/oncoming_with_lateral_swirl/

In the oncoming_with_lateral_swirl scenario, the oncoming_vehicle approaches the Ego and laterally swirls continuously while passing by.

260.1 Actors

The actors associated with this scenario are as follows:

Name Description Type Depiction
ego Vehicle under test vehicle
oncoming_vehicle Vehicle traveling toward the Ego in the opposite lane vehicle
Figure 1: Oncoming vehicle with lateral swirl

260.2 Prerequisites

Environmental requirements: A two-lane bidirectional road, with one lane designated for outgoing traffic (vehicles travelling in the same direction as the Ego), and the other for oncoming traffic (vehicles traveling toward the Ego, i.e., in the opposite direction).

260.3 Scenario essence

260.4 phase_essence

Ego: Drives in the innermost lane, maintaining its speed and lane.

oncoming_vehicle: Approaches the Ego from the opposite direction. It follows a predefined motion profile that causes it to perform a "lateral swirl" or swerving maneuver. Its road departure checks are disabled to allow this erratic movement, which may include crossing the center line.

260.5 Scenario Main phases

The oncoming_with_lateral_swirl_main scenario is structured into three distinct phases.

260.5.1 phase_ego_warm_up

The phase_ego_warm_up invokes the oncoming_vehicle_base_ego_warm_up scenario.

260.5.2 phase_essence

The phase_scenario invokes the phase_essence

260.5.3 phase_post

The phase_post invokes the oncoming_vehicle_base_post scenario.

260.6 Parameters

The paths to the CSV file and the main CSV file are as follows:

$FTX_PACKAGES/base_scenarios/test_suites/test_suite_definitions/oncoming_vehicles/oncoming_with_lateral_swirl.csv
$FTX_PACKAGES/base_scenarios/test_suites/test_suite_definitions/oncoming_vehicles/oncoming_with_lateral_swirl_main.csv

The parameters you can constrain to create tests with the oncoming_with_lateral_swirl.csv file are as follows:

Parameter Description Range
gen_distance_to_oncoming_vehicle_at_lateral_swirling_start Input distance of the oncoming_vehicle from the Ego at the start of phase_essence [10..150]m
gen_oncoming_vehicle_speed_at_lateral_swirling_start Input speed of the oncoming_vehicle during the lateral_swirling_phase [0..150]kph
gen_oncoming_vehicle_swirling_amplitude Swirling amplitude of the oncoming_vehicle at the start of the scenario [0..3]m
gen_oncoming_vehicle_lat_swirling_period_at_start Period of sinusoidal swirling motion at the start of the shape [1..6]s
gen_oncoming_vehicle_lat_swirling_period_at_end Period of sinusoidal swirling motion at the end of the shape [1..6]s
gen_oncoming_vehicle_speed_at_start Input speed of the oncoming_vehicle at essence start [0..150]kph
gen_ego_speed_at_start Input speed of the Ego at the start of the scenario [0..150]kph

260.7 Metrics

Metrics collected during test execution are given below.

260.7.1 Coverage

The coverage metrics are given below.

260.7.1.1 Coverage items

The multi-dimensional situations captured during the test execution are as follows:

Item Description Range Unit/Type
ego_evasive_change_lane Did the Ego change lanes true, false bool
lane_count_at_end Number of lanes at the end of the scenario [1..6), every: 1.0 uint
curve_radius_at_end Curve radius at the end of the scenario other, straightish, soft_left, hard_left, soft_right, hard_right curvature
oncoming_vehicle_swirling_duration Duration of the oncoming_vehicle's swirling maneuver [3..4), every: 1.0 s
oncoming_vehicle_swirling_amplitude Swirling amplitude of the oncoming_vehicle during the lateral_swirling phase [0..3), every: 0.5 m
gen_distance_to_oncoming_vehicle_at_lateral_swirling_start Input distance of the oncoming_vehicle from the Ego at the start of phase_essence [10..150), every: 20.0 m
gen_oncoming_vehicle_speed_at_lateral_swirling_start Input speed of the oncoming_vehicle during the lateral_swirling_phase [0..150), every: 10.0 kph
gen_oncoming_vehicle_swirling_amplitude Swirling amplitude of the oncoming_vehicle at the start of the scenario [0..3), every: 0.5 m
lane_count_at_start Number of lanes at the start of the scenario [1..6), every: 1.0 uint
curve_radius_at_start Curve radius at the start of the scenario other, straightish, soft_left, hard_left, soft_right, hard_right curvature
gen_oncoming_vehicle_lat_swirling_period_at_start Period of sinusoidal swirling motion at the start of the shape [1..6), every: 1.0 s
gen_oncoming_vehicle_lat_swirling_period_at_end Period of sinusoidal swirling motion at the end of the shape [1..6), every: 1.0 s
distance_to_oncoming_vehicle_at_lateral_swirling_start Distance of the Ego to the oncoming_vehicle at the start of phase_essence [10..150), every: 10.0 m
oncoming_vehicle_speed_at_lateral_swirling_start Speed of the oncoming_vehicle at the start of the swirling motion [0..150), every: 10.0 kph
oncoming_vehicle_lat_swirling_period_at_start Start swirling period [0..5), every: 0.1 s
oncoming_vehicle_lat_swirling_period_at_end End swirling period [0..2), every: 0.2 s
[Click] The coverage items inherited from the sut.oncoming_vehicle_family_base scenario are as follows:
Item Description Range Unit/Type
lateral_distance_to_oncoming_vehicle_at_second_apart Lateral center-to-center distance between the Ego and the oncoming_vehicle, one second after passing [2..5), every: 1.0 m
ego_speed_at_second_apart Speed of the Ego one second after passing the oncoming_vehicle [0..150), every: 10.0 kph
oncoming_vehicle_speed_at_second_apart Speed of the oncoming_vehicle one second after passing the Ego [0..150), every: 10.0 kph
ego_acceleration_at_second_apart Acceleration of the Ego one second after passing the oncoming_vehicle [-4..4) mpsps
lateral_distance_to_oncoming_vehicle_at_passing_by Lateral center-to-center distance between the Ego and the oncoming_vehicle [0..2), every: 0.2 m
ego_speed_at_passing_by Speed of the Ego as the oncoming_vehicle passes [0..150), every: 10.0 kph
oncoming_vehicle_speed_at_passing_by Speed of the oncoming_vehicle as it passes the Ego [0..150), every: 10.0 kph
ego_acceleration_at_passing_by Acceleration of the Ego while passing [-4..4), every: 1.0 mpsps
curve_at_passing_by Curve during the passing by maneuver other, straightish, soft_left, hard_left, soft_right, hard_right curvature
gen_oncoming_vehicle_speed_at_start Input speed of the oncoming_vehicle at essence start [0..150), every: 10.0 kph
oncoming_vehicle_speed_at_start Speed of the oncoming_vehicle at essence start [0..150), every: 10.0 kph
[Click] The coverage items inherited from the sut.generic_base scenario are as follows:
Item Description Range Unit/Type
gen_ego_speed_at_start Input speed of the Ego at the start of the scenario [0..150), every: 10.0 kph
ego_speed_at_start Actual speed of the Ego at the start of the scenario [0..150), every: 10.0 kph

260.7.1.2 Cross coverage items

The test execution data for the combination of multiple coverage items is as follows:

Item Description Referred coverage items
-- -- --
[Click] The cross coverage items inherited from the sut.oncoming_vehicle_family_base scenario are as follows:
Item Description Referred coverage items
-- -- --
[Click] The cross coverage items inherited from the sut.generic_base scenario are as follows:
Item Description Referred coverage items
-- -- --

260.7.2 KPI

The key performance indicators are given below.

260.7.2.1 Record items

The performance metrics and the data items captured during the test execution are as follows:

Item Description Range Unit/Type
min_thw Minimum time headway of the Ego [1..5), every: 0.5 s
min_lon_lane_distance Minimal longitudinal distance between ego and oncoming_vehicle actor [0..100), every: 10.0 m
min_lat_lane_distance Minimal lateral distance between ego and oncoming_vehicle actor [0..20), every: 2.0 m
min_euclidean_distance Minimal euclidean distance between ego and oncoming_vehicle actor [0..200), every: 20.0 m
min_distance_to_oncoming_vehicle_while_passing_by_record Ego lateral distance to oncoming_vehicle while passing by [0..6), every: 0.5 m
ego_max_lateral_deviation_to_lane_center_record Maximum absolute lateral distance from lane center of Ego while passing by [0..1), every: 0.1 m
[Click] The KPIs inherited from the sut.oncoming_vehicle_family_base scenario are as follows:
Item Description Range Unit/Type
oncoming_vehicle_max_long_acceleration Maximum longitudinal acceleration of the oncoming_vehicle [0..20), every: 2.0 mpsps
oncoming_vehicle_min_long_acceleration Minimum longitudinal acceleration of the oncoming_vehicle [0..20), every: 2.0 mpsps
max_lat_lane_distance Maximum lateral distance between the Ego and the oncoming_vehicle [0..20), every: 2.0 m
[Click] The KPIs inherited from the sut.generic_base scenario are as follows:
Item Description Range Unit/Type
-- -- -- --