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 data logging.

Objects

expand all

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

Functions

expand all

addObserverAdd observer to scenario simulation
getGet value of scenario simulation parameter
removeObserverRemove observer from scenario simulation
reportDiagnostic Report information, warning or error message during scenario simulation
setSet value of scenario simulation parameter
Simulink.ScenarioSimulation.findReturn scenario simulations or actors in current MATLAB session
sendEventPublish action completion event to 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
publishActorGenerate package for actor simulation
publishActorBehaviorGenerate proto file for actor simulation
publishCustomActionGenerate asset file for user-defined action
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