Main Content

Integrate Scenes with MATLAB and Simulink

Integrate RoadRunner scenes with MATLAB® and Simulink® for automated driving workflows

You can integrate RoadRunner scenes with MATLAB and Simulink to provide a workflow for developing and testing automated driving algorithms in a virtual environment. This integration enables you to create detailed, photo-realistic scenes in RoadRunner and use them in MATLAB and Simulink for algorithm development and testing.

An automated driving workflow encapsulates the entire process from data import and transformation to analysis, simulation, and visualization. You can create RoadRunner scenes and export them to file formats that are compatible with Simulink for scenario simulation. You can then use these scenes to test your driving algorithms in dynamic scenario environments containing vehicles, sensors, and weather conditions.

You can integrate MATLAB and Simulink with scenes at the following different stages of an automated driving workflow

  • Scene Import and Export:

    You can design scenes in RoadRunner from scratch using a graphical interface and the RoadRunner Asset Library, which contains 3D models and assets. You can also import data from a variety of formats, such as ASAM OpenDRIVE®, and Zenrin SD Maps. If you are working with HD map data like Here or TomTom or your own custom formats, you can import these maps into RoadRunner using RoadRunner Scene Builder

    RoadRunner also provides MATLAB functions for performing common workflow tasks such as opening, closing, and saving scenes and projects and importing and exporting scenes.

    The scenes you create in RoadRunner can then be exported to file formats like ASAM OpenDRIVE and Filmbox, which are compatible with MATLAB and Simulink.

  • Automation: Once you integrate RoadRunner scenes with MATLAB, you can use MATLAB scripts to automate repetitive tasks such as bulk export, running simulations or updating models based on RoadRunner data.

  • Algorithm Design and Analysis: Using MATLAB and Simulink, you can simulate driving applications to mimic real-world behaviors such as adaptive cruise control, emergency braking, lane change, platooning, and parking. Simulation results from these behaviors can influence subsequent simulations or model adjustments in RoadRunner, creating an iterative process with a high-fidelity algorithm.

Therefore, using this integration workflow, you can automate data handling and processing, reducing manual effort and the potential for errors. Your algorithms can easily adapt to handle larger datasets or more complex simulations as projects grow. This also implies that processes are consistent and an be replicated for different datasets or projects.

An automated driving application that is simulating within a scene created in RoadRunner

MATLAB Objects and Functions

expand all

roadrunnerStart RoadRunner application using MATLAB
roadrunnerHDMapCreate RoadRunner HD Map using MATLAB
exportSceneExport RoadRunner scene using MATLAB
importSceneImport scene into RoadRunner using MATLAB
exportCustomFormatExport RoadRunner scene to custom format using MATLAB

Blocks

RoadRunner ScenarioDefine interface for Simulink actor model (Since R2022a)
RoadRunner Scenario ReaderReads selected topic from RoadRunner scenario (Since R2022a)
RoadRunner Scenario WriterWrite selected topic to RoadRunner scenario (Since R2022a)

Topics

Featured Examples