Some Little Thing About HD-Map

HD Map

Introduction

In the current field of autonomous driving, in terms of dependence on maps, there are roughly two schools of thought. One relies heavily on HD maps, represented by companies such as Waymo, Mobileye, Baidu, Pony.ai, and Momenta; the other tends not to rely on maps, such as Tesla. In my view, the functionality Tesla currently provides is more like an advanced driver-assistance system than a truly driverless system. In map-dependent autonomous-driving technology, the map plays a central role, contributing significantly to modules such as localization, path planning, and perception. This blog gives a brief introduction to two HD map formats, the OpenDRIVE format and the Apollo HD map format. It also introduces some tools that are useful in map processing. I hope this blog will be helpful to your work and research.

OPENDRIVE

Definition:
OpenDRIVE is an open format specification to describe a road network‘s logic. Its objective is to standardize the logical road description to facilitate the data exchange between different driving simulators (WIKIPEDIA)

Features: \

  • XML format , hierarchical structure , analytical definition of road geometry
  • plane elements, elevation, crossfall , lane width etc.
  • various types of lanes , junctions incl. priorities , logical inter-connection of lanes
  • signs and signals incl. dependencies
  • signal controllers (e.g. for junctions)
  • road surface properties
  • road and road-side objects

Structural description: \

Its first part, the header, is structured as shown in the figure below:

Its second part, the basic composition of a road, is as follows:

The reference line is a sequence of different geometry types, including straight lines, spirals, arcs, and cubic polynomials, as shown in the figure:

XML description:

about lane and lane-section

The overall XML description of a road:

Its third part, the basic composition of a junction, is as follows:

There are two types of road topology connections: one is the predecessor-successor connection between roads, and the other is the connection at a junction. If a lane of an incoming road can be connected to a lane of a connecting road, a connection relationship is established, as shown in the figure:

APOLLO HDMAP

Baidu’s HD map data format organizes its data using an (XML) file format. It is based on the internationally common OpenDRIVE specification, extended and modified according to the needs of Baidu’s autonomous-driving business. (reference from: baidu apollo hdmap open source material) Its overall structure is shown in the figure:

There are three types of maps overall: base map, routing map, and sim map. The routing map and sim map are used for path planning and simulation respectively, and are generated from the base map.

Since the Apollo map and the OpenDRIVE map are overall quite similar, only their differences are described here. The biggest difference is that OpenDRIVE uses polynomials to describe geometry, whereas the Apollo map uses sequences of points; it adds descriptions for more object categories, such as no-parking zones, speed bumps, crossbars, and electronic screens, mainly described by the 3D coordinates of their corresponding contours; and as for the junction description, in addition to describing the connection relationships, it also adds descriptions of the junction contour as well as the overlap between the junction and objects.

  • some detail about apollo map from code: The entire map is loaded when the system starts up. During loading, the corresponding kd-tree is also built so that map elements can be indexed efficiently during subsequent queries. Queries support range queries over all map elements, including lane lines, junctions, road object elements, and so on.

Useful Tools

  • proj.4 (c++, python) https:://github.com/OSGeo/PROJ
    proj is a very comprehensive geographic coordinate transformation library

  • gdal (c++, python) www.gdal.org
    The most comprehensive driver library for processing raster and vector files, including OGR (shapefile, gdb), cad, geojson, open street map…

  • arcgis/qgis www.qgis.org
    Geographic information processing software that provides rich editing features related to geographic location

  • nlohmann json(c++) JSON serialization and deserialization tool; msgpack conversion

  • xml2dict Can convert any Python dictionary structure into the corresponding XML elements

  • sqlite(database), protobuf, shp(point, polyline, polygon) storage structures for the map

  • more…


If you feel this blog has been helpful to you, consider sponsoring me so that I have more motivation to keep updating the blog

Comments