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:
Read seed scenario and extract its parameters.
Modify the parameters of the seed scenario.
Generate variant scenario.
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 Parameters | Description |
---|---|
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 |
If there is a collision between two actors in the seed scenario, you can extract the
collision information stored in the ScenarioDescriptor
object by using
the getCollisionData
function. The getCollisionData
function extracts these collision information from the seed scenario.
Simulation time at which collision occurs.
Coordinates of the collision point.
Speed of the actors at the time of the collision.
Side of the actor at which collision occurs.
Point of collision relative to the collision side of the actors.
Parameter Variation
You can generate a variant of the seed scenario by modifying the actor and collision parameters extracted from the seed scenario.
Create a
variationProperties
object to store new values for the actor and collision parameters.Use the
varyActorProperties
object function to specify the new values for the actor properties such as dimensions, waypoints, speed, and yaw.Use the
varyCollisionProperties
object function to specify new values for the collision fraction and collision side.
Use the
generateVariants
function to modify the actor and collision parameters with the new specified values. ThegenerateVariants
function returns aScenarioDescriptor
object that contains the modified parameters.
The generateVariants
function automatically 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
generateVariants
function can compute the required wait time
for the actor to maintain the collision point.
For information about how to perform parameter variations, see the Generate Scenario Variants for Testing AEB Pedestrian Systems example.
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
Functions
getScenarioDescriptor
|getCollisionData
|variationProperties
|varyActorProperties
|varyCollisionProperties
|generateVariants
|getScenario
|drivingScenario
Related Topics
- Generate Scenario Variants by Modifying Actor Dimensions
- Generate Scenario Variants for Testing AEB Pedestrian Systems
- Generate Scenario Variants for Testing ACC Systems
- Generate Variants of ACC Target Cut-In Scenario
- Generate Scenario Variants for Lane Keep Assist Testing
- Translocate Collision from Seed Scenario to Target Scene