RoadRunner Scenario Reader
Reads selected topic from RoadRunner
scenario
- Library:
Automated Driving Toolbox / RoadRunner Scenario

Description
The RoadRunner Scenario Reader block reads the selected topic from the
RoadRunner
scenario. You can set the Topic Category
parameter to Actor
or Action
. The block
outputs data as messages. When you select the Actor
topic, the
block outputs the data associated with the actor, such as Actor
Specifications
and Actor Pose
. When you select the
Action
topic, the block outputs data such as Speed
Change
and Lane Change
. The block returns the
simulation states from the previous time step. You can filter data based on the actor
associated with the Simulink® actor model.
Ports
Output
Message
— State information from scenario
Simulink message
State information from scenario, returned as a Simulink message.
Parameters
Topic Category
— Topic category
Actor
(default) | Action
Topic category, specified as one of these values:
Actor
— Reads the actor data from the scenarioAction
— Reads the action data from the scenario
Actor Type
— Type of actor in scenario
All Types
(default) | Vehicle
Type of actor in scenario, specified as All Types
or
Vehicle
. The Vehicle
type includes additional
wheel information of the actor.
Dependencies
To enable this parameter, set Topic Category to
Actor
.
Action Type
— Type of action
Change Behaviour Parameter
(default) | Lateral Offset
| Path Following
| Speed Change
| Lane Change
| Longitudinal Distance
| User-Defined
Type of action that can be read from the scenario, specified as one of these values:
Change Parameter
— Reads the user-created parameter from the scenarioLateral Offset
— Reads the lateral offset action data from the scenarioPath Following
— Reads the path following action data from the scenarioSpeed Change
— Reads the speed change action data from the scenarioLane Change
— Reads the lane change action data from the scenarioLongitudinal Distance
— Reads the longitudinal distance action data from the scenarioUser-Defined
— Reads the custom parameters of a user-defined action from the scenario
This table describes the output bus structure when you set Topic
Category to Action
and Action
Type to Change Behavior Parameter
.
Field Name | Description |
---|---|
Actor Action | Information about the current action of specified actor, returned
as a |
Parameter | Information about the changed user-specified behavior parameter,
returned as a |
This table describes the Actor Action
structure of the above
output bus structure.
Field Name | Description |
---|---|
ActionID | Action ID returned as a string. |
ActorID | Identifier of actor performing the action, returned as a
|
PhaseInterval | Phase interval to which the action is applied.
|
ActionTypes | Action type.
|
Note
The Actor Action
structure is the same for all action types.
This table describes the Parameter
structure of the above output
bus structure.
Field Name | Description |
---|---|
Name | Name of the changed user-specified behavior parameter, returned as a string. |
Value | New value of the user-specified behavior parameter, returned as a string. |
ParameterType | Type of parameter. |
This table describes the output bus structure when you set Topic
Category to Action
and Action
Type to Lane Change
.
Field Name | Description |
---|---|
ActorAction | Information about the current action of specified actor, returned
as a |
LaneChangeTarget | Target lane after lane change, returned as a
|
TransitionDynamics | Dynamics of the transition to the lane change, returned as a
|
The ActorAction
structure is the same for all action types and is
described above.
This table describes the LaneChangeTarget
structure of the above
output bus structure.
Field Name | Description |
---|---|
LaneValue | Number of lanes to change before reaching the target lane, returned as an
int32 value. |
LaneComparison | Direction of the lane change.
|
RefActorID | Identifier of reference actor, returned as a
uint64 . |
This table describes the TransitionDynamics
structure of the
above output bus structure.
Field Name | Description |
---|---|
Dimension | Transition metric measuring the action change.
|
Shape | Shape of the transition curve.
|
Value | Value of the chosen transition metric, returned as a
double . |
Note
The TransitionDynamics
structure is the same for all action
types that employ its use.
This table describes the output bus structure when you set Topic
Category to Action
and Action
Type to Lateral Offset
.
Field Name | Description |
---|---|
ActorAction | Information about the current action of specified actor, returned as a
struct . |
LateralOffsetTarget | Lateral offset relative to the current path of specified actor, returned
as a struct . |
TransitionDynamics | Transition dynamics for the lateral offset change, specified as a
struct . |
The ActorAction
structure is the same for all action types and is
described above.
This table describes the LateralOffsetTarget
structure of the
above output bus structure.
Field Name | Description |
---|---|
OffsetValue | Target lateral offset relative to the current path, returned as a
double .
|
The TransitionDynamics
structure is the same for all action types
that employ its use and is described above.
This table describes the output bus structure when you set Topic
Category to Action
and Action
Type to Longitudinal Distance
.
Field Name | Description |
---|---|
ActorAction | Information about the current action of the specified actor, returned as
a struct . |
DistanceTarget | Information about the longitudinal distance to the reference actor,
returned as a struct . |
ReferenceSamplingMode | Phase interval at which the target longitudinal distance is achieved.
|
DynamicConstraints | Dynamic constraints for the longitudinal distance change, returned as a
struct . |
The ActorAction
structure is the same for all action types and is
described above.
This table describes the DistanceTarget
structure of the above
output bus structure.
Field Name | Description |
---|---|
RefActorID | Identifier of reference actor, returned as a
uint64 . |
DistanceDimensionType | Type of distance to reference actor.
|
DistanceType | Specification of longitudinal distance as either time distance or space distance.
|
ActorCoordinateSystemType | Coordinate system in which to measure required longitudinal distance.
|
Value | Longitudinal distance, returned as a double . |
PositionComparison | Relative position to reference actor.
|
MeasureFrom | Longitudinal distance is either measured between the closest points on two actors' bounding boxes or between the origin point of both actors.
|
This table describes the DynamicConstraints
structure of the
above output bus structure.
Field Name | Description |
---|---|
UnlimitedDynamics | Presence of dynamic constraints, returned as a Boolean value. |
MaxSpeed | Maximum speed that an actor can attain while approaching target
longitudinal distance to reference actor, returned as a
double . |
MaxAcceleration | Maximum acceleration that an actor can attain while approaching target
longitudinal distance to reference actor, returned as a
double . |
MaxDeceleration | Maximum deceleration that an actor can attain while approaching target
longitudinal distance to reference actor, returned as a
double . |
This table describes the output bus structure when you set Topic
Category to Action
and Action
Type to Path Following
.
Field Name | Description |
---|---|
ActorAction | Information about the current action of specified actor, returned as a
struct . |
PathTarget | Actor target path, returned as a struct . |
The ActorAction
structure is the same for all action types and is
described above.
This table describes the PathTarget
structure of the above output
bus structure.
Field Name | Description |
---|---|
Path | Set of 3-D coordinates representing the target path, returned as an N-by-3 array where N = NumPoints. Each column value in the first row is the x-, y- and z- coordinate, respectively, of the first point in the target path, and so on. |
NumPoints | Total number of points in the target path, returned as a positive integer. |
HasTimings | Indication of target path containing timing information, returned as a Boolean value. |
Timings | Timing information for each point of the path, returned as an N-by-1 structure array where N = NumPoints. |
This table describes the Timings
structure of the above
PathTarget
structure.
Field Name | Description |
---|---|
Time | Time of arrival of the actor at this point, relative to the time at the starting point of the path. Returned in seconds. |
Speed | Speed of actor at the time of arrival, returned in meters per second. |
WaitTime | Waiting time period of actor at arrival, returned in seconds. If this value is non-zero, then the actor is at rest. |
This table describes the output bus structure when you set Topic
Category to Action
and Action
Type to Speed Change
.
Field Name | Description |
---|---|
ActorAction | Information about the current action of specified actor, returned as a
struct . |
SpeedTarget | Target speed after speed change, returned as a
struct . |
TransitionDynamics | Transition dynamics for the speed change, specified as a
struct . |
The ActorAction
structure is the same for all action types and is
described above.
This table describes the SpeedTarget
structure of the above
output bus structure.
Field Name | Description |
---|---|
SpeedValue | Target speed value, returned as a double . |
SpeedComparison | Comparison type of current speed with the target speed.
|
RefActorID | Identifier of reference actor, if any, returned as a
uint64 . |
RefSamplingMode | Speed sampling mode of reference actor, if any.
|
The TransitionDynamics
structure is the same for all action types
that employ its use and is described above.
This table describes the output bus structure when you set Topic
Category to Action
and Action
Type to User-Defined
.
Field Name | Description |
---|---|
ActorAction | Information about the current action of specified actor, returned
as a |
Name | Action name, returned as a string. |
Parameters | Custom parameters of the user-defined action, returned as a
struct . This struct contains the name
and value for each custom parameter. |
The ActorAction
structure is the same for all action types and is
described above.
Dependencies
To enable this parameter, set Topic Category to
Action
.
Topic
— Actor data for all types
Actor Specifications
(default) | Actor Pose
| Actor Pose (Driving Scenario compatible)
Actor data for all types, specified as one of these options:
Actor Specifications
— Static attributes associated with the actor, such as actor ID, actor name, and bounding boxActor Pose
— Dynamic data associated with the actor, such as pose, velocity, and angular velocityActor Pose (Driving Scenario compatible)
— Dynamic data associated with the actor, such as actor ID, position, velocity, roll, pitch, yaw, and angular velocity
This table describes the output bus structure when you set Topic
Category to Actor
, Actor
Type to All Types
and Topic
to Actor Specifications
.
Field Name | Description |
---|---|
ActorID | Actor identifier, returned as a
|
ActorName | Actor name, returned as a string. |
BoundingBox | Bounding box of the actor, returned as a
struct . |
This table describes the BoundingBox
structure of the above
output bus structure.
Field Name | Description |
---|---|
Min | The bounding box corner with minimal x-, y- and z- values, returned as a 1-by-3 array. |
Max | The bounding box corner with maximal x-, y- and z- values, returned as a 1-by-3 array. |
This table describes the output bus structure when you set Topic
Category to Actor
, Actor
Type to All Types
and Topic
to Actor Pose
.
Field Name | Description |
---|---|
ActorID | Scenario-defined actor identifier, returned as a
uint64 . |
Pose | Position and orientation of the actor, returned as a 4-by-4 array. |
Velocity | Actor velocity, in meters per second, in the x-, y-and z- directions, returned as a 1-by-3 vector. |
AngularVelocity | Angular velocity, in radians per second, of actor in the x-, y-and z- directions, returned as a 1-by-3 vector. |
This table describes the output bus structure when you set Topic
Category to Actor
, Actor
Type to All Types
and Topic
to Actor Pose(Driving Scenario compatible)
.
Field Name | Description |
---|---|
ActorID | Scenario-defined actor identifier, returned as a
uint64 . |
Position | Position of actor, returned 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-directions, returned as a real-valued vector of the form [vx vy vz]. Units are in meters per second. |
Roll | Roll angle of actor, returned as a real-valued scalar. Units are in degrees. |
Pitch | Pitch angle of actor, returned as a real-valued scalar. Units are in degrees. |
Yaw | Yaw angle of actor, returned as a real-valued scalar. Units are in degrees. |
AngularVelocity | Angular velocity (ω) of actor in the x-, y-, and z-directions, returned as a real-valued vector of the form [ωx ωy ωz]. Units are in degrees per second. |
Dependencies
To enable these options for this parameter, set Actor Type to
All Types
.
Topic
— Actor data for vehicle type
Vehicle Specifications
(default) | Vehicle Pose
Actor data for vehicle type, specified as one of these options:
Vehicle Specifications
— Static attributes associated with the vehicle, such as paint color, and wheel specifications.Vehicle Pose
— Dynamic data associated with the actor, such as wheel poses
This table describes the output bus structure when you set Topic
Category to Actor
, Actor
Type to Vehicle
and Topic
to Vehicle Specifications
.
Field Name | Description |
---|---|
ActorSpec | Actor specifications, returned as a struct . |
PaintColor | Color of the actor, returned as a struct . |
NumWheels | Number of wheels, returned as a |
Wheels | Wheel specifications of vehicle-type actor, returned as a
struct . |
This table describes the ActorSpec
structure of the above output
bus structure.
Field Name | Description |
---|---|
ActorID | Actor identifier, returned as a
|
ActorName | Actor name, returned as a string. |
BoundingBox | Bounding box of the actor, returned as a
struct . |
Note
The ActorSpec
structure is also returned when you set
Topic Category to Actor
,
Actor Type to All Types
and
Topic to Actor
Specifications
.
This table describes the PaintColor
structure of the above output
bus structure.
Field Name | Description |
---|---|
r | Red color, returned as a uint32 value. |
g | Green color, returned as a uint32 value. |
b | Blue color, returned as a uint32 value. |
a | Transparency of the color (alpha), returned as a
uint32 value. |
This table describes the Wheels
structure of the above output bus
structure.
Field Name | Description |
---|---|
AxleIndex | Axle index of a wheel. The front-most axle has the starting index value
of zero, with index values increasing towards the vehicle rear. Returned as a
uint32 value. |
WheelOffset | x-, y- and z- coordinates of the wheel center, in the vehicle coordinate system. Returned as a 1-by-3 vector. |
WheelRadius | Radius of the wheel in meters. Returned as a double. |
This table describes the output bus structure when you set Topic
Category to Actor
, Actor
Type to Vehicle
and Topic
to Vehicle Pose
.
Field Name | Description |
---|---|
ActorRuntime | Actor runtime values, returned as a struct . |
NumWheels | Number of wheels specified as a uint64 . |
WheelPoses | Runtime pose of each wheel of vehicle-type actor, returned as a multidimensional 4-by-4-by-N array. N is the number of wheels of the vehicle-type actor.
|
MapLocation | Location of vehicle-type actor with respect to its closest lane,
returned as a |
This table describes the ActorRuntime
structure of the above
output bus structure.
Field Name | Description |
---|---|
ActorID | Scenario-defined actor identifier, returned as a
uint64 . |
Pose | Position and orientation of the actor, returned as a 4-by-4 array. |
Velocity | Actor velocity, in meters per second, in the x-, y-and z- directions, returned as a 1-by-3 vector. |
AngularVelocity | Angular velocity, in radians per second, of actor in the x-, y-and z- directions, returned as a 1-by-3 vector. |
Note
The ActorRuntime
structure is also returned when you set
Topic Category to Actor
,
Actor Type to All Types
and
Topic to Actor Pose
.
This table describes the MapLocation
structure of the above
output bus structure.
Field Name | Description |
---|---|
IsOnLane | Boolean value indicating if the vehicle is located on a lane. A vehicle is considered to be on a certain lane if its model origin lies in between the left and right boundaries of this lane. |
LocationOnLane | Current lane of vehicle, returned as a struct . If a
vehicle straddles several lanes, the most aligned lane is returned. |
This table describes the LocationOnLane
structure of the
MapLocation
structure.
Field Name | Description |
---|---|
LaneID | UUID identifier of the most aligned lane, returned as a string. |
Position | Position of the vehicle on the lane-center polyline (in s-value). The s-value is a double value within [0, 1] that indicates a position on a 3-D polyline with 0 at the start and 1 at the end of the polyline. |
Angle | Angle between the vehicle travel direction and tangent at the lane position. Units are in radians. |
Dependencies
To enable these options for this parameter, set Actor Type
to Vehicle
.
Filter
— Filter criteria
Self
(default) | None
Filter criteria for relevant topic data, specified as
None
or Self
.
None
outputs data for all actors in the
scenario.Self
outputs data for the Simulink model actor.
Sample Time
— Sample time of simulation
positive real scalar
Sample time of simulation in seconds, specified as a positive real scalar.
Version History
Introduced in R2022a
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは 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)