Get current status of RoadRunner using MATLAB
Retrieve Status of RoadRunner Application
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
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.
ans = struct with fields: UnsavedChanges: 0 Filename: 'C:/RR/MyProject'
ans = struct with fields: UnsavedChanges: 1 Filename: 'C:/RR/MyProject/Scenes/ScenarioBasic.rrscene'
ans = struct with fields: UnsavedChanges: 0 Filename: 'C:/RR/MyProject/Scenarios/TrajectoryCutIn.rrscenario'
rrApp — RoadRunner application
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
rrApp provides functions that support importing data from
files and exporting scenes to other formats from RoadRunner.
rrStatus — Status of RoadRunner application
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.
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
statusfunction call, despite having made no changes to the scene or scenario.
Introduced in R2022b