actorProfiles

Physical and radar characteristics of actors in driving scenario

Description

example

profiles = actorProfiles(scenario) returns the physical and radar characteristics, profiles, for all actors in a driving scenario, scenario. Actors include Actor and Vehicle objects, which you can create using the actor and vehicle functions, respectively.

You can use actor profiles as inputs to radar and vision sensors, such as radarDetectionGenerator and visionDetectionGenerator objects.

Examples

collapse all

Create a driving scenario containing a curved road, two straight roads, and two actors: a car and a bicycle. Both actors move along the road for 60 seconds.

Create the driving scenario object.

scenario = drivingScenario('SampleTime',0.1','StopTime',60);

Create the curved road using road center points following the arc of a circle with an 800-meter radius. The arc starts at 0°, ends at 90°, and is sampled at 5° increments.

angs = [0:5:90]';
R = 800;
roadcenters = R*[cosd(angs) sind(angs) zeros(size(angs))];
roadwidth = 10;
road(scenario,roadcenters,roadwidth);

Add two straight roads with the default width, using road center points at each end.

roadcenters = [700 0 0; 100 0 0];
road(scenario,roadcenters)
roadcenters = [400 400 0; 0 0 0];
road(scenario,roadcenters)

Get the road boundaries.

rbdry = roadBoundaries(scenario);

Add a car and a bicycle to the scenario. Position the car at the beginning of the first straight road.

car = vehicle(scenario,'Position',[700 0 0],'Length',3,'Width',2,'Height',1.6);

Position the bicycle farther down the road.

bicycle = actor(scenario,'Position',[706 376 0]','Length',2,'Width',0.45,'Height',1.5);

Plot the scenario.

plot(scenario,'Centerline','on','RoadCenters','on');
title('Scenario');

Display the actor poses and profiles.

poses = actorPoses(scenario)
poses=2×7 struct
    ActorID
    Position
    Velocity
    Roll
    Pitch
    Yaw
    AngularVelocity

profiles = actorProfiles(scenario)
profiles=2×9 struct
    ActorID
    ClassID
    Length
    Width
    Height
    OriginOffset
    RCSPattern
    RCSAzimuthAngles
    RCSElevationAngles

Input Arguments

collapse all

Driving scenario, specified as a drivingScenario object.

Output Arguments

collapse all

Actor profiles, returned as a structure or as an array of structures. Each structure contains the physical and radar characteristics of an actor.

The actor profile structures have these fields.

FieldDescription
ActorIDScenario-defined actor identifier, specified as a positive integer.
ClassIDClassification identifier, specified as a nonnegative integer. 0 is reserved for an object of an unknown or unassigned class.
LengthLength of actor, specified as a positive real scalar. Units are in meters.
WidthWidth of actor, specified as a positive real scalar. Units are in meters.
HeightHeight of actor, specified as a positive real scalar. Units are in meters.
OriginOffsetOffset of actor's rotational center from its geometric center, specified as an [x,y, z] real-valued vector. The rotational center, or origin, is located at the bottom center of the actor. For vehicles, the rotational center is the point on the ground beneath the center of the rear axle. Units are in meters.
RCSPatternRadar cross-section (RCS) pattern of actor, specified as a numel(RCSElevationAngles)-by-numel(RCSAzimuthAngles) real-valued matrix. Units are in decibels per square meter.
RCSAzimuthAnglesAzimuth angles corresponding to rows of RCSPattern, specified as a vector of real values in the range [–180, 180]. Units are in degrees.
RCSElevationAnglesElevation angles corresponding to rows of RCSPattern, specified as a vector of real values in the range [–90, 90]. Units are in degrees.

For full definitions of these structure fields, see the actor and vehicle functions.

Introduced in R2017a