status
Get current status of RoadRunner using MATLAB
Syntax
Description
Examples
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 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
rrApp
— RoadRunner application
roadrunner
object
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
rrStatus
— Status of RoadRunner application
struct
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.
Version History
Introduced in R2022b
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)