120. Scenario Extension Blocks
Scenario Extension Blocks are modular components that can be added to base scenarios to make them more interesting, realistic, and challenging. These blocks are not necessarily complete scenarios on their own — instead, they are designed to add additional elements or behaviors that increase complexity.
The primary goal of these blocks is to introduce indirect challenges to the Ego. By doing so, they help evaluate how well the system responds to realistic and dynamic road situations.
Blocks are intended to be modular and reusable, meaning you can add them in your own scenario definitions by:
- Importing or referencing the block at the top of your scenario file.
- Instantiating or configuring the block via provided parameters, specifying elements like actor types, positions, timings, and any block-specific settings.
Each block represents a specific type of behavior or situation that can affect the Ego indirectly.
120.1 Crossing VRU group block
The crossing_vru_group block introduces a group of Vulnerable Road Users (VRUs) — such as pedestrians or cyclists—crossing the road in front of the Ego. The group’s movement can follow several patterns: straight crossing, shape crossing, start-and-stop, or go-and-return.
This block is highly configurable with parameters including side, angle, number of VRUs, and timing. It's intended to test the Ego’s interaction with multiple VRUs in dynamic environments.
An example scenario is Ego drive with VRU group crossing road, where the Ego passes a group of VRUs moving at a relative angle to the road.
120.2 Vehicle traverse junction block
The vehicle_traverse_junction block models one or more vehicles traversing a junction, including common intersection maneuvers and priority/right-of-way situations. It’s frequently reused as a modular base in the Junction scenario family.
Scenarios that can use the vehicle_traverse_junction include:
- Ego traverse junction with crossing VRU: A VRU is present as the Ego crosses a junction.
- Ego traverse junction with multiple vehicles: Several vehicles, including the Ego, each approach and traverse a junction from different directions and lanes. The Vehicle Traverse Junction block is reused for each non-Ego participant.
- Ego_traverse_junction_with_cross_path_vehicle: Another vehicle crosses the Ego’s path at a junction (either with or without traffic signs).
120.3 Side-Traffic vehicles block
The side_traffic_vehicles block introduces vehicles driving alongside the Ego (often at similar speeds), either in adjacent lanes or positions, simulating dense urban/urban highway side-traffic or highway situations. This block is commonly used in “free drive” and traffic density scenarios where side-traffic behavior impacts the Ego’s available options or visibility.
Scenarios that can use the side_traffic_vehicles block include:
- Vehicle driving next to Ego with similar speed stationary objects with traffic: Neighboring vehicles drive next to the Ego, simulating side-by-side movement, potentially with other traffic or stationary objects present to add complexity.
- Vehicle driving next to Ego with similar speed: A vehicle drives alongside the Ego using block placement to establish adjacency, which enables behavior overlays, such as acceleration, lane change, or cut-in maneuver, that are applied in functional safety testing scenarios.
120.4 Swirling vehicle drive behavior block
The swirling_vehicle_drive block implements complex or non-straight-line paths for vehicles (neighbor or adversary test agents) that swirl adjacent to the Ego, which is intended to test perception, path prediction, and control algorithms.
This block is useful in both urban and highway ODDs to stress-test reactive and predictive elements of the AV stack with ambiguous or unusual adjacent vehicle dynamics.
Scenarios that can use the swirling_vehicle_drive block include:
- Vehicle swirling next to Ego with similar speed stationary objects: A neighbor vehicle performs a swirling drive alongside the Ego, with or without stationary objects alongside.
- Non-smooth vehicle Cut-In: A vehicle cuts in ahead of the Ego with a non-smooth, swirling approach. This scenario challenges cut-in detection and vehicle response logic.
120.5 Using extension blocks
To use extension blocks in scenarios you can either:
-
Extend the extension block using in the scenario _imp.osc file, using
extend <extension_block>:. -
Import the extension block OSC file into the scenario _h.osc file.
Example of extending the extension block
In the Ego traverse junction with multiple vehicles scenario, we use the vehicle_traverse_junction extension block to modify constraints and override modifiers by adding the following code to the ego_traverse_junction_with_multiple_vehicles_imp.osc file:
...
extend sut.vehicle_traverse_junction:
override_intent_assist_vehicle_distance_at_essence_in_road:\
override(intent_assist_vehicle_distance_at_essence_in_road,
run_mode: disable)
keep(gen_essence_in_road_duration in [5..30]s)
keep(gen_essence_out_road_duration in [5..40]s)
Example of importing the extension block
In the Lead vehicle with traffic on side scenario, we import the vehicle_with_traffic_on_side_top.osc file in the lead_vehicle_with_traffic_on_side_h.osc file:
# sut.lead_vehicle_with_traffic_on_side
# In this scenario, Ego has lead vehicle ahead with traffic on side.
#
#
import "$FTX_PACKAGES/base_scenarios/scenarios/lead_vehicle/lead_vehicle_family_base/lead_vehicle_family_base_top.osc"
import "$FTX_PACKAGES/base_scenarios/common/scenario_extension_blocks/vehicle_with_traffic_on_side/vehicle_with_traffic_on_side_top.osc"
import "$FTX_PACKAGES/base_scenarios/scenarios/lead_vehicle/lead_vehicle/lead_vehicle_top.osc"
...