主要内容

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 varyActorProperties object 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 the generateWaypoints function.

  • Use the varyCollisionProperties object function to specify new values for the collision sides and collision points.

  • Use the varySceneProperties object 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 varyTestProperties object 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 ScenarioDescriptorPlot object from your seed scenario descriptor object and plot the first frame of the scenario variant simulation, use the plot function.

  • To configure options for plotting or simulating scenario variants, use the configure object function.

  • To play the scenario simulation of the scenario variants, use the play object function.

  • To seek a frame in the scenario variant and plot that frame, use the seek object 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

Topics