rec = record(scenario)
returns a recording, rec, of the states of actors in a driving
scenario simulation, scenario. To record a scenario, you must define
the trajectory of at least one actor.
rec — Recording of actor states during simulation M-by-1 vector of structures
Recording of actor states during simulation, returned as an
M-by-1 vector of structures. M is
the number of time steps in the simulation. Each structure corresponds to a
simulation time step.
The rec structure has these fields:
Field
Description
Type
SimulationTime
Simulation time at each time step
Real scalar
ActorPoses
Actor poses in scenario coordinates
N-by-1 vector of
ActorPoses structures, where
N is the number of actors,
including vehicles.
Each ActorPoses structure has these fields.
Field
Description
ActorID
Scenario-defined actor identifier, specified as
a positive integer.
Position
Position of actor, specified as a real-valued
vector of the form [x,
y, z]. Units
are in meters.
Velocity
Velocity (v) of actor in the
x-, y-, and
z-direction, specified as a
real-valued vector of the form
[vx,
vy,
vz].
Units are in meters per second.
Roll
Roll angle of actor, specified as a real-valued
scalar. Units are in degrees.
Pitch
Pitch angle of actor, specified as a
real-valued scalar. Units are in
degrees.
Yaw
Yaw angle of actor, specified as a real-valued
scalar. Units are in degrees.
AngularVelocity
Angular velocity (ω) of
actor in the x-,
y-, and
z-direction, specified as a
real-valued vector of the form
[ωx,
ωy,
ωz].
Units are in degrees per second.
For full definitions of these structure fields, see the actor and vehicle functions.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.