百度Apollo仿真仿真平台搭建-附1

百度Apollo仿真仿真平台搭建-附1

1 Apollo版本升级

      Apollo由版本V3.5升级到V6.0(Ubuntu18.04)。

  • 删除 home-‘username’-apollo文件夹
  • 按照"百度Apollo(V3.5.0)平台搭建"中步骤3.0,在终端运行以下内容
$  sudo passwd
$ su root
$ cd apollo
//clean the ./cache document
$ bash docker/scripts/dev_start.sh
$ bash docker/scripts/dev_into.sh
$ bash apollo.sh clean
$ sudo bash apollo.sh build_cpu
//waiting about 30mins for running of scripts 
$ bash scripts/bootstrap.sh
$ bash scripts/bootstrap.sh stop
$ bash scripts/bootstrap.sh
$ python docs/demo_guide/record_helper.py demo_3.5.record

bash: cyber_record: command not found
//$ source cyber/setup.bash

$ cyber_recorder play -f docs/demo_guide/demo_3.5.record -l

在这里插入图片描述

2 参考书籍

      Apollo 3.5版本安装参考百度Apollo&北航《自动驾驶-汽车平台技术基础》中的方法,同时附录该书封面。如不合适,请提醒删除。

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

3 运行Apollo仿真代码

      Apollo 3.5安装过程代码过程如下。

morven@morven-Laptop:~$ sudo passwd
[sudo] morven 的密码: 
输入新的 UNIX 密码: 
重新输入新的 UNIX 密码: 
passwd:已成功更新密码
morven@morven-Laptop:~$ su root
密码: 
root@morven-Laptop:/home/morven# cd apollo
root@morven-Laptop:/home/morven/apollo# bash docker/scripts/dev_start.sh
fetch: Fetching reference HEAD
[INFO] Start pulling docker image apolloauto/apollo:dev-x86_64-20181210_1500 ...
dev-x86_64-20181210_1500: Pulling from apolloauto/apollo
Digest: sha256:283773f0c1ee31e7615db642f0973a6d443453e335355ca0ac0030d56d2b69f4
Status: Image is up to date for apolloauto/apollo:dev-x86_64-20181210_1500
docker.io/apolloauto/apollo:dev-x86_64-20181210_1500
map_volume-sunnyvale_big_loop-latest: Pulling from apolloauto/apollo
Digest: sha256:0a27ea953198d397fd7bf3b0e670951f6a9d645d362a8bdc707589a26cde8861
Status: Image is up to date for apolloauto/apollo:map_volume-sunnyvale_big_loop-latest
docker.io/apolloauto/apollo:map_volume-sunnyvale_big_loop-latest
3a94940891dd3cf8dd3c94df7ab4da331f3937b663ddb1b64bc39cb3421956f3
map_volume-sunnyvale_loop-latest: Pulling from apolloauto/apollo
Digest: sha256:1337ca5d357f33318e38368b6218d343f6138c63a9bb491175ca7cdd39c1a789
Status: Image is up to date for apolloauto/apollo:map_volume-sunnyvale_loop-latest
docker.io/apolloauto/apollo:map_volume-sunnyvale_loop-latest
5bb0b00b6642fdfd38e27cd9878b464047ff2cef8250102f089b368c3522ef5b
map_volume-sunnyvale_with_two_offices-latest: Pulling from apolloauto/apollo
Digest: sha256:5893abb847f7cffb5dd310f9bac307d5c2537797c247eb1c609f36de1943bdf5
Status: Image is up to date for apolloauto/apollo:map_volume-sunnyvale_with_two_offices-latest
docker.io/apolloauto/apollo:map_volume-sunnyvale_with_two_offices-latest
4d35ed530417a98bf87c5c30da5d0dedcafc0002bb9c392de8011d921a683388
modprobe: FATAL: Module nvidia not found in directory /lib/modules/5.4.0-70-generic
modprobe: FATAL: Module nvidia-uvm not found in directory /lib/modules/5.4.0-70-generic
localization_volume-x86_64-latest: Pulling from apolloauto/apollo
Digest: sha256:d8be22d8221c784e8a29af14a23be7fc5f2164137ec24228701e6fdcb689b088
Status: Image is up to date for apolloauto/apollo:localization_volume-x86_64-latest
docker.io/apolloauto/apollo:localization_volume-x86_64-latest
fe2c78b041d0ebb88df4265dda5a67853c3d645fe137045a4251fa4908d46b23
yolo3d_volume-x86_64-latest: Pulling from apolloauto/apollo
Digest: sha256:33add717a675be26c86f817d2207c1ab1ec25694f0decb63e55f0fc3d14b1397
Status: Image is up to date for apolloauto/apollo:yolo3d_volume-x86_64-latest
docker.io/apolloauto/apollo:yolo3d_volume-x86_64-latest
4831fab653a7c5d2f48b96d3ea965205dcef81190a7589d343f15dc11aebf98c
[INFO] Starting docker container "apollo_dev_root" ...
e99fd7494a0b8db2d60e1706d789ebb449a723c076a4c4d7a957032d13021352
[ OK ] Finished setting up Apollo docker environment. Now you can enter with: 
bash docker/scripts/dev_into.sh
[ OK ] Enjoy!
root@morven-Laptop:/home/morven/apollo# bash docker/scripts/dev_into.sh
root@in_dev_docker:/apollo# bash apollo.sh clean
System check passed. Build continue ...
[WARNING] ESD CAN library supplied by ESD Electronics does not exist. If you need ESD CAN, please refer to third_party/can_card_library/esd_can/README.md.
INFO: Reading 'startup' options from /apollo/tools/bazel.rc: --batch_cpu_scheduling --host_jvm_args=-XX:-UseParallelGC
.
INFO: (04-07 11:59:12.815) Starting clean.
INFO: (04-07 11:59:12.841) Output tree moved to /root/.cache/bazel/_bazel_root/540135163923dd7d5820f3ee4b306b32/execroot_tmp_4833 for deletion
root@in_dev_docker:/apollo# sudo bash apollo.sh build_cpu
System check passed. Build continue ...
[WARNING] ESD CAN library supplied by ESD Electronics does not exist. If you need ESD CAN, please refer to third_party/can_card_library/esd_can/README.md.
Running build under CPU mode. No GPU is required to run the build.
[INFO] Start building, please wait ...
INFO: Reading 'startup' options from /apollo/tools/bazel.rc: --batch_cpu_scheduling --host_jvm_args=-XX:-UseParallelGC
____Loading package: modules/localization/common
____Loading package: modules/perception/lidar/lib/tracker/common
____Loading package: modules/perception/common/i_lib/da
____Loading package: modules/perception/common/i_lib/pc
____Loading package: modules/perception/common/i_lib/algorithm
____Loading package: modules/perception/lidar/lib/object_builder
____Loading package: modules/perception/onboard/inner_component_messages
____Loading package: modules/perception/radar/lib/tracker/matcher
____Loading package: modules/perception/lidar/lib/scene_manager/roi_service
____Loading package: modules/perception/fusion/lib/data_fusion/existance_fusion/dst_existance_fusion
____Loading package: modules/perception/camera/common
____Loading package: modules/drivers/canbus/can_client/esd
____Loading package: cyber/proto
____Loading package: cyber/timer
____Loading package: cyber/parameter
____Loading package: cyber/component
[INFO] Building on x86_64...
[INFO] Building with --jobs=8 --ram_utilization_factor 80 for x86_64
INFO: Reading 'startup' options from /apollo/tools/bazel.rc: --batch_cpu_scheduling --host_jvm_args=-XX:-UseParallelGC
INFO: (04-07 11:59:29.217) Found 3240 targets...
INFO: (04-07 12:05:54.245) From Compiling modules/perception/inference/caffe/caffe_net.cc:
In file included from ./modules/perception/base/syncedmem.h:66:0,
                 from ./modules/perception/base/blob.h:70,
                 from ./modules/perception/inference/inference.h:26,
                 from ./modules/perception/inference/caffe/caffe_net.h:27,
                 from modules/perception/inference/caffe/caffe_net.cc:17:
./modules/perception/base/common.h:30:0: warning: "NO_GPU" redefined [enabled by default]
 #define NO_GPU assert(false)
 ^
In file included from /usr/include/caffe/common.hpp:19:0,
                 from /usr/include/caffe/blob.hpp:8,
                 from /usr/include/caffe/caffe.hpp:7,
                 from ./modules/perception/inference/caffe/caffe_net.h:25,
                 from modules/perception/inference/caffe/caffe_net.cc:17:
/usr/include/caffe/util/device_alternate.hpp:10:0: note: this is the location of the previous definition
 #define NO_GPU LOG(FATAL) << "Cannot use GPU in CPU-only Caffe: check mode."
 ^
INFO: (04-07 12:05:54.340) From Compiling modules/perception/inference/caffe/caffe_net_test.cc:
In file included from ./modules/perception/base/syncedmem.h:66:0,
                 from ./modules/perception/base/blob.h:70,
                 from ./modules/perception/inference/inference.h:26,
                 from ./modules/perception/inference/caffe/caffe_net.h:27,
                 from modules/perception/inference/caffe/caffe_net_test.cc:17:
./modules/perception/base/common.h:30:0: warning: "NO_GPU" redefined [enabled by default]
 #define NO_GPU assert(false)
 ^
In file included from /usr/include/caffe/common.hpp:19:0,
                 from /usr/include/caffe/blob.hpp:8,
                 from /usr/include/caffe/caffe.hpp:7,
                 from ./modules/perception/inference/caffe/caffe_net.h:25,
                 from modules/perception/inference/caffe/caffe_net_test.cc:17:
/usr/include/caffe/util/device_alternate.hpp:10:0: note: this is the location of the previous definition
 #define NO_GPU LOG(FATAL) << "Cannot use GPU in CPU-only Caffe: check mode."
 ^
INFO: (04-07 12:28:11.389) From Linking modules/data/tools/rosbag_to_record/rosbag_to_record:
/usr/bin/ld: warning: libfastrtps.so, needed by bazel-out/local-dbg/bin/_solib_k8/_U@ros_S_S_Cros_Ucommon___Uexternal_Sros_Slib/libroscpp.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libfastcdr.so, needed by bazel-out/local-dbg/bin/_solib_k8/_U@ros_S_S_Cros_Ucommon___Uexternal_Sros_Slib/libroscpp.so, not found (try using -rpath or -rpath-link)
INFO: (04-07 12:29:41.725) Elapsed time: 1818.790s, Critical Path: 245.79s

================ Top noisy files during this compile ================
#1: ./modules/perception/base/common.h with 1 warnings
To expose warnings by file, please run:
./apollo.sh clean; ./apollo.sh build | grep ": warning: " | grep <file>
======================================================================
1============================
[ OK ] Build passed!
[INFO] Took 1831 seconds
============================
root@in_dev_docker:/apollo# bash scripts/bootstrap.sh
nohup: appending output to 'nohup.out'
Launched module monitor.
nohup: appending output to 'nohup.out'
Launched module dreamview.
Failed to start Dreamview. Please check /apollo/data/log or /apollo/data/core for more information
root@in_dev_docker:/apollo#  bash scripts/bootstrap.sh stop
[cyber_launch_29476] INFO Stop cyber launch finished.
[cyber_launch_29476] INFO cyber_launch exit.
Successfully stopped module dreamview.
[cyber_launch_29493] INFO Stop cyber launch finished.
[cyber_launch_29493] INFO cyber_launch exit.
Successfully stopped module monitor.
root@in_dev_docker:/apollo# bash scripts/bootstrap.sh
nohup: appending output to 'nohup.out'
Launched module monitor.
nohup: appending output to 'nohup.out'
Launched module dreamview.
Dreamview is running at http://localhost:8888
root@in_dev_docker:/apollo# sudo python docs/demo_guide/rosbag_helper.py demo_2.0.bag
Downloading from https://github.com/ApolloAuto/apollo/releases/download/v2.0.0/demo_2.0.bag
--2021-04-07 21:07:18--  https://github.com/ApolloAuto/apollo/releases/download/v2.0.0/demo_2.0.bag
Resolving github.com (github.com)... 192.30.255.112
Connecting to github.com (github.com)|192.30.255.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-releases.githubusercontent.com/96246170/2c9a7ef4-ecbd-11e7-9e90-e214158dc7f5?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210407%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210407T130721Z&X-Amz-Expires=300&X-Amz-Signature=4d4b2d9f20bada149cd5d3568ce01144905bd74615002bb40a211fd974f03eab&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=96246170&response-content-disposition=attachment%3B%20filename%3Ddemo_2.0.bag&response-content-type=application%2Foctet-stream [following]
--2021-04-07 21:07:22--  https://github-releases.githubusercontent.com/96246170/2c9a7ef4-ecbd-11e7-9e90-e214158dc7f5?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210407%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210407T130721Z&X-Amz-Expires=300&X-Amz-Signature=4d4b2d9f20bada149cd5d3568ce01144905bd74615002bb40a211fd974f03eab&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=96246170&response-content-disposition=attachment%3B%20filename%3Ddemo_2.0.bag&response-content-type=application%2Foctet-stream
Resolving github-releases.githubusercontent.com (github-releases.githubusercontent.com)... 185.199.108.154, 185.199.109.154, 185.199.110.154, ...
Connecting to github-releases.githubusercontent.com (github-releases.githubusercontent.com)|185.199.108.154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 66183794 (63M) [application/octet-stream]
Saving to: 'demo_2.0.bag'

100%[======================================>] 66,183,794  95.4KB/s   in 14m 40s

2021-04-07 21:22:03 (73.4 KB/s) - 'demo_2.0.bag' saved [66183794/66183794]

Download demo_2.0.bag success
root@in_dev_docker:/apollo# source /apollo/bazel-apollo/external/ros/setup.bash
root@in_dev_docker:/apollo#  rosbag play demo_2.0.bag --loop

  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值