openScenarioXMLExportOptions
R2026bSpecify options for customizing RoadRunner files exported to ASAM OpenSCENARIO XML format
Renamed from openScenarioExportOptions in R2025a
Description
The openScenarioXMLExportOptions object enables you to specify
options for customizing RoadRunner scene and scenario files exported to the ASAM OpenSCENARIO® XML format.
Creation
Description
options = openScenarioXMLExportOptions creates a default
ASAM OpenSCENARIO XML export options configuration object.
options = openScenarioXMLExportOptions(
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
ASAM OpenSCENARIO XML file version to export, specified as either 1.0 or
1.1.
Example: options =
openScenarioXMLExportOptions(OpenScenarioVersion=1.1); exports the file to
the ASAM OpenSCENARIO XML 1.1 format.
Data Types: double
Scene graph file export and customization options, specified as a
sceneGraphExportOptions object. These options specify
whether to export an OpenSceneGraph file with the ASAM OpenSCENARIO XML file, and options for its export.
Export location of the ASAM OpenDRIVE file that accompanies the exported ASAM OpenSCENARIO XML 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.
Export options for the ASAM OpenDRIVE file, specified as an openDriveXMLExportOptions
object.
Example: options =
openScenarioXMLExportOptions(OpenDriveOptions=openDriveExportOptions(ExportObjects=true));
specifies for RoadRunner to also export all scene props as <object> entries
when exporting an ASAM OpenDRIVE file.
Option to move non-instantaneous InitActions to stories upon
export, specified as a logical 1 (true) or
0 (false).
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.
Option to reference a catalog, specified as a catalogOptions object.
This option specifies for RoadRunner Scenario to reference a catalog when exporting your scenario to an ASAM OpenSCENARIO XML format.
Option to relocate the origin of each vehicle from the geometric center of the
vehicle to the midpoint of the rear axle of the vehicle, specified as a logical
1 (true) or 0
(false). By default, RoadRunner Scenario exports the vehicle origin to the geometric center of the vehicle. If you
specify this option as true, RoadRunner Scenario relocates the vehicle origin to the midpoint of the rear axle of the
vehicle for export.
Option to export floating point values with double precision, specified as a logical
1 (true) or 0
(false). If you specify this option as true,
RoadRunner Scenario exports the floating point attribute values of actors and elements with
double precision. If you specify this property as false, RoadRunner Scenario rounds floating point values up at six digits after the decimal
point.
Options for exporting mesh files for the actors in a scenario, specified as an
actorMeshSettings object. This option specifies to
export the actor meshes to one of various formats, which improves interoperability with
external simulators.
Option to replace the runningState element in the exported
.xosc file, specified as a logical 1
(true) or 0 (false). By
default, RoadRunner Scenario exports a startTransition element under the
StoryboardElementStateCondition element. To export a
runningState element under
StoryboardElementStateCondition, specify this option as
true.
Option to export an EnvironmentAction element in the exported
.xosc file, specified as a logical 1
(true) or 0 (false). By
default, RoadRunner Scenario does not export an EnvironmentAction element. To export
an EnvironmentAction element under the Storyboard
element, specify this option as true.
Option to export the traffic signals of the scenario in the .xosc
file, specified as a logical 1 (true) or
0 (false). By default, RoadRunner Scenario does not export traffic signals in the .xosc file. To
export traffic signals, specify this option as true.
Position type used for exporting scenario entities, specified as one of these options:
"Unspecified"— No position type specified."LanePosition"— Export the position of the entity using lane‑based coordinates. The exported.xoscfile defines the position by the road ID, lane ID, and the longitudinal s‑coordinate along the reference line of the road."WorldPosition"— Export the position of the entity in global coordinates. The exported.xoscfile defines the position in the world coordinate system."RoadPosition"— Export the position of the entity using road‑based coordinates. The exported.xoscfile defines the position relative to the coordinate system of the road.
Examples
When you export your RoadRunner scenario, you can specify options for the exported ASAM OpenSCENARIO XML file by using the
openScenarioXMLExportOptions.
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 XML export options by specifying the properties of an
openScenarioXMLExportOptions object. Then, export your scenario
using the exportScenario function, specifying the
openScenarioXMLExportOptions object as input.
For more information on exporting your scenario with MATLAB®, see exportScenario.
filename = "TrajectoryCutIn.rrscenario.xosc"; formatname = "OpenSCENARIO XML"; options = openScenarioXMLExportOptions(OpenScenarioVersion=1.0,MoveNonInstantaneousInitActions=false); exportScenario(rrApp,filename,formatname,options)
Version History
Introduced in R2022aYou can now specify additional options to improve interoperability with external simulators using these new properties:
ExportWithDoublePrecision— Export floating point values with full double precision instead of rounding them to six decimal places.ActorMeshSettings— Export mesh files of the specified types for the actors in a scenario.ReplaceRunningState— Replace therunningStateelement with astartTransitionelement.ExportEnvironmentAction— Export anEnvironmentActionelement.ExportTrafficSignals— Export the traffic signals of a scenario.PositionType— Specify the position type used for exporting scenario entities.
You can relocate the origin of each vehicle from the geometric center of the vehicle to
the midpoint of the rear axle of the vehicle by specifying the
RelocateVehicleOrigin property as true.
ASAM has updated the names of the ASAM OpenSCENARIO standards. ASAM OpenSCENARIO 1.x is now referred to as ASAM OpenSCENARIO XML. To reflect this name change, openScenarioExportOptions
is now called openScenarioXMLExportOptions. The behaviour remains the
same.
As of R2024b, you can use an empty private action as the no-ops action placeholder by
specifying the NoOpsAction property as
"EmptyPrivate".
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
sceneGraphExportOptionsconfiguration object instead.
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 | openScenarioDSLExportOptions | sceneGraphExportOptions | exportScenario | actorMeshSettings
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.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- 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)