Baidu Apollo Installation and Offline Demo Launching

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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值