Run apollo 6.0 on vmware (no GPU)

Run apollo 6.0 on vmware

If the computer does not have a GPU, the visual aspect cannot be obtained (lane line recognition, traffic light recognition)

Insert picture description here
Mainly refer to the tutorial on the official website , but I am currently running on vmware and the GPU cannot be directly connected, so the GPU part in the installation tutorial is skipped.

1. Install Ubuntu 18.04 and Docker first

If the virtual machine doesn’t support GPU, don’t install nvidia related first (otherwise, you need to uninstall nvdia related)

Ubuntu download link

sudo apt-get update
sudo apt-get upgrade

Use bash to install docker (install_docker.sh script is in the setup_host folder)

There is also a dedicated bash script Apollo provides to ease Docker installation, which works both for X86_64 and AArch64 platforms.
Insert picture description here

https://github.com/ApolloAuto/apollo/blob/master/docker/setup_host/install_docker.sh

Run the saved sh file

chmod a+x install_docker.sh    #给install_docker.sh可执行权限
./install_docker.sh
sudo systemctl restart docker

Add your username to docker, so you don’t need to enter sudo when using docker.
https://docs.docker.com/engine/install/linux-postinstall/

sudo groupadd docker
sudo usermod -aG docker *** (你的用户名)
Log out

2. Download the Apollo source

git clone https://github.com/ApolloAuto/apollo.git
cd apollo
git checkout master

git clone --branch v2.5.0 github.com/ApolloAuto/apollo.git #下载指定版本

3. Start the Apollo development Docker container
under the Apollo path (the command window will display the prefix ***@ your computer name: ~/apollo$)

bash docker/scripts/dev_start.sh  #下载Apollo依赖环境的image文件

If you download the image from China, use

bash docker/scripts/dev_start.sh-C

(Some people may inadvertently install NVIDIA related error: [ERROR] Failed to start docker container “apollo_dev” based on image: apolloauto/apollo:dev-x86_64-20180906_2002. Error: Could not load UVM kernel module. Is nvidia -modprobe installed?, you can use sudo apt purge nvidia* to uninstall all NVIDIA. Then restart bash docker/scripts/dev_start.sh)

bash docker/scripts/dev_into.sh  #进入Docker环境,这时命令窗口显示前缀的方式会发生改变: ***@in_dev_docker:/apollo$
bash apollo.sh clean #需重新编译时,才会用到该命令
./apollo.sh build #编译apollo 

4. Build Apollo

./apollo.sh clean
./apollo.sh build_opt

Not Nvidia GPU is also possible. It is not recommended to use bash apollo.sh build_cpu to compile.

Note: Please run ./apollo.sh build_fe before ./apollo.sh build_opt if you made any modifications to the Dreamview frontend.

5. Start the simulation environment Dreamview

bash ./scripts/bootstrap.sh

Open the browser and enter http://localhost:8888

选择驾驶模式和地图:From the dropdown box of Mode Setup, select “Mkz Standard Debug” mode. From the dropdown box of Map, select “Sunnyvale with Two Offices”.

  • Module Controller—>Open Planning and Routing;
  • Tasks—>Open SimControl
  • Select the "Sunnyvale Big Loop" map on the upper right

Replay the demo record:
Insert picture description here

cd docs/demo_guide/
python3 record_helper.py demo_3.5.record
cyber_recorder play -f demo_3.5.record -l

(This may encounter the cyber_record command cannot be found, you need to go to the apollo/cyber directory to run. setup.bash, then >>echo $PATH path should contain / apollo / bazel-bin / cyber / tools / cyber_recorder / and go back to docs/ demo_guide/go down) You can see it running:

6. End deamview

cd ../..
root@in-dev-docker:/apollo# ./scripts/bootstrap.sh stop

Exit docker Ctrl-D

Re-enter next time:

cd apollo
bash docker/scripts/dev_start.sh
bash docker/scripts/dev_into.sh
./scripts/bootstrap.sh

appendix:

Docker相关的命令:
$ docker container ls --all (列出所有container, 即使当前不在运行的)
$ docker ps (查看正在运行的容器)
$ exit (退出当前的docker环境)
$ docker rmi <image id> (删除某个image, 比如 docker rmi 4ab4c602aa5e)

导出镜像到本地文件 (这样你可以把下载到的image备份,而不必重新安装时,每次都要下载。)
$ docker save apolloauto/apollo > apollo.tar 

从本地文件导入文件到镜像库
$ sudo docker load --input apollo.tar 


Git相关指令:
$ git pull (更新软件)
$ git checkout (可指定版本)
$ git branch -a 查看所有的分支
$ git checkout -b *** 建立一个新的本地分支*** (比如v2.5.0)
$ git status 查看当前状态


Ubuntu 18.04 相关:
$ sudo dpkg-reconfigure tzdata (​时间同步)

Guess you like

Origin blog.csdn.net/qq1291917670/article/details/115013849