actorProfiles
Physical and radar characteristics of actors in driving scenario
Description
returns the physical and radar characteristics, profiles
= actorProfiles(scenario
)profiles
, for
all actors in a driving scenario, scenario
. Actors include
Actor
objects, Vehicle
objects and
Barrier
segments, which you can create using the actor
, vehicle
and barrier
functions, respectively.
You can use actor profiles as inputs to radar, vision, and lidar sensors, such as
drivingRadarDataGenerator
, visionDetectionGenerator
, lidarPointCloudGenerator
and ultrasonicDetectionGenerator
objects.
Examples
Create Driving Scenario with Multiple Actors and Roads
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; cr = road(scenario,roadcenters,roadwidth);
Add two straight roads with the default width, using road center points at each end. To the first straight road add barriers on both road edges.
roadcenters = [700 0 0; 100 0 0]; sr1 = road(scenario,roadcenters); barrier(scenario,sr1) barrier(scenario,sr1,'RoadEdge','left') 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,'ClassID',1,'Position',[700 0 0], ... 'Length',3,'Width',2,'Height',1.6);
Position the bicycle farther down the road.
bicycle = actor(scenario,'ClassID',3,'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.
allActorPoses = actorPoses(scenario)
allActorPoses=242×1 struct array with fields:
ActorID
Position
Velocity
Roll
Pitch
Yaw
AngularVelocity
allActorProfiles = actorProfiles(scenario)
allActorProfiles=242×1 struct array with fields:
ActorID
ClassID
Length
Width
Height
OriginOffset
MeshVertices
MeshFaces
RCSPattern
RCSAzimuthAngles
RCSElevationAngles
Because there are barriers in this scenario, and each barrier segment is considered an actor, actorPoses
and actorProfiles
functions return the poses of all stationary and non-stationary actors. To only obtain the poses and profiles of non-stationary actors such as vehicles and bicycles, first obtain their corresponding actor IDs using the scenario.Actors.ActorID
property.
movableActorIDs = [scenario.Actors.ActorID];
Then, use those IDs to filter only non-stationary actor poses and profiles.
movableActorPoseIndices = ismember([allActorPoses.ActorID],movableActorIDs); movableActorPoses = allActorPoses(movableActorPoseIndices)
movableActorPoses=2×1 struct array with fields:
ActorID
Position
Velocity
Roll
Pitch
Yaw
AngularVelocity
movableActorProfiles = allActorProfiles(movableActorPoseIndices)
movableActorProfiles=2×1 struct array with fields:
ActorID
ClassID
Length
Width
Height
OriginOffset
MeshVertices
MeshFaces
RCSPattern
RCSAzimuthAngles
RCSElevationAngles
Input Arguments
scenario
— Driving scenario
drivingScenario
object
Driving scenario, specified as a drivingScenario
object.
Output Arguments
profiles
— Actor profiles
structure | array of structures
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.
Field | Description |
---|---|
ActorID | Scenario-defined actor identifier, specified as a positive integer. |
ClassID | Classification identifier, specified as a nonnegative integer. 0
represents an object of an unknown or unassigned class. |
Length | Length of actor, specified as a positive real-valued scalar. Units are in meters. |
Width | Width of actor, specified as a positive real-valued scalar. Units are in meters. |
Height | Height of actor, specified as a positive real-valued scalar. Units are in meters. |
OriginOffset | Offset of actor's rotational center from its geometric center, specified as a real-valued vector of the form [x, y, z]. 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. |
MeshVertices | Mesh vertices of actor, specified as an n-by-3 real-valued matrix of vertices. Each row in the matrix defines a point in 3-D space. |
MeshFaces | Mesh faces of actor, specified as an
m-by-3 matrix of integers. Each row of
MeshFaces represents a triangle defined by the vertex
IDs, which are the row numbers of vertices. |
RCSPattern | Radar cross-section (RCS) pattern of actor, specified as a
numel(RCSElevationAngles) -by-numel(RCSAzimuthAngles)
real-valued matrix. Units are in decibels per square meter. |
RCSAzimuthAngles | Azimuth angles corresponding to rows of RCSPattern , specified as a vector
of values in the range [–180, 180]. Units are in degrees. |
RCSElevationAngles | Elevation angles corresponding to rows of RCSPattern , specified as a
vector of values in the range [–90, 90]. Units are in degrees. |
For full definitions of these structure fields, see the actor
, vehicle
and barrier
functions.
Version History
Introduced in R2017a
See Also
Objects
drivingScenario
|visionDetectionGenerator
|drivingRadarDataGenerator
|lidarPointCloudGenerator
|ultrasonicDetectionGenerator
Functions
actorPoses
|actor
|vehicle
|barrier
|targetPoses
|targetOutlines
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
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.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)