Main Content

roadrunnerSetup

Start RoadRunner interactively using MATLAB

Since R2023b

    Description

    rrApp = roadrunnerSetup enables you to start the RoadRunner application interactively. The function opens a dialog box to specify the project folder and installation folder to use when opening RoadRunner. It, then, opens RoadRunner from the specified installation folder to a new scene in the specified project. To save these folders between MATLAB® sessions, select the option from the corresponding drop down. For more details about installation folder and project folder, see InstallationFolder and projectFolder properties.

    The function returns an object, rrApp that enables you to perform common workflow tasks in the RoadRunner application, such as opening, closing, and saving scenes and projects. You can also use object functions to import data from files and export scenes from RoadRunner to other formats.

    example

    Examples

    collapse all

    Start RoadRunner interactively using the roadrunnerSetup function. This example assumes that RoadRunner is installed in its default location in Windows.

    Call the roadrunnerSetup function. When the RoadRunner Setup dialog box opens up, specify the RoadRunner Project Folder and RoadRunner Installation Folder locations. The function returns a roadrunner object, rrApp, that provides functions for performing basic workflow tasks such as opening, closing, and saving scenes and projects

    rrApp = roadrunnerSetup;

    Open a scene in the project by using the openScene function with the roadrunner object and the RoadRunner scene you wish to open as input arguments. This example uses the FourWaySignal.rrscene scene, which is one of the scenes included by default in RoadRunner projects, and is located in the Scenes folder of the project.

    sceneName = "FourWaySignal.rrscene";
    openScene(rrApp,sceneName);

    Set export options by creating an openDriveExportOptions object to enable export of signals and objects from the file.

    options = openDriveExportOptions(OpenDriveVersion=1.5,ExportSignals=true,ExportObjects=true);

    Use the exportScene function to export the scene to ASAM OpenDRIVE. Specify your roadrunner object, the name of the file to which you want to export the scene, the export format, and the export options as input arguments to the exportScene function.

    filename = "FourWaySignal.xodr";
    formatname = "OpenDRIVE";
    exportScene(rrApp,filename,formatname,options);

    Close the RoadRunner instance rrApp.

    close(rrApp);

    Output Arguments

    collapse all

    RoadRunner application associated with a project, specified as a roadrunner object. This object provides functions for performing common workflow tasks such as opening, closing, and saving scenes and projects. rrApp provides functions that support importing data from files and exporting scenes to other formats from RoadRunner.

    Version History

    Introduced in R2023b