Baidu Apollo Installation and Offline Demo Launching

韦俊英
2023-12-01

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)

  1. Follow this link to insatll docker on the local machine
  2. Start docker: bash docker/scripts/dev_start.sh
  3. Enter docker environment: bash docker/scripts/dev_into.sh
  4. 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
  5. Start ros call and Monitor module and Dreamview: bash scripts/bootstrap.sh

Run offline Demo

  1. Download Demo record (use python3 here):
    cd docs/demo_guide/
    python3 rosbag_helper.py demo_3.5.record
    
  2. Source the environment: source cyber/setup.bash
  3. If I directly ran the demo, I got the error:
    mainboard: error while loading shared libraries: libboost_system.so.1.54.0: cannot open shared object file: No such file or directory
    
    Add the path of boost library into dynamic library path LD_LIBRARY_PATH in cyber/setup.bash. Now the LD_LIBRARY_PATH should look like:
    root@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/
    
    Don’t forget to source cyber/setup.bash.
  4. 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

  1. Follow the link here.
  2. Solve the issue “nvidia-docker: command not found” by sudo apt install nvidia-docker2
  3. Reload daemon and restart docker:
    sudo systemctl daemon-reload
    sudo systemctl restart docker
    
  4. Enter the container again, now you can run caffe under GPU mode.
 类似资料:

相关阅读

相关文章

相关问答