RoadRunner can export scenes to the OpenDRIVE® (
.xodr) file format.
RoadRunner can export scenes to the OpenDRIVE 1.4 format. The OpenDRIVE export option exports an OpenDRIVE (
.xodr) file containing the layout of the scene and an
optional MathWorks® GeoJSON file.
From the menu, select File > Export > OpenDRIVE (.xodr).
To preview the OpenDRIVE export and explore exported data interactively, use the OpenDRIVE Export Preview Tool
The Export OpenDRIVE dialog box has several options to conform to various simulator needs.
|Database Version||A user-defined identifier for the exported scene. Useful for versioning exports of the same scene.|
|Database Name (optional)||A user-defined name for the exported scene.|
A hint to the exporter for the driving side of the scene. Travel direction is explicitly defined in RoadRunner using the Lane Travel Direction.
The travel direction in OpenDRIVE is implicit based on the country and side of the road.
|Export markings as <line>||Select this attribute to export additional lane marking data (spacing, dash length, and individual paint strip widths).|
Select this attribute to export all signals and signs mapped to
|Export objects||Select this attribute to export all props as
|Export conflict points||Select this attribute to export an |
|Export scene origin reference|
Select this attribute to export a point at 0,0 in the scene. This
point enables a connection between FLT or IVE files and the exported
OpenDRIVE file. This point is contained in a
|Clamp distances (prevents very short roads)|
Select this attribute to clamp distances in the RoadRunner scene to be a multiple of 1 cm to prevent very short roads.
This clamping is performed on the scene itself, so it can cause very small changes to the roads in the scene.
This section describes how various types of RoadRunner objects are represented in OpenDRIVE.
Roads, lanes, and junctions are exported to OpenDRIVE using the standard
For each road in a scene, RoadRunner creates one or more
<road> entries. Whenever a road
ends or a junction begins or ends, RoadRunner creates a unique
<road> entry. OpenDRIVE
<road> entries cannot extend through a junction, so the geometry
is cut and exported as separate roads.
<railroad> entries are
For each lane in a scene, RoadRunner creates one or more
<lane> entries. The resulting
<lane> entry is placed on one side or the other of the center
lane, depending on its travel direction or the travel direction of neighboring lanes and
the selected Driving Side during export. Whenever a lane starts or
ends, RoadRunner creates a new
level flag in
<lane> entries is not
<access> entries are
also not used.
For each junction in a scene, RoadRunner creates a
<junction> entry. RoadRunner exports some junctions as one
<junction> entry due
to overlapping maneuver roads or corners. A connecting
entry is exported for each maneuver road in each junction. Where possible, the exporter
prefers the geometry and lane markings of nonmaneuver roads that extend through the
junction. The resulting geometry of each connecting road might be the combination of
multiple maneuver and nonmaneuver roads.
<priority> entry is not used.
Prop polygons are not exported, but if you run the bake operation to convert them to points, you can export them in point format. See Prop Polygon Tool.
With the exception of traffic signals and signs (see below), point props are exported
<object> instances. The exported prop includes sufficient
information to identify the prop type and the oriented bounding box (OBB) of the prop
In OpenDRIVE, objects are stored on roads. The position and orientation of a given object depends on the geometry of the road it is assigned to. RoadRunner props are freely positioned in the world, so the export process must choose a road for each prop to export. In most cases, RoadRunner selects the road closest to the prop.
In some cases, it is impossible to represent a prop's position in OpenDRIVE. In this image, the bush on the right is past the end of the road and there is no other road in the scene. In this case, the prop is not exported and a warning is displayed during export.
Prop Attributes. Exported props include the following attributes:
|Name of the prop asset (for example,
|Inertial position of the prop point|
|Inertial rotations of the prop point|
|Relative height of the prop point|
|Dimensions of the prop model's bounding box|
|Object type, as defined by the configuration XML file for the point's asset (refer to OpenDRIVE User Asset Configuration)|
Crosswalks and marking polygons are exported as OpenDRIVE
<outline> objects, similar to the crosswalk example in section 7.4
of the OpenDRIVE 1.5M specification.
Unlike that example, RoadRunner exports the polygon vertices as
objects (rather than
<cornerRoad> objects), which means that the
vertices are defined relative to the pivot point specified in the attributes of the
This example code shows the representation of the crosswalk polygon in the previous image.
<object id="162" name="ContinentalCrosswalk" s="5.9095723267801631e+1" t="1.7834630409170869e+0" zOffset="1.9073486328125000e-6" hdg="1.3359605073928833e+0" roll="0.0000000000000000e+0" pitch="0.0000000000000000e+0" orientation="-" type="crosswalk" width="2.9256307177817877e+0" length="1.6163854233175169e+1"> <outline> <cornerLocal u="-8.0157129245630365e+0" v="1.4628157932607735e+0" z="0.0000000000000000e+0"/> <cornerLocal u="8.0819274304890261e+0" v="1.0363072624453764e+0" z="-1.9073486328125000e-6"/> <cornerLocal u="8.0157129245556504e+0" v="-1.4628157932298933e+0" z="-1.9073486328125000e-6"/> <cornerLocal u="-8.0819274304964104e+0" v="-1.0363072624144962e+0" z="0.0000000000000000e+0"/> <cornerLocal u="-8.0157129245630365e+0" v="1.4628157932607735e+0" z="0.0000000000000000e+0"/> </outline> </object>
Crosswalks and Marking Polygon Attributes. Exported crosswalks and marking polygons include the following attributes.
|Name of the marking (for example,
|Inertial position of the pivot point|
|Inertial rotations of the pivot point|
|Relative height of the pivot point|
|Dimensions of an oriented bounding box fit to the polygon's vertices.
|Object type, as defined by the configuration XML file for the marking's asset (refer to OpenDRIVE User Asset Configuration)|
RoadRunner exports traffic signals and signs as OpenDRIVE
For optimal behavior, traffic signals and signs for controlled intersections should be mapped to junction gates by using the Signal Tool. Traffic signals are exported only if they are mapped to junction gates. Signs are exported regardless if they are mapped to junction gates and are automatically mapped to the nearest road if not explicitly mapped.
If you need to add a traffic signal outside of a controlled intersection (for example, for a freeway onramp or pedestrian crossing), you can use the Custom Junction Tool to create a junction along a single road.
Signals and Signal References. When a signal or sign is mapped to a junction gate, it appears in the OpenDRIVE export as a
<signal> instance and one or more
<signalReference> instances, where:
<signal> defines the physical location of the
<signal> to derive the 3D location of the
signal, regardless of which roads or lanes are controlled by the signal. In
most cases, the signal is mapped to the closest road (similar to the approach
used for Props). This
mapping might have no logical association to the signal (for example, the
signal could be a nearby side street).
<signalReference> associates the signal to the roads
and lanes that are controlled by the signal. Signal references indicate the
semantic relationship between the signal and the road network (as opposed to
<signal>, which is used purely for geometric
positioning). Signal references are present for each maneuver road gate
associated with the signal (through the Signal Tool).
Signal Attributes. Exported signals and signs include the following attributes:
Refer to Prop Attributes.
|Signal type and subtype, as defined by the configuration XML file for the signal's asset (refer to OpenDRIVE User Asset Configuration)|
|Unused (set to |
|Unused (set to empty string in all cases).|
RoadRunner exports parking spaces as an
<object> with type
"parking" and an additional
entry under the
<object> following section 18.104.22.168.5 in the
OpenDRIVE 1.4H specification. Markings on a parking space are exported as
<marking> under the
following section 22.214.171.124.6 in the OpenDRIVE 1.4H specification.
Parking Attributes. Exported parking spaces include the following attributes.
|Refer to Prop Attributes.|
|Always set to |
|Side of the marking (|
|Same properties as |
The OpenDRIVE exporter uses a configuration XML file to map RoadRunner props, signals, signs, and markings to the appropriate
subtype. This configuration file is also used
to define the correlation during import.
OpenDriveAssetData.xml file located in the
RoadRunner install location under
AssetsInstall/ResourceAssets to the
Project folder in your project, next to the
Project.rrproj file. For more details on the project folder
setup, see RoadRunner Project and Scene System.
Open the new
OpenDriveAssetData.xml file in a text
Add entries for new objects, markings, or signals.
Save your file and export an OpenDRIVE file.
You do not need to restart RoadRunner after creating or modifying the
Here is the definition of the format of the
<?xml version="1.0"?> <OpenDriveAssetData> <Objects> <Object> <Type> OpenDRIVE
type</Type> (Required) <Id> OpenDRIVE object "id" </Id> (Optional - only used for Import) <Name> OpenDRIVE object "name" </Name> (Optional - only used for Import) <Radius> OpenDRIVE object "radius" </Radius> (Optional - only used for Import) <Height> OpenDRIVE object "height" </Height > (Optional - only used for Import) <FilePath> Relative Asset file path to RoadRunner asset </FilePath> (Required) </Object> </Objects> <Markings> <RoadMark> <Type> OpenDRIVE "type" </Type> (Required) <Color> OpenDRIVE "color" </Color> (Optional) <FilePath> Relative Asset file path to RoadRunner asset </FilePath> (Required) </RoadMark> </Markings> <Signals> <Signal> <Type> OpenDRIVE "type" </Type> (Required) <SubType> OpenDRIVE "subtype" </SubType> (Optional) <Id> OpenDRIVE signal "id" </Id> (Optional - only used for Import) <Name> OpenDRIVE signal "name" </Name> (Optional - only used for Import) <Country> OpenDRIVE signal "country" </Country> (Optional - only used for Import) <Value> OpenDRIVE signal "value" </Value> (Optional - only used for Import) <FilePath> File path to RoadRunner asset </FilePath> (Required) <Variant> Variant of RoadRunner signal/sign asset (integer, where 0 is the first variant, 1 is the second, etc.) </Signal> </Signals> </OpenDriveAssetData>
Here is a list of features that are not exported from RoadRunner to OpenDRIVE.
Prop polygons (these polygons can be exported only if you run the 'bake' operation to convert them to points). For more details, see Prop Polygon Tool.
Lateral profile (overall road banking is exported, but the full cross-section profile described in the Cross Section Tool is not exported)
Road surface heightfield (CRG)