1、代码克隆
git clone https://github.com/ApolloAuto/apollo.git
下面是 Apollo 演示的设置步骤:
启动并进入 Apollo Docker 环境
bash docker/scripts/dev_start.sh
bash docker/scripts/dev_into.sh
在 Docker 中编译 Apollo:
bash apollo.sh build
备注:
上述命令会通过检测 GPU 环境是否就绪来自动判断是执行 CPU 构建还是 GPU 构建。
启动 Dreamview
bash scripts/bootstrap.sh
成功会显示:
root@in-dev-docker:/apollo# bash scripts/bootstrap.sh
[INFO] Module monitor is already running - skipping.
[INFO] Module dreamview is already running - skipping.
还有一种可能:显示如下:
root@in-dev-docker:/apollo# bash scripts/bootstrap.sh
[WARNING] nvidia-smi not found. CPU will be used.
[WARNING] nvidia-smi not found. CPU will be used.
[WARNING] nvidia-smi not found. CPU will be used.
[WARNING] nvidia-smi not found. CPU will be used.
nohup: appending output to 'nohup.out'
[ OK ] Launched module monitor.
[WARNING] nvidia-smi not found. CPU will be used.
[WARNING] nvidia-smi not found. CPU will be used.
nohup: appending output to 'nohup.out'
[ OK ] Launched module dreamview.
Dreamview is running at http://localhost:8888
这里就需要将物理机的gpu映射到容器里面。
否则localhost:8888界面将会无显示
下载并播放 Apollo 的演示包
python docs/demo_guide/record_helper.py demo_3.5.record
cyber_recorder play -f docs/demo_guide/demo_3.5.record --loop
选项 --loop
用于设置循环回放模式.
在浏览器中输入 http://localhost:8888 访问 Apollo Dreamview
还可以通过本地的谷歌浏览器去访问,这样会比访问服务器的浏览器要快一点。
方法:
如果我的物理机地址为192.168.a.b
那么在本地的浏览器直接 访问192.168.a.b:8888
这个时候就可看到Dreamview仿真环境的初始界面。
apollo的dreamview界面每个元件都是代码什么意思:可以参考下面介绍:
http://www.fzb.me/apollo/specs/dreamview_usage_table_cn.html
参考:
https://huhuhang.com/post/machine-learning/baidu-apollo-install
https://blog.shipengx.com/archives/e4b9c8ad.html#valine-comments/apollo/docs/demo_guide/README_cn.md