Main Content

Simulate RoadRunner Scenarios with MATLAB and Simulink

Develop MATLAB® and Simulink® behaviors, publish actor behavior, simulate behaviors in RoadRunner Scenario simulation, and control simulation and access simulation parameters

Automated Driving Toolbox™ provides a framework for simulating scenarios in RoadRunner with actors modeled in MATLAB and Simulink. For more information, see Overview of Simulating RoadRunner Scenarios with MATLAB and Simulink.

These are the steps of the workflow:

  • Author MATLAB System objects or Simulink models to define actor behavior.

  • Associate actor behavior in RoadRunner.

  • Optionally, publish an actor behavior.

  • Tune the parameters defined in MATLAB or Simulink for RoadRunner simulations.

  • Simulate a scenario using the RoadRunner user interface, or control simulations programmatically from MATLAB.

  • Inspect simulation results using the simulation log.

  • Replay a scenario simulation from a saved simulation log.

Objects

expand all

Simulink.ScenarioSimulationCreate, access, and control scenario simulation
Simulink.ActorSimulationAccess and modify runtime specifications of actor
Simulink.ActorModelView static specifications of actor
SensorSimulationAdd sensors and access sensor data from scenario simulation
Simulink.ScenarioLogView scenario simulation outcomes at any time step

Functions

expand all

addObserverAdd observer to scenario simulation
getGet value of scenario simulation parameter
loadLoad saved simulation log
removeObserverRemove observer from scenario simulation
reportDiagnostic Report information, warning or error message during scenario simulation
saveSave simulation log to file for later replay
setSet value of scenario simulation parameter
Simulink.ScenarioSimulation.findReturn scenario simulations or actors in current MATLAB session
sendEventSend event to scenario
receiveEventReceive event from scenario
convertToStructConvert actor to MATLAB structure
getGet scenario or static attribute of actor
getActionGet actions associated with actor
getAttributeGet runtime attribute of actor
setAttributeSet runtime attribute of actor
getAttribute Return static attribute of actor
addSensorsAdd sensors to vehicle actors in RoadRunner scenario
targetPosesGet positions and orientations of targets in sensor range relative to host vehicle
laneBoundariesGet lane boundaries relative to host vehicle
publishActorGenerate package for actor simulation
publishActorBehaviorGenerate proto file for actor simulation
publishCustomActionGenerate asset file for user-defined action
publishCustomEventGenerate asset file for user-defined event
getGet logged scenario simulation data

Blocks

RoadRunner ScenarioDefine interface for Simulink actor model
RoadRunner Scenario ReaderReads selected topic from RoadRunner scenario
RoadRunner Scenario WriterWrite selected topic to RoadRunner scenario

Topics