HdmapEngine
HdmapEngine copied to clipboard
apollo Opendrive 高精地图解析引擎
HdmapEngine
apollo opendrive xml格式高精地图解析引擎
作者:chenyongzhe
联系邮箱:[email protected]
依赖环境
项目使用C++开发,目前支持 linux 下ubuntu 16.04、18.04
cmake 版本高于2.8
使用xml解析库为tinyxml2
依赖eigen 库做矩阵运算
引擎功能
- 解析 apollo opendrive xml 格式高精地图文件。(接口在HdMapEngine.h 头文件中)
- 通过给定坐标搜索得到车道。(HdMapEngine.h 中 searchLaneByxy函数返回车道指针)
- 显示高精路网地图
- 搜索指定范围内车道中心点
- 支持wgs84 经纬度坐标系到东北天(x,y,z)坐标系转换
地图元素
地图元素 包括:
- Road 道路 --->对应 xml 里的road 标签
- LaneSection --->对应 xml 里的 LaneSection标签
- Lane 车道 --->对应 xml 里的 Lane标签
- Junction 路口 --->对应 xml 里的 junction标签
- connection 路口内车道连接关系 --> 对应 xml 里的 connection标签
- StopLine 停车线
- TrfficLight 信号灯
- Crosswalk 人行横道
每个元素具体属性参考 include/element/ 下的头文件内的注释
编译运行
cd build
rm -rf ./*
cmake ..
make
./HdmapEngine
高精地图显示
需要 matplotlib 库
安装matplotlib库
pip install matplotlib
-
生成车道点:
./OutputPoint > LanePoints.txt
cp LanePoints.txt ../showMap/ -
使用python 显示车道点
cd showMap
python show.py
效果: