Main Content

variationProperties

Store actor and collision property variations

Since R2023a

Description

The variationProperties object stores actor and collision property variations to use to create scenario variants.

Creation

Description

example

variations = variationProperties creates an empty variationProperties object, variations.

Note

This object requires the Automated Driving Toolbox™ Test Suite for Euro NCAP® Protocols support package. You can install Automated Driving Toolbox Test Suite for Euro NCAP Protocols from the Add-On Explorer. For more information about installing add-ons, see Get and Manage Add-Ons.

Properties

expand all

Actor variation properties, specified as a structure. The structure contains these fields:

  • ActorID — ID of the actor, specified as a positive integer.

  • Speed — Speed of the actor, specified as a scalar or an M-element row vector. M is the number of waypoints. Units are in meters per second.

  • Dimension — Dimensions of the actor, specified as a structure with fields Length, Width, Height, RearOverhang, and FrontOverhang. Units are in meters.

  • Waypoints — Waypoints of the actor, specified as an M-by-3 matrix. M is the number of waypoints. Each row represents the actor position in the form [x y z]. Units are in meters.

  • Yaw — Yaw angle of the actor, specified as an M-element column vector. M is the number of waypoints. Units are in radians.

    By default, the fields of the ActorVariationProperties structure are empty arrays, [].

Note

To set the fields of the ActorVariationProperties structure, you must use the varyActorProperties object function.

Collision variation properties, specified as a structure. The structure contains these fields:

  • Actor1ID — ID of the first colliding actor in the pair, specified as a positive integer.

  • Actor2ID — ID of the second colliding actor in the pair, specified as a positive integer.

  • Actor1CollisionFraction — Point of collision relative to the collision side of the first actor, specified as a scalar in the range [0, 1]. For more information, see Collision Fraction.

  • Actor1CollisionSide — Side of the first actor at which the collision occurs, specified as "Front", "Left", "Back", or "Right".

  • Actor2CollisionFraction — Point of collision relative to the collision side of the second actor, specified as a scalar in the range [0, 1]. For more information, see Collision Fraction.

  • Actor2CollisionSide — Side of the second actor at which the collision occurs, specified as "Front", "Left", "Back", or "Right".

  • VariationType — Parameter to change to generate variant with collision, specified as "WaitTime", "EntryTime", or "Waypoints".

Note

To set the fields of the CollisionVariationProperties structure, you must use the varyCollisionProperties object function.

Object Functions

varyActorPropertiesAdd variations to actor properties
varyCollisionPropertiesAdd variations to collision properties

Examples

collapse all

Create an empty variationProperties object.

variation = variationProperties;

Display empty actor properties.

disp(variation.ActorVariationProperties)
      ActorID: []
        Speed: []
    Dimension: []
    Waypoints: []
          Yaw: []

Add speed and waypoint variations to the actor with an ActorID of 1.

waypoints = [0 0 0; 10 0 0];
varyActorProperties(variation,1,Speed=10,Waypoints=waypoints);

Display the actor property variations.

disp(variation.ActorVariationProperties)
      ActorID: 1
        Speed: 10
    Dimension: []
    Waypoints: [2×3 double]
          Yaw: []

Tips

  • To apply actor property variations and collision variations to your seed scenario, use the generateVariants function.

Version History

Introduced in R2023a