opendrive file structure

1. File structure

OpenDRIVE data is stored in XML files with the file extension .xodr. The extension of OpenDRIVE compressed files is ".xodrz" (compression format gzip).

The structure of the OpenDRIVE file conforms to the XML rules; the associated schema file is referenced in the XML. The pattern file for the OpenDRIVE format can be read from the following link:

https://www.asam.net/standards/detail/opendrive/

The elements are placed in a hierarchy. Elements with a level greater than zero (0) are the children of the previous level, and elements with a level equal to one (1) are the main elements.

Each element can be expanded through user-defined data. Such data is stored in the "user data" element.

All floating-point numbers used in OpenDRIVE are IEEE 754 double-precision floating-point numbers. In order to ensure the accurate representation of floating-point numbers in XML notation, the correct accuracy of the known floating-point number printing algorithm (such as [Burger96], [Adams18]) should be used to perform execution, or the execution should ensure that there is always 17 A valid decimal number is generated (for example, using the "%.17g" ISO C printf modifier). When importing, it is recommended to use a known correct precision to preserve floating point numbers and read the algorithm (for example, [Clinger90]). Each element can be expanded through user-defined data. Such data is stored in the "user data" element.

2. Combine files

You can use the <include> tag to merge multiple files at the appropriate location. After parsing the tag, the OpenDRIVE reader must immediately start reading the file as the tag attribute. The user is responsible for ensuring that the content read from the include file is consistent with the context at the beginning of the include.

The <include> tag occurs under the parent tag, and the parent tag must exist in the parent file and the include file.

示例:
 原始文件

<planView>
<include file="planview.xml"/>
</planView>

包含文件

<planView>
<geometry x="-0.014" y="-0.055" hdg="2.88" length="95.89" s="0.0">
<arc curvature="-0.000490572"/>
</geometry>
<geometry x="-92.10" y="26.64" hdg="2.84" length="46.65" s="95.89">
<spiral curvStart="-0.000490572" curvEnd="-0.004661241"/>
</geometry>
</planView>

3. Attributes used in the file

3.1 Closed elements

 The beginning and ending elements of the file are:

3.2 Header file

The <header> element is the first element in <OpenDRIVE>.

The attributes of the header file element:

3.3 General rules and assumptions

Unless otherwise stated, it is assumed to be a right-hand driving environment.

4. Additional data

4.1 User data

It should be described near the element referenced by the auxiliary data. Auxiliary data includes data that has not been described in OpenDRIVE or is used for a certain application for special reasons, such as different road textures.

In OpenDRIVE, auxiliary data is represented by the <userData> element. They can be stored in any element of OpenDRIVE.

4.2 Including data

OpenDRIVE allows external files to be included in OpenDRIVE files, and how to handle such files depends on the application. The included data is represented by the <include> element and can be stored anywhere in OpenDRIVE.

4.3 Use different layout types

The layout of user-generated elements (such as road signs or signs) can be integrated in OpenDRIVE. These additional layout designs are not stored in OpenDRIVE, but in the user application.

In OpenDRIVE, different layout types are represented by <set> elements, which can be stored anywhere in OpenDRIVE. Each <set> element can be associated with one or more <instance> elements that describe the layout.

4.4 Data quality description

The quality of raw data integrated into OpenDRIVE or data from external sources may vary. The quality and accuracy of external data can be described in OpenDRIVE.

The description of data quality is represented by the <dataQuality> element. They can be stored anywhere in OpenDRIVE.

The measurement data integrated into OpenDRIVE and derived from GPS and other external resources may have errors. The error range in [m] can be listed in the application.

The absolute or relative error of road data is described by the <error> element in the <dataQuality> element.

Some basic metadata covers the raw data information included in OpenDRIVE. These raw data are described by the <rawData> element in the <dataQuality> element.

 

 

Guess you like

Origin blog.csdn.net/whuzhang16/article/details/110199448