Main Content

actorTracklist

Store recorded actor track list data with timestamps

Since R2023a

Description

The actorTracklist object stores recorded actor track list data and associates it with the timestamps at which it was recorded.

Creation

Description

trackdata = actorTracklist creates an empty actorTracklist object, trackdata.

trackdata = actorTracklist(timestamp,trackID,classID,position) sets the TimeStamp, TrackIDs, ClassIDs, and Position properties of the returned actorTracklist object using the timestamp, trackID, classID, and position arguments, respectively.

example

trackdata = actorTracklist(___,Name=Value) sets properties using one or more name-value arguments in addition to any combination of input arguments from previous syntaxes. For example, Velocity={[4 1 0; 2 2 1]} specifies velocities of the form [vx vy vz] for two actors at one timestamp. Because all actorTracklist properties are read-only, you must set them at object creation. To update them after creation, you must use the addData and removeData object functions.

example

Note

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

Properties

expand all

This property is read-only.

Timestamps of actor track information, specified as an N-element numeric column vector. N is the number of timestamps. Each element indicates the time from the start of the simulation, in seconds, at which the associated track was captured.

When you initialize the object with timestamp data, the object arranges the input timestamps in increasing order. If the input data contains multiple rows of data with the same timestamp, the object merges that data into a single row.

Data Types: single | double

This property is read-only.

Track IDs of the actors, specified as an N-by-1 cell array. N is the number of timestamps. Each cell contains the track IDs of the actors detected at the corresponding timestamp, specified as a 1-by-M string array. M is the number of actors at the timestamp.

This property is read-only.

Classification IDs of the actors, specified as an N-by-1 cell array. N is the number of timestamps. Each cell contains the class IDs of the actors detected at the corresponding timestamp, specified as an M-element row vector of nonnegative integers. M is the number of actors at the timestamp.

classIDs must be specified as one of these nonnegative integers:

  • 1 — Car

  • 2 — Truck

  • 3 — Bicycle

  • 4 — Pedestrian

  • 0 — Others

This property is read-only.

Positions of the actors with respect to the ego frame, specified as an N-by-1 cell array. N is the number of timestamps. Each cell contains the positions of the actors detected at the corresponding timestamp, specified as an M-by-3 numeric matrix. M is the number of actors at the timestamp. Each row specifies the position of an actor in the form [x y z]. Units are in meters.

This property is read-only.

Dimensions of the actors, specified as an N-by-1 cell array. N is the number of timestamps. Each cell contains the dimensions of the actors detected at the corresponding timestamp, specified as an M-by-3 numeric matrix. M is the number of actors at the timestamp. Each row specifies the dimensions of an actor in the form [length width height]. Units are in meters.

This property is read-only.

Orientations of the actors, specified as an N-by-1 cell array. N is the number of timestamps. Each cell contains the orientations of the actors detected at the corresponding timestamp, specified as an M-by-3 numeric matrix. M is the number of actors at the timestamp. Each row specifies the orientation of an actor in the form [yaw pitch roll]. Units are in degrees.

This property is read-only.

Velocities of the actors with respect to the ego frame, specified as an N-by-1 cell array. N is the number of timestamps. Each cell contains the velocities of the actors detected at the corresponding timestamp, specified as an M-by-3 numeric matrix. M is the number of actors at the timestamp. Each row specifies the velocity of an actor in the form [vx vy vz]. Units are in meters per second.

This property is read-only.

Speeds of the actors with respect to the ego frame, specified as an N-by-1 cell array. N is the number of timestamps. Each cell contains the speeds of the actors detected at the corresponding timestamp, specified as an M-element numeric row vector. M is the number of actors at the timestamp. Units are in meters per second.

This property is read-only.

Unique track IDs in the recorded data, specified as a P-element column vector. P is the number of unique track IDs in the recorded data.

Data Types: string

This property is read-only.

Start time of actor track recording, specified as a scalar. Units are in seconds.

Data Types: single | double

This property is read-only.

End time of the actor track recording, specified as a scalar. Units are in seconds.

Data Types: single | double

This property is read-only.

Number of recorded actor track samples, specified as a positive integer.

Data Types: double

Object Functions

readDataRead actor data from track list
addDataAdd data to actor track list object
removeDataRemove data from actor track list object
findNearestFind actor information nearest to specified timestamp in actor track list object
updateTimeUpdate timestamps of actor track list object
importFromObjectTrackImport track list from objectTrack object

Examples

collapse all

Load recorded actor track list data into the workspace.

data = load("actorTracklistData.mat");

Extract the recorded timestamps and the actor track IDs, class IDs, and position information from the data.

t = data.timestamps;
trackids = data.actorTrackIDs;
classids = data.actorClassIDs;
pos = data.actorPosition;

Initialize an actorTracklist object by using the extracted data.

actorTrackData = actorTracklist(t,trackids,classids,pos);

Display the details of the actorTracklist object.

disp(actorTrackData)
  actorTracklist with properties:

         TimeStamp: [600x1 double]
          TrackIDs: {600x1 cell}
          ClassIDs: {600x1 cell}
          Position: {600x1 cell}
         Dimension: []
       Orientation: []
          Velocity: []
             Speed: []
         StartTime: 3.8300e-04
           EndTime: 29.9514
        NumSamples: 600
    UniqueTrackIDs: [18x1 string]

Load recorded actor track list data into the workspace.

data = load("actorTracklistData.mat");

Extract the recorded timestamps and the actor track IDs, class IDs, position, and velocity information from the data.

t = data.timestamps;
trackids = data.actorTrackIDs;
classids = data.actorClassIDs;
pos = data.actorPosition;
vel = data.actorVelocity;

Initialize an actorTracklist object by using the extracted data.

actorTrackData = actorTracklist(t,trackids,classids,pos,Velocity=vel);

Display the first eight rows of the velocity information from the actorTracklist object.

head(actorTrackData.Velocity)
    {3x3 single}
    {3x3 single}
    {3x3 single}
    {3x3 single}
    {3x3 single}
    {3x3 single}
    {3x3 single}
    {3x3 single}

Tips

Version History

Introduced in R2023a

expand all