Created by [ Rowan Dempster], last modified by [ Henry Wang] on Jan 22, 2020
This section provides a summary of content from the HDLM Protobuf Data Spec.
HERE uses a custom tile identifier encoding scheme. It's interesting to see how the tile IDs are derived, but this content is not relevant.
[Coordinate values for HERE HD Live Map are relative to the WGS84 GCS, and expressed as decimal degrees with 7 digits of precision after the decimal point. ][To minimize storage requirements in its Protobuf representation, the coordinate values are encoded. ][Rather than using floating point values, latitude and longitudes are represented as 31 and 32-bit signed integers, respectively. We apportion the -180 to 180 degree longitude span over the available 2\^][32 ][range of discrete values. For latitudes in the -90 to 90 degree range, the range is 2\^][31 ][integer values. ]
[This results in a resolution of 360° / 2\^][32 ][= 180° / 2\^][31 ][= 0.00000008381903171539306640625 degrees.]
[The resulting lat/lon integer values ][are then encoded as Morton Codes, interleaving their bits into a single 64-bit signed integer:]
[To optimize for Protobuf space, sequences of coordinates (e.g. polylines representing lane and road geometry) are also encoded. ][The incremental offsets of these sequences of values are stored and calculated with a bitwise XOR against a reference value.]
[For sequences of 2D coordinates, the first lat/long value in the sequence is offset-encoded against the parent tile's center point, which is included in the top-level message for the tile. Subsequent values are offset-encoded from the previous value in the sequence. ]
The following sections specify the message composition of specific layers, and message definitions.
[The lane-topology layer contains the lane group, lane group connector, lane and lane connector topology of the lane model. Sadly this layer is not provided for the competition, but it's possible to work around this shortage as lane connection info can be inferred from other layers' data.]
HERE maps are stored in the Protobuf format that can be decoded using protoc. The MCity HERE HD Map is available here on the Shared Drive. The Protobuf files can be decoded using protoc.
protoc -I./ --decode=com.here.pb.hdmap.external.v1.[directory_name].[tile_message_type] com/here/pb/hdmap/external/v1/[directory_name]/[filename.proto] < [input-filename] > [output-filename].txt
For example, to decode Lane Model: Lane Topology Layer:
cd hdlm-dump/topology-geometry
protoc -I./ --decode=com.here.pb.hdmap.external.v1.topology.TopologyLayerTile com/here/pb/hdmap/external/v1/topology/layer-topology-geometry.proto < 321618295 > topology-geometry-321618295.txt
To decode the Lane Model: Lane Polyline Geometry Layer:
cd hdlm-dump/lane-geometry-polyline
protoc -I./ --decode=com.here.pb.hdmap.external.v1.lanes.LaneGeometryPolylineLayerTile com/here/pb/hdmap/external/v1/lanes/layer-lane-geometry-polyline.proto < 321618295 > lane-geometry-polyline-321618295.txt
The decoded data has been uploaded to localization repo. See https://git.uwaterloo.ca/WATonomous/localization/tree/develop/hdmap_processing/data/hdlm-dump-mcity
Below is a summary of some notes from the HERE HD Map presentation linked above. I would still recommend watching it as it is quite informative
lane lines at intersections are "lane boundaries without lane markings" (inferred lane lines) are in the HERE map of MCity
When reading this section, also refer to the parsing the HERE HDLM document and notes from Guy Stoppi and Shigeki on what the files do
We use the lane model. Refer to "lane parse.py" in the "hdmap processing/scripts" folder of the localization repository. The lane file consists of a series of lane geometries, all defined by HERE's method of storing a polyline (i.e. a line defined by an array of points). Each of these lane lines makes up either an actual lane line on the road or an artificial lane line in an intersection that describes the ideal trajectory of the car when "using" that lane.
Essentially, each lat-long coordinate is stored in a single number. To convert from that number X you do the following:
B = to_binary(X)
# every other bit starting with the second bit
lon = to_decimal(B[1::2]) * (360.0 / 2^32)
# every other bit starting with the third bit
lat = to_decimal(B[2::2]) * (180.0 / 2^31)
Now, when storing polylines, HERE map stores every point as an offset from the previous point using the XOR operation. So to decode:
prevB = ... # binary value of previous coordinate
B = XOR(prevB, to_binary(X))
lon = to_decimal(B[1::2]) * (360.0 / 2^32)
lat = to_decimal(B[2::2]) * (180.0 / 2^31)
Using these decode methods, we can generate a series of lane lines which
can be used by our nodes running
on the car. Note that these lane lines must be separated into
"intersection lines" (artificial lane lines in an
intersection) and "road lines" (actual lane lines) because of lane
publisher.
*We can use only data on AutoDrive portal. We don't have login pass for official HERE site, like below image*
We will need autonomous driving navigation system for 3rd year competition. That's system shows HDmap on screen in Bolty, and if we specify goal point on HDmap, Bolty go to that goal point autonomously. That's system need visualizer for HDmap, also developing visualizer is good for understanding of HDmap.
Road model have nodes and links(refer to document p.17 to p.44). All links have information about start node and end node. In road model visualizer, I firstly installed all of nodes on Turtle's screen, next I connected these nodes referring to start node and end node information on link field. road model visualizer is included in test_all.py
Lane model have information about lane boundary, that is consists of point cloud. please refer to document p.44 - p.60. We need lane boundary information because we need width of road(it means distance between left lane and right lane). I visualize these lane boundary point as green in test_all.py.
You should pull test_all.py and utils.py from localization repo, s19 branch. You must put these codes on same directory. Next, type below command
python test_all.py
Output of test_all.py:. We can see MCity in the bottom right corner.
[{.confluence-embedded-image
.confluence-external-resource}]
\
Output of draw_road.py:
[{.confluence-embedded-image
.confluence-external-resource}]
Refer to below images
[{.confluence-embedded-image
.confluence-external-resource}]
[{.confluence-embedded-image
.confluence-external-resource}]
\
The relevant pages in the HERE HD Live Map (HDLM) Data Specification:
[Some links to relevant files in the shared drive:]
Some links to non-useful unorganized random notes from our predecessors in the shared drive:
Other resources:
\
\
Document generated by Confluence on Dec 10, 2021 04:02