Main Content

Overview of Scenario Variant Generation

The Scenario Variant Generator for Automated Driving Toolbox™ support package enables you to automatically generate multiple scenarios by varying the parameters of a seed scenario. Using these generated scenarios, you can perform exhaustive safety assessments of various automated driving applications, such as autonomous emergency braking (AEB), lane keep assist (LKA), and adaptive cruise control (ACC). The support package provides examples to test these applications as per European New Car Assessment Programme (Euro NCAP®) test protocols.

The process of generating a variant scenario from the seed scenario involves these steps:

  1. Read seed scenario and extract its parameters.

  2. Modify the parameters of the seed scenario.

  3. Generate variant scenario.

Scenario variant generation workflow

To generate variant scenarios, you can create a seed scenario using a drivingScenario object. For more information, see Create Driving Scenario Programmatically. Alternatively, you can generate a seed scenario using real-world vehicle data recorded from various sensors, such as a global positioning system (GPS), camera, and lidar. For more information, see Overview of Scenario Generation from Recorded Sensor Data.

Parameter Extraction

The first step to generate a variant scenario is to extract the parameters from a seed scenario. Use the getScenarioDescriptor function to read a seed scenario and extract its parameters. The function stores the extracted parameters in a ScenarioDescriptor object. You can use this object to modify scenario parameters.

This table shows the different parameters that the getScenarioDescriptor function extracts from the seed scenario.

Extracted ParametersDescription
Scene Parameters

Static parameters related to roads, lanes, and barriers.

Examples — Road centers, road width, number of lanes, lane type

Actor Parameters

Dynamic parameters related to actors of the seed scenario.

Examples — Speed, yaw, waypoints, dimension

Simulator Parameters

Parameters related to the simulation platform.

Examples — Sample time, stop time

Parameter Variation

After extracting the parameters from a seed scenario, modify one or more parameters in the ScenarioDescriptor object. You can modify these types of actor parameters:

  • Dimension

  • Start position

  • Speed

  • Yaw

  • Waypoints

  • Collision point

  • Radius of curvature for turning on the road

For more information about how to perform parameter variations, see the Generate Scenario Variants for Testing AEB Pedestrian Systems example.

Scenario Variant Generator for Automated Driving Toolbox computes the required constraints to generate the specified variant scenario. For example, if you want to reduce the speed of an actor, but keep the collision point constant, the module computes the required wait time for the actor to maintain the collision point.

Scenario Generation

After performing parameter variations on the ScenarioDescriptor object, generate the variant scenario using the getScenario function. The function constructs the scenario from the parameters stored in the ScenarioDescriptor object and returns the scenario as a drivingScenario object.

You can visualize the generated variants, or export the generated variants to the ASAM OpenSCENARIO® file format. For more information, see the Generate Scenario Variants for Testing AEB Pedestrian Systems example.

See Also


Related Topics