无人驾驶笔记系列(二):apollo 地图可视化工具MapShow的使用
什么是mapshow
简单来说,就是一个apollo框架中,用python脚本写一个可视化高精地图的工具。
启动
该工具默认在 “/apollo/modules/tools/mapshow” 目录下。所有可以运行一下命令将库添加到python运行库中。当然你也可以直接在此目录下运行,就不用添加运行环境了。
# In apollo root dir:
source scripts/apollo_base.sh
使用
usage: python mapshow.py [-h] -m MAP [-sl] [-l LANEID [LANEID …]]
optional arguments:
-h, --help show this help message and exit
-m MAP, --map MAP Specify the map file in txt or binary format
-sl, --showlaneids Show all lane ids in map
-l LANEID [LANEID …], --laneid LANEID [LANEID …] Show specific lane id(s) in map
使用
显示基本的道路图
python mapshow.py -m /path/to/map/file
显示lane 的id
python mapshow.py -m /path/to/map/file -sl
显示某一段lane 通过id
python mapshow.py -m /path/to/map/file -l 1474023788152_1_-1
二次开发
当然这此时重点,我们在分析你的定位信息是否准确,或者将各种参数可视化等。需要充分利用该工具。
未完待续