Vary Seed Scenario Parameters and Generate Scenario Variants
The Automated Driving Toolbox™ Test Suite for Euro NCAP® Protocols support package provides options to vary seed scenario parameters such as actor and collision parameters, and generate scenario variants using the varied parameters.
To generate Euro NCAP® scenario variants:
Modify the actor and collision properties of the seed scenario.
Use the parameters extracted from the seed scenario and the specified variation properties to generate scenario variants.
Vary Seed Scenario Parameters
To generate scenario variants, you must modify the actor and collision properties of the seed scenario.
Use the identifyActorOfInterest function to identify ego and target actor IDs in a seed
scenario descriptor.
If two actors in the seed scenario collide, you can extract the collision information
stored in the ScenarioDescriptor object by using the getCollisionData
function.
Create a variationProperties object to store new values for the actor and collision properties.
Use the
varyActorPropertiesobject function to specify new values for actor properties such as dimensions, waypoints, speed, and yaw. To specify waypoints for performing lane changes and lane drift, you can generate new waypoint values by using thegenerateWaypointsfunction.Use the
varyCollisionPropertiesobject function to specify new values for the collision sides and collision points.Use the
varyScenePropertiesobject function to specify new values for scene properties such as lane width, lane type, lane marking, lane marking color, lane marking width, and lane marking side.Use the
varyTestPropertiesobject function to specify new values for Euro NCAP test bench properties such as start test time, end test time, and handover time.
You can also specify variation properties as tables in Microsoft® Excel® spreadsheets to generate scenario variants. For more information, see the Generate Scenario Variants Using Excel Spreadsheets example.
For information about how to perform parameter variations, see the Generate Scenario Variants for Testing AEB Pedestrian Systems example.
Generate and Visualize Scenario Variants
You can use the parameters extracted from the seed scenario and the specified variation properties to generate scenario variants.
Use the generateVariants
function to modify the actor and collision parameters of the seed scenario with the variant
values. The generateVariants function returns variant
ScenarioDescriptor objects that contain the modified parameters. The
generateVariants function automatically computes the required
constraints to generate the variant ScenarioDescriptor object. 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 at its reduced speed.
You can visualize the scenario variants in the generated
ScenarioDescriptor object by using a ScenarioDescriptorPlot object.
To create a
ScenarioDescriptorPlotobject from your seed scenario descriptor object and plot the first frame of the scenario variant simulation, use theplotfunction.To configure options for plotting or simulating scenario variants, use the
configureobject function.To play the scenario simulation of the scenario variants, use the
playobject function.To seek a frame in the scenario variant and plot that frame, use the
seekobject function.
After generating and visualizing the scenario variants in the
ScenarioDescriptor object, you can obtain the variant scenarios by using
the getScenario
function. This function constructs the scenario from the parameters stored in a
ScenarioDescriptor object and returns the scenario as a drivingScenario object or a RoadRunner
ScenarioSimulation object.
You can also export the generated variants to the ASAM OpenSCENARIO® file format. For more information, see the Generate Variants of ACC Target Cut-In Scenario example.
After you generate scenario variants, you can run the driving simulation test bench to obtain test scores. For more information, see Set Up and Configure Driving Test Bench to Simulate Scenario Variants.
See Also
Functions
getScenarioDescriptor|identifyActorOfInterest|getCollisionData|variationProperties|varyActorProperties|varyCollisionProperties|varySceneProperties|varyTestProperties|generateWaypoints|generateVariants|getScenario|ScenarioDescriptorPlot
Topics
- Generate RoadRunner Scenario Variants by Modifying Actor Assets
- Generate Variants for Testing AEB Car-to-Car Scenarios
- Generate Scenario Variants for Testing ACC Systems
- Generate Scenario Variants for Lane Keep Assist Testing
- Generate Scenario Variants for Emergency Lane Keeping Testing
- Generate Euro NCAP Scenarios for Safety Assessment of Pedestrians, Motorcyclists, and Bicyclists
- Generate Variants of Scenario Created from Recorded Sensor Data