欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

在Ubuntu18.04下安装Apollo6.0

程序员文章站 2022-03-05 18:22:19
...

在Ubuntu18.04下安装Apollo6.0

参考文章
在Ubuntu16.04下安装Apollo5.0

1 docker install

安装docker

sudo apt-get update

sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

sudo apt-key fingerprint 0EBFCD88
验证输出(9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88)

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

sudo apt-get install docker-ce docker-ce-cli containerd.io

sudo docker run hello-world

2 Apollo Software Installation Guide

官方文档Apollo Software Installation Guide

github终端clone不下来,修改hosts之后也很慢,直接用国内gitee下载了,速度很快。

问题1

(base) [email protected]:~/Desktop/apollo$ bash docker/scripts/dev_start.sh
[INFO] Use default GeoLocation settings
[INFO] Start pulling docker image apolloauto/apollo:dev-x86_64-18.04-20210204_2153 ...
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/create?fromImage=apolloauto%2Fapollo&tag=dev-x86_64-18.04-20210204_2153: dial unix /var/run/docker.sock: connect: permission denied
[ERROR] Failed to pull docker image : apolloauto/apollo:dev-x86_64-18.04-20210204_2153

加上sudo即可;或者更改docker权限,可以去掉每次要输入sudo

sudo bash docker/scripts/dev_start.sh

问题2

遇到traffic_light模块编译失败,用的./apollo.sh build_opt
使用./apollo.sh build编译就没问题了

问题3

sudo bash docker/scripts/dev_start.sh时遇到读取不了nvidia-smi,显卡驱动等
安装nvidia-docker
Setting up NVIDIA Container Toolkit

distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
   && curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - \
   && curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list

sudo apt-get update
sudo apt-get install -y nvidia-docker2
sudo systemctl restart docker

3 How to Launch and Run Apollo

官方文档How to Launch and Run Apollo

编译完之后可以正常运行,打开网页端口显示Dreamview界面

问题1

github下载demo_3.5.record很慢,因为我chrome带了插件,直接网页下下来了。或者gitee。或者修改hosts。或者终端翻q

问题2

bash: cyber_recorder: command not found

运行

source cyber/setup.bash

cyber_recorder: command not found