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.
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.
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.
Get the road boundaries.
Add a car and a bicycle to the scenario. Position the car at the beginning of the first straight road.
Position the bicycle farther down the road.
Plot the scenario.
Display the actor poses and profiles.
allActorPoses=242×1 struct array with fields:
ActorID
Position
Velocity
Roll
Pitch
Yaw
AngularVelocity
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.
Then, use those IDs to filter only non-stationary actor poses and profiles.
movableActorPoses=2×1 struct array with fields:
ActorID
Position
Velocity
Roll
Pitch
Yaw
AngularVelocity
movableActorProfiles=2×1 struct array with fields:
ActorID
ClassID
Length
Width
Height
OriginOffset
MeshVertices
MeshFaces
RCSPattern
RCSAzimuthAngles
RCSElevationAngles