Super detailed explanation of ASAM OpenDRIVE V1.7 protocol (1)


Preface

本文内容引用ASAM官方OpenDrive V1.7介绍

ASAM is the abbreviation of "Automotive Software and Systems Modeling". It is an automotive industry standardization organization that aims to develop and maintain standards related to automotive software and systems. OpenDRIVE is an open standard for virtual simulation scenarios. It is designed to describe the detailed information of road networks and scenarios and is the key to simulation scenarios part to support the development and testing of autonomous driving and driver assistance systems. Static components

Click to download OpenDRIVE official documents and cases


1. Composition of simulation scene

ASAM OpenDRIVE defines a static road network format (.xodr), and ASAM OpenCRG can add road surface descriptions (.crg) to the road network. ASAM OpenDRIVE and ASAM OpenCRG contain only static content. To add dynamic content, ASAM OpenSCENARIO(.xosc) is required. By combining all three standard files, a standard simulation scenario can be formed.

Insert image description here


2. openDRIVE framework

1. The ASAM OpenDRIVE framework is mainly composed of header, road, controller, junction, junctionGroup, and station. It is mainly composed of 6 elements. The 6 Elements and their sub-Elements can be selectively associated with g_additionalData (additional data).

Insert image description here

2. Coordinate system in openDRIVE

Insert image description here


三、g_additionalData

1. g_additionalData additional data is an optionoptional. Element can customize whether to associate the g_additionalData node; the g_additionalData node is used to send data to OpenDRIVE Add custom information or additional data to the road network description, and its topology is as shown in the figure below;

Insert image description here

2. include in g_additionalData allows external files to be included in ASAM OpenDRIVE files. For example, references to external files can be placed in the include element.

3. userdata in g_additionalData can be used to add any custom information to the OpenDRIVE road network description to meet specific needs or add Additional details. Usually, the content of userdata is defined by users based on their specific application scenarios.

4.dataQuality in g_additionalData, raw data or data from external sources integrated in ASAM OpenDRIVE may have different qualities. The quality and accuracy of external data can be described in ASAM OpenDRIVE. The error of dataQuality can describe the absolute error and relative error range (in [m]) of external data (such as GPS data). dataQuality's rawData describes some basic metadata that contains information about the raw data contained in ASAM OpenDRIVE. It has a lot of content. Please see the resources I uploaded for the detailed format. document.

XML fragment

<OpenDRIVE>
  <road>
    <lanes>
      <laneSection>
        <left>
          <lane>
            <g_additionalData>
              <!-- 附加数据 -->
              <key>myKey</key>
              <value>myValue</value>
            </g_additionalData>
          </lane>
        </left>
      </laneSection>
    </lanes>
  </road>
</OpenDRIVE>

4. openDRIVE-header

1. The general definition of header in OpenDRIVE: version information, description information, creator information, date and time stamp, coordinate information, etc. The topology is as shown in the figure below;

Insert image description here

XML fragment

<?xml version="1.0" encoding="UTF-8"?>
<OpenDRIVE>
  <header>
    <revMajor>1</revMajor>
    <revMinor>4</revMinor>
    <name>Example Road</name>
    <version>1.0</version>
    <date>2023-11-12</date>
    <north>0.0</north>
    <south>0.0</south>
    <east>0.0</east>
    <west>0.0</west>
    <!-- 其他头部信息 -->
  </header>
  <!-- 其他道路信息 -->
</OpenDRIVE>


5. openDRIVE-road

1. Road overall topology

Insert image description here

2. Introduction to Road-link

The link in the road node is mainly used to describe the transition and connection relationship between two different road parts;

1) Link topology

Insert image description here

XML fragment

<OpenDRIVE>
  <!-- 头部信息 -->
  
  <road name="Road 1" id="1" length="100.0">
    <!-- 道路属性 -->
    
    <link>
      <predecessor elementType="road" elementId="2" elementDir="-1" elementS="0.0" contactPoint="end"/>
      <successor elementType="road" elementId="3" elementDir="1" elementS="0.0" contactPoint="start"/>
    </link>
    
    <!-- 其他道路元素 -->
    
  </road>
  
  <!-- 其他道路信息 -->
  
</OpenDRIVE>

2) link example

Prohibited, allowed and recommended road connection scenarios are shown. It is important that the lanes and reference lines of the road to be connected have a direct link to its predecessor or successor road. Overlaps or jumps should be avoided but are not prohibited if the reference lines are connected correctly.
Insert image description here

3) link successively

The elements predecessor and successor of link represent the relative closure between roads. For example, there is no road before road1, so there is no predecessor; there is road2 after road1, which means that road1 has a successor road2;

Insert image description here

4) Road link rules

The following linking methods are also allowed:
Insert image description here

Insert image description here

3. Road-type introduction

1) Type topology

Insert image description here

<OpenDRIVE>
  <!-- 头部信息 -->
  
  <road name="Road 1" id="1" length="100.0">
    <planView>
      <!-- 道路几何形状信息 -->
    </planView>
    
    <lanes>
      <!-- 道路车道信息 -->
    </lanes>
    
    <objects>
      <!-- 道路对象信息 -->
    </objects>
    
    <roadType s="0.0">
      <type type="urban">
        <name>Urban Road</name>
        <priority>2</priority>
        <speed max="50.0" unit="km/h"/>
        <country>China</country>
      </type>
    </roadType>
    
    <!-- 其他道路元素 -->
    
  </road>
  
  <!-- 其他道路信息 -->
  
</OpenDRIVE>

4. Introduction to road-elevation

1) elevation type

A. Road Elevation (elevation) refers to the altitude along the road reference line, that is, the altitude in the s direction;
B. Su[er Elevation (superelevation) refers to The road lateral profile is perpendicular to the road reference line and has an angle with the ground (similar to the roll angle of the vehicle), that is, the altitude in the t direction.
C. Road Shape (Shape) Some lateral road shapes are too complex to be described by superelevation alone. Shape describes in more detail the elevation of a road cross-section at a given point on a reference line. This means that at an s coordinate there may be multiple shape definitions with different t values, describing the curved shape of the road.
Insert image description here

2) Elevation topology diagram

Insert image description here

XML fragment

<road name="Road 1" id="1" length="100.0">
  <road-elevationprofile>
    <elevation s="0.0" a="0.0" b="0.0" c="0.0" d="0.0"/>
    <elevation s="50.0" a="0.0" b="0.0" c="0.0" d="0.0"/>
  </road-elevationprofile>
  
  <road-lateralprofile>
    <superelevation s="0.0" a="0.0" b="0.0" c="0.0" d="0.0"/>
    <crossfall s="0.0" a="0.0" b="0.0" c="0.0" d="0.0"/>
  </road-lateralprofile>
  
  <road-shape>
    <shape s="0.0" x="0.0" y="0.0"/>
    <shape s="50.0" x="10.0" y="5.0"/>
  </road-shape>
</road>

3) Elevation/superelevation calculation

Road elevation and superelevation are calculated using the following third-order polynomial function:elev(ds) = a + b*ds + c*ds² + d*ds³

parameter name describe
student Elevation/superelevation at specified location
a, b, c, d polynomial coefficients
ds is the distance along the reference line between the starting point of the new elevation/superelevation element and the given location

Absolute position calculation of road elevation/superelevation:s = sstart + ds

parameter name describe
s is the absolute position in the reference line coordinate system
sstart is the starting position of the element in the reference line coordinate system

4) Transverse profile calculation

The image below shows how the height information between two transverse profiles is calculated. The side profile of sR1 is defined by 5 polynomials, while the side profile of sR2 is defined by 3 polynomials. To calculate the point between two side profiles, the formula shown in the image below performs linear interpolation between the two profiles.
Insert image description here
The shape of the transverse profile is calculated using the following polynomial function: hShape (ds)= a + b*dt + c*dt² + d*dt³

parameter name describe
hShape is the height above the reference plane at a given location
a, b, c, d is the coefficient
dt is the distance perpendicular to the reference line between the start point of the shape element and the given position

The absolute position of the shape value is calculated as follows:t = tstart + dt

parameter name describe
t is the absolute position in the reference line coordinate system
a, b, c, d is the starting position of the element in the reference line coordinate system
tstart is the starting position of the element in the reference line coordinate system

5. Introduction to road-surface

1) Surface topology

Insert image description here
XML fragment

<road name="Road 1" id="1" length="100.0">
  <road-surface>
    <friction s="0.0" coefficient="0.8"/>
    <color s="0.0" r="255" g="255" b="255"/>
  </road-surface>
</road>

Because suface involves CRG-related content, I will open another branch to explain it clearly later.

6. Road-lane introduction

1) Lane topology

Insert image description here
XML fragment

<road name="Road 1" id="1" length="100.0">
  <road-lane>
    <laneSection s="0.0">
      <lane id="1" type="driving">
        <width sOffset="0.0" a="3.5"/>
        <road-mark sOffset="0.0" type="solid" color="standard"/>
        <speed sOffset="0.0" max="60.0" unit="km/h"/>
        <access restriction="no"/>
        <height sOffset="0.0" inner="3.8" outer="4.0"/>
        <rule priority="1" yield="true"/>
        <material surface="asphalt" friction="0.8"/>
        <visibility sOffset="0.0" forward="100.0" back="50.0"/>
        <border left="true" right="true"/>
        <predecessor id="2" contactPoint="end"/>
        <successor id="4" contactPoint="start"/>
        <link elementId="laneLink1"/>
        <userData>
          <property name="laneType" value="driving"/>
        </userData>
      </lane>
      <lane id="2" type="driving">
        <!-- 其他元素和属性 -->
      </lane>
    </laneSection>
  </road-lane>
</road>

2) Lane grouping

A. The lanes within the lane section are divided into left, middle and right lanes. The left lane ID is a positive number, the right lane ID is a negative number, and the middle lane line (road reference line) is 0.
Insert image description here

3) Lane part

A. Lanes can be divided into multiple lane sections. Each lane segment contains a fixed number of lanes. Whenever the number of lanes changes, a new lane segment is required, and the lane segments are arranged in ascending order along the lane reference line, that is (s direction in st coordinates)
Insert image description here

B. In order to simplify the use of the lane section of complex roads, you can only use Lane section The >@singleSide attribute defines the lane portion for one side of the road.

Insert image description here

C. Lane section attribute, singleSide field indicates whether the lane exists only on one side of the road. It is a Boolean value that indicates whether the lane exists on only one side of the road. If singleSide is true, it means that the lane exists only on one side of the road, usually used to describe a one-way street or the lane layout in specific traffic situations. If singleSide is false, it means that lanes exist on both sides of the road, usually used to describe the lane layout of a two-lane or multi-lane road.

parameter name describe
s S coordinate of starting position
singleSide The lane section element is only valid for one side (left, center or right), depending on the child element.

Insert image description here

4) Lane deviation

A. Lane offset can be used to move the center lane away from the road reference line. This makes it easier to model localized lateral movements of lanes on the road, such as left-turn lanes. The combination of road offset and road shape may cause inconsistencies depending on the interpolation used for lane offset. Since linear interpolation is used for the shape of the road along the reference line, linear interpolation is also applied to the offset definition; the image below depicts the offset of the center lane away from the road reference line.

Insert image description here

Insert image description here

B. The offset of a given point is calculated using the following third-order polynomial function:offset (ds) = a + b*ds + c*ds² + d*ds³

parameter name describe
offset is the lateral offset of a given position
a, b, c, d polynomial coefficients
ds is the distance along the road reference line between the starting point of the new lane offset element and the given location

Absolute position of offset value:s = sstart + ds

parameter name describe
s is the absolute position in the reference line coordinate system
sstart is the starting position of the element in the reference line coordinate system

C. Every time the polynomial function changes, a new channel offset element is required. The following is an XML example.

<lanes>
     <laneOffset s="25.0" a="0.0" b="0.0" c="3.9e-03" d="-5.2e-05"/>
     <laneOffset s="75.0" a="3.25" b="0.0" c="0.0" d="0.0"/>
</lanes>

Insert image description here

5) Lane link

A. Lane links have two elements, predecessor and successor. Lanes can be connected to lanes on the same or another road;

Insert image description here

Insert image description here

The following link relationship between them is shown in the figure below:

Insert image description here
Insert image description here

6) Lane attributes

A. Lane attributes-topology

Lane properties describe the purpose and shape of the lane. Lane properties are defined per lane segment, but may change within that segment. If attributes are not specifically defined for the lane portion, the application can apply default attributes; the lane attribute topology is shown in the figure below.
Insert image description here

B. Lane attributes-lane width

a. The width of a given point is calculated using the following third-order polynomial function:Width (ds) = a + b*ds + c*ds² + d*ds³

parameter name describe
width is the width of a given position
a, b, c, d polynomial coefficients
ds is the distance along the road reference line between the starting point of the new lane width element and the given location

Each element of ds starts from zero. The absolute position of the width value is calculated as follows::s = ssection + offsetstart + ds

parameter name describe
s is the absolute position in the reference line coordinate system
sSection is the starting position of the previous lane segment element in the track coordinate system
offsetStart is the offset of the element relative to the previous lane segment

b. Changes in lane width in the positive s direction starting from different offset positions
Insert image description here
Insert image description here

C. Lane attributes-lane height

a. Lane height should be defined along the h coordinate. Lane height can be used to raise lanes independent of road elevation. Lane heights are used to achieve small-scale elevations, such as raising sidewalks, as shown in the image below. Lane height is specified as an offset from the road in the z direction (includes elevation, superelevation, shape).
Insert image description here
b, XML fragment

<lane id="-2" type="sidewalk" level="false">
    <link>
        <successor id="-3"/>
    </link>
    <width sOffset="0.0" a="2.0" b="0.0" c="0.0" d="0.0"/>
    <height sOffset="0.0" inner="0.12" outer="0.12"/>
</lane>

Insert image description here

7) Lane type

A. Lane type classification

type describe
shoulder A soft border describing the edge of the road.
border A hard border describing the edge of the road. Have the same height as the drivable lane.
driving Describes a "normal" drivable road that does not fall into one of the other categories.
stop Highway hard shoulder used for emergency stops.
none Describes the space on the outermost side of the road, with no actual content, whose sole purpose is to register the presence of ASAM OpenDRIVE when the driver leaves the road.
restricted Describe lanes where vehicles should not travel. This lane has the same height as the drivable lane. Lanes are usually separated by lines, often including dashed lines.
parking Describe a driveway with parking spaces.
median Describes a lane between lanes of travel in opposite directions of travel. Often used to separate traffic on large roads.
biking Describes lanes reserved for bicycles.
sidewalk Describe lanes for pedestrians.
curb Describe the curb. Curbs are of a different height than adjacent drivable lanes.
exit Describes the carriageway used for the portion parallel to the main road. Mainly used for deceleration lanes.
entry Describes the carriageway used for the portion parallel to the main road. Mainly used for acceleration lanes.
onramp A ramp leading from a rural or urban road to a highway.
offRamp A ramp leading from a highway to a rural or urban road.
connectingRamp A ramp connecting two highways, such as a highway interchange.

—Highway lane types
Insert image description here

— Lane types for country roads
Insert image description here

—Lane types of urban roadsInsert image description here

— Lane types for highway exits and entrances
Insert image description here

8) Lane speed limit

The maximum speed allowed on the lane can be defined. Lane speed limits take precedence over road speed limits.
Insert image description here
Insert image description here

8) Lane markings

A、Development structure
Insert image description here
XML single column

<road>
  <!-- 路段信息 -->
  
  <lanes>
    <!-- 车道信息 -->
    
    <laneSection>
      <!-- 车道段信息 -->
      
      <left>
        <!-- 左侧车道信息 -->
        
        <lane>
          <!-- 车道信息 -->
          
          <roadMark>
            <!-- 车道标线 -->
            <sOffset>0.0</sOffset>
            <width>0.1</width>
            <type>solid</type>
            <color>white</color>
            <!-- 其他属性 -->
          </roadMark>
        </lane>
        
        <!-- 其他左侧车道 -->
      </left>
      
      <center>
        <!-- 中心车道信息 -->
        
        <!-- 中心车道的车道标线 -->
        
      </center>
      
      <right>
        <!-- 右侧车道信息 -->
        
        <!-- 右侧车道的车道标线 -->
        
      </right>
    </laneSection>
    
    <!-- 其他车道段 -->
    
  </lanes>
  
  <!-- 其他道路元素 -->
  
</road>

The above is some content about openDrive compiled from ASAM, because there is a lot of content. It may be written in several articles, and some contents are not described in detail. Please forgive me and I will add more when I have time.

Guess you like

Origin blog.csdn.net/zataji/article/details/134093946