Baidu Apollo
Baidu Apollo Installation and Offline Demo Launching
The documentation about Apollo project from github is vague and misleading. It wastes a lot of time to find where to run the command and how to solve the problems for me.
The source of the project is here.
Installation
(This is mainly based on this doc on github)
- Follow this link to insatll docker on the local machine
- Start docker:
bash docker/scripts/dev_start.sh
- Enter docker environment:
bash docker/scripts/dev_into.sh
- Build Apollo in the container using optimized binary with Caffe GPU mode support (DON’T USE
sudo
in this container):bash apollo build_opt_gpu
- Start ros call and Monitor module and Dreamview:
bash scripts/bootstrap.sh
Run offline Demo
- Download Demo record (use python3 here):
cd docs/demo_guide/ python3 rosbag_helper.py demo_3.5.record
- Source the environment:
source cyber/setup.bash
- If I directly ran the demo, I got the error:
Add the path ofmainboard: error while loading shared libraries: libboost_system.so.1.54.0: cannot open shared object file: No such file or directory
boost
library into dynamic library pathLD_LIBRARY_PATH
incyber/setup.bash
. Now theLD_LIBRARY_PATH
should look like:
Don’t forget toroot@in_dev_docker:/apollo# echo $LD_LIBRARY_PATH /usr/local/Qt5.5.1/5.5/gcc_64/lib:/usr/local/Qt5.5.1/5.5/gcc_64/lib:/usr/local/Qt5.5.1/5.5/gcc_64/lib:/usr/local/Qt5.5.1/5.5/gcc_64/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64:./usr/local/apollo/boost/lib/:/usr/local/apollo/boost/lib/:/usr/local/apollo/boost/lib/
source cyber/setup.bash
. - Play the record and now you are able to see the demo running on http://localhost:8888/
cyber_recorder play -f docs/demo_guide/demo_3.5.record --loop
Install NVIDIA driver in the container
- Follow the link here.
- Solve the issue “nvidia-docker: command not found” by
sudo apt install nvidia-docker2
- Reload daemon and restart docker:
sudo systemctl daemon-reload sudo systemctl restart docker
- Enter the container again, now you can run caffe under GPU mode.