Main Content

status

Get current status of RoadRunner using MATLAB

Since R2022b

    Description

    rrStatus = status(rrApp) gets the status of the RoadRunner application. The function returns the project, the scene or scenario that is currently loaded and any unsaved changes in the project, scene, or scenario.

    example

    Examples

    collapse all

    Get the status of RoadRunner application.

    Open a project in RoadRunner using the roadrunner function by specifying the location in which to create a project. This example assumes that RoadRunner is installed in its default location in Windows.

    Specify the path to an existing project. For example, this code shows the path to a project located on C:\RR\MyProject. The function returns a roadrunner object, rrApp, that provides functions for performing basic workflow tasks such as opening, closing, and saving scenes and projects.

    projectFolder = "C:\RR\MyProject";
    rrApp = roadrunner(projectFolder, InstallationFolder='C:\Program Files\RoadRunner R2022b\bin\win64');

    Open an existing scenario in RoadRunner Scenario by calling the openScenario function and passing it the rrApp object and the specific scenario filename that you want to open. This call opens the desired scenario in the RoadRunner Scenario application through MATLAB.

    filename = "TrajectoryCutIn.rrscenario";
    openScenario(rrApp,filename);

    Get the status of the RoadRunner application by calling the status function and passing it the rrApp object. This call returns the current project, scenario and any unsaved changes in the project.

    rrStatus = status(rrApp)
    rrStatus = struct with fields:
         Project: [1×1 struct]
           Scene: [1×1 struct]
        Scenario: [1×1 struct]
    
    

    View project, scene and scenario details from the status of the RoadRunner application.

    rrStatus.Project
    ans = struct with fields:
        UnsavedChanges: 0
              Filename: 'C:/RR/MyProject'
    
    
    rrStatus.Scene
    ans = struct with fields:
        UnsavedChanges: 1
              Filename: 'C:/RR/MyProject/Scenes/ScenarioBasic.rrscene'
    
    
    rrStatus.Scenario
    ans = struct with fields:
        UnsavedChanges: 0
              Filename: 'C:/RR/MyProject/Scenarios/TrajectoryCutIn.rrscenario'
    
    

    Input 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.

    Output Arguments

    collapse all

    Status of the RoadRunner application, specified as a struct. The function returns the project, the scene or scenario that is currently loaded and any unsaved changes in the project.

    Tips

    • RoadRunner makes changes automatically to the scene or scenario in the following cases:

      • When you switch to Scenario Editing, RoadRunner quantizes the road network to eliminate small roads and lanes.

      • When you load a scene or a scenario from a previous release, RoadRunner updates the internal data.

      In these cases, you will see unsaved changes in the response output of the status function call, despite having made no changes to the scene or scenario.

    Version History

    Introduced in R2022b