get
Description
loggeddata = get(log,Parameter)Parameter from the
          ScenarioLog object log.
loggeddata = get(log,Parameter,"ActorID",ID)Parameter for actor with
        identifier ID from the ScenarioLog object
          log.
Examples
Set logging on for rrSim, a
            ScenarioSimulation object.
set(rrSim,"Logging","on")
Get the simulation log after it stops playing.
simLog = get(rrSim,"SimulationLog")Get the list of participating actors from the simulation.
actors = get(simLog,"ActorIDs")actors =
     0     1     2Get the velocity of actor with actor ID 1.
vel = get(simLog,"Velocity","ActorID",1)
Input Arguments
Scenario simulation log from which to return data, specified as a
              ScenarioLog object. 
Example: actors = get(simLog,"ActorIDs")
Information required from simulation log, specified as one of these parameters.
- ActorIDs
- Time
- MaxSimulationTime
- StepSize
- Diagnostics
- Actions
- Events
- Pose
- Velocity
- AngularVelocity
- WheelPose
- ScenarioFile
- InitialState
- TrafficSignal
- TrafficSignalController
Note
You can retrieve the Actions, Events,
                Pose, Velocity,
                AngularVelocity,
                InitialState,WheelPose,TrafficSignal,
              and TrafficSignalController parameters for a specific
                ActorID, only.
Actor identifier, specified as a positive integer.
Example: pose = get(simLog,"Pose","ActorID",5)
Output Arguments
Specific simulation log data, returned as an array or structure array.
This table describes the output returned for each Parameter
            input argument. 
| Input Argument | Output | 
|---|---|
| ActorIDs | List of unique IDs of actors that participated in the simulation, returned as an array. Actor ID 0, representing the world, is always included in the list. | 
| Time | Each time step of the simulation, returned as an array. | 
| MaxSimulationTime | Maximum simulation time, returned as a double. | 
| StepSize | Step size of a simulation, returned as a double. | 
| Diagnostics | Diagnostics reported during the simulation, if any, returned as a Diagnostics structure array. During simulation, diagnostic messages may originate from one of these sources: 
 
 | 
| Actions | Actions of specified actor, if any, for each time step of the simulation, returned as an Actions structure array. | 
| Events | Events being sent by the specified actor, if any, for each time step of the simulation, returned as an Events structure array. | 
| Pose | Pose of specified actor for each time step of the simulation, returned as a Pose structure array. | 
| Velocity | Velocity of specified actor for each time step of the simulation, returned as a Velocity structure array. | 
| AngularVelocity | Angular velocity of specified actor for each time step of the simulation, returned as a AngularVelocity structure array. | 
| WheelPose | Wheel pose of specified actor for each time step of the simulation, returned as a WheelPose structure array. | 
| ScenarioFile | Scenario file used to generate log. | 
| InitialState | Actor state before the start of a simulation, returned as a InitialState Structure structure. The returned structure fields vary based on the actor type. | 
| TrafficSignal | Traffic signal run-time information, returned as a TrafficSignal structure array. | 
| TrafficSignalController | Traffic signal controller run-time information, returned as a TrafficSignalController structure array. | 
More About
This table describes the fields of each structure within the
          Diagnostics structure array:
| Field Name | Description | 
|---|---|
| Time | Simulation time step at which diagnostic message is reported. | 
| MessageType | Type of reported message, returned as an enumeration variable of the
                       The value
                    of  
 
 | 
| Message | Diagnostic message text, returned as a string or character vector. | 
This table describes the fields of each structure within the Actions
        structure array:
| Field Name | Description | 
|---|---|
| Time | Each simulation time step, from start to end. | 
| Action | Actions of the specified actor, if any, at each simulation time step. | 
This table describes the fields of each structure within the Events
        structure array:
| Field Name | Description | 
|---|---|
| Time | Each simulation time step, from start to end. | 
| Events | Events being sent by the specified actor, if any, at each simulation time step. | 
This table describes the fields of each structure within the Pose
        structure array:
| Field Name | Description | 
|---|---|
| Time | Each simulation time step, from start to end. | 
| Pose | Pose of the specified actor at each simulation time step. | 
This table describes the fields of each structure within the Velocity
        structure array:
| Field Name | Description | 
|---|---|
| Time | Each simulation time step, from start to end. | 
| Velocity | Velocity of the specified actor at each simulation time step. | 
This table describes the fields of each structure within the
          AngularVelocity structure array:
| Field Name | Description | 
|---|---|
| Time | Each simulation time step, from start to end. | 
| AngularVelocity | Angular velocity of the specified actor at each simulation time step. | 
This table describes the fields of a structure within the WheelPose
        structure array:
| Field Name | Description | 
|---|---|
| Time | Each simulation time step, from start to end. | 
| WheelPose | The wheel pose of the specified actor at each simulation time step. 
 | 
This table describes the InitialState structure:
| Field Name | Description | 
|---|---|
| Time | Time step at which actor was created, returned as a double. | 
| ActorID | Actor identifier, returned as a string. | 
| Pose | Initial actor pose, returned as a 4-by-4 matrix. | 
| Velocity | Initial actor velocity, returned as a 1-by-3 matrix. | 
| AngularVelocity | Initial angular velocity of actor, returned as a 1-by-3 matrix. | 
| WheelPose | Initial wheel pose of vehicle actor, returned as a 4-by-4-by-4 array. | 
| TrafficSignalState | Initial state of the specified traffic signal actor, returned as a structure of type TrafficSignalRuntime. | 
| TrafficSignalControllerState | Initial state of the specified traffic signal controller actor, returned as a structure of type TrafficSignalControllerRuntime. | 
This table describes the TrafficSignal structure array:
| Field Name | Description | 
|---|---|
| Time | Each simulation time step, from start to end. | 
| TrafficSignal | Traffic signal run-time information for the specified actor ID, returned as a TrafficSignalRuntime structure. | 
This table describes the TrafficSignalController structure array:
| Field Name | Description | 
|---|---|
| Time | Each simulation time step, from start to end. | 
| TrafficSignalController | Traffic signal controller run-time information for the specified actor ID, returned as a TrafficSignalControllerRuntime structure. | 
Version History
Introduced in R2022aView error, warning, or information messages that RoadRunner Scenario reports during scenario simulation, in addition to the diagnostics reported by
          MATLAB and Simulink cosimulation clients, or custom messages dispatched by the reportDiagnostic function.
Use the get function to log run-time information for traffic signal
        and traffic signal controller actors, at each time step of a scenario simulation.
Use the get function to log information about the state of an actor
        before the simulation starts.
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- 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)