openScenarioExportOptions
Specify options for customizing RoadRunner files exported to ASAM OpenSCENARIO 1.x format
Since R2022a
Description
The openScenarioExportOptions
object enables you to specify
options for customizing RoadRunner scene and scenario files exported to the ASAM OpenSCENARIO® 1.x format.
Creation
Description
options = openScenarioExportOptions
creates a default ASAM OpenSCENARIO 1.x export options configuration object.
options = openScenarioExportOptions(
specifies properties using one or more name-value arguments. For example,
Name=Value
)MoveNonInstantaneousInitActions=false
specifies not to move any
non-instantaneous InitActions
to stories upon export.
Properties
OpenScenarioVersion
— ASAM OpenSCENARIO file version to export
"auto"
(default) | 1.0
| 1.1
ASAM OpenSCENARIO file version to export, specified as either 1.0
or
1.1
.
Example: options =
openScenarioExportOptions(OpenScenarioVersion=1.1);
exports the file to the
ASAM OpenSCENARIO 1.1 format.
Data Types: double
SceneGraphOptions
— Scene graph file export and customization options
"auto"
(default) |
sceneGraphExportOptions
object
Scene graph file export and customization options, specified as a sceneGraphExportOptions
(RoadRunner Scenario) object. These options specify whether to export an
OpenSceneGraph file with the ASAM OpenSCENARIO file, and options for its export.
OpenDriveFileName
— Export location of ASAM OpenDRIVE® file
string scalar | character vector
Export location of the ASAM OpenDRIVE file that accompanies the exported ASAM OpenSCENARIO file, specified as an absolute or relative file path. You must specify a
path that ends in the .xodr
file extension. If you specify a relative
path, then RoadRunner saves the exported ASAM OpenDRIVE file relative to the ASAM OpenSCENARIO file path.
If the specified filename already exists at the specified location, then RoadRunner overwrites the data in the existing file.
OpenDriveOptions
— Export options for ASAM OpenDRIVE file
"auto"
(default) | openDriveExportOptions
object
Export options for the ASAM OpenDRIVE file, specified as an openDriveExportOptions
object.
Example: options =
openScenarioExportOptions(OpenDriveOptions=openDriveExportOptions(ExportObjects=true));
specifies for RoadRunner to also export all scene props as <object>
entries
when exporting an ASAM OpenDRIVE file.
MoveNonInstantaneousInitActions
— Option to move non-instantaneous InitActions
to stories upon export
"auto"
(default) | true
or 1
| false
or 0
Option to move non-instantaneous InitActions
to stories upon
export, specified as a logical 1
(true
) or
0
(false
).
NoOpsAction
— No-ops action type
"auto"
(default) | "Unspecified"
| "UserDefined"
| "Empty"
| "EmptyPrivate"
No-ops (no operations) action type, specified as one of these options:
"Unspecified"
— No no-ops action specified."UserDefined"
— Use a user-defined action as a placeholder."Empty"
— Use an empty action as a placeholder."EmptyPrivate"
— Use an empty private action as a placeholder.
No-ops actions do not have specific behaviors, but they impact scenario logic, serving as substitutes for actions specific to RoadRunner and absent from ASAM OpenSCENARIO. Select the placeholder type used to reflect these actions in the exported data.
Examples
Specify ASAM OpenSCENARIO 1.x File Options During Scenario Export
When you export your RoadRunner scenario, you can specify options for the exported ASAM OpenSCENARIO file by using the openScenarioExportOptions
.
Create a roadrunner
object, specifying the path to an existing
project. For example, this code shows the path to a project, on a Windows® machine, located at "C:\RR\MyProject"
. This code
assumes that RoadRunner is installed in the default location, and returns an object,
rrApp
, that provides functions for performing basic tasks such as
opening, closing, and saving scenes and
projects.
rrApp = roadrunner(ProjectFolder="C:\RR\MyProject");
Open an existing scenario in RoadRunner Scenario by using the openScenario
function with the
roadrunner
object rrApp
and the filename of the
specific scenario that you want to open.
filename = "TrajectoryCutIn.rrscenario";
openScenario(rrApp,filename)
Set your ASAM OpenSCENARIO export options by specifying the properties of an
openScenarioExportOptions
object. Then, export your scenario using
the exportScenario
function, specifying the
openScenarioExportOptions
object as input.
For more information on exporting your scenario with MATLAB®, see exportScenario
(RoadRunner Scenario).
filename = "TrajectoryCutIn.rrscenario.xosc"; formatname = "OpenSCENARIO"; options = openScenarioExportOptions(OpenScenarioVersion=1.0,MoveNonInstantaneousInitActions=false); exportScenario(rrApp,filename,formatname,options)
Version History
Introduced in R2022aR2024b: Specify empty private action as a NoOpsAction
placeholder
As of R2024b, you can use an empty private action as the no-ops action placeholder by
specifying the NoOpsAction
property as
"EmptyPrivate"
.
R2024a: SceneGraphOptions
property replaces all other scene graph settings in openScenarioExportOptions
As of R2024a, openScenarioExportOptions
no longer supports the
SceneGraphFormatName
, SceneGraphFileName
,
ExportSceneGraph
, and OpenSceneGraphOptions
properties. To configure your scene graph export settings, specify the
SceneGraphOptions
property by using a sceneGraphExportOptions
(RoadRunner Scenario) configuration object instead.
R2024a: New Properties: MoveNonInstantaneousInitActions
, NoOpsAction
, and OpenDriveFileName
As of R2024a, you can use the MoveNonInstantaneousInitActions
property to move any non-instantaneous InitActions
to stories, and the
NoOpsAction
property to specify no operations action types, when
exporting your scenario to an ASAM OpenSCENARIO 1.x format. Additionally, you can use the OpenDriveFileName
property of the openScenarioExportOptions
object to specify a file path to
which to save an ASAM OpenDRIVE file when you export an ASAM OpenSCENARIO file.
See Also
roadrunner
| openScenario2ExportOptions
| sceneGraphExportOptions
| exportScenario
Topics
- Simulate a RoadRunner Scenario Using MATLAB Functions (RoadRunner Scenario)
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)