-
Notifications
You must be signed in to change notification settings - Fork 41
/
Apollo_3.5_51VR_configuration.cpp
256 lines (150 loc) · 6.95 KB
/
Apollo_3.5_51VR_configuration.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
1. Apollo官方:
git lfs clone [email protected]:mirrors/apolloauto.git -b r3.5.0
df -hl #Ubuntu 查看磁盘空间大小命令
2. SSH public key
解决办法通过 ssh-add
eval "$(ssh-agent -s)"
ssh-add
3. Github 加速 in Ubuntu & the same in Docker
sudo vim /etc/hosts
用浏览器访问 IPAddress.com 使用 IP Lookup 工具获得这个域名的ip地址,该网站可能需要梯子,输入上述域名后,分别获得github.com和github.global.ssl.fastly.net对应的ip,比如192.168.xx.xx和185.31.17.xx。准备工作做完之后,在vi打开的hosts文件中添加如下格式:
192.168.xx.xx github.com
185.31.17.xx github.global.ssl.fastly.net
然后esc退出编辑模式,输入wq,保存hosts文件,修改hosts结束。此时,如果直接访问github可能不会立即生效,因为有DNS缓存,并没有按照最新的修改配置访问。
最后,我们在命令行中输入sudo dscacheutil -flushcache,更新DNS缓存。
127.0.0.1 localhost
127.0.1.1 zy
10.2.35.202 docker.51vr.local
151.101.185.194 github.global.ssl.fastly.net
140.82.113.4 github.com
最暴力的方法刷dns,重启网络:
sudo /etc/init.d/networking restart
重启网络服务:
/etc/init.d/networking restart
The folder contains source code
zy@zy:/home/apollo_offical/apollo_r.5.0/apolloauto$
1.
GPU version:
sudo ./apollo.sh build_gpu
CPU version:
./apollo.sh build_cpu
Easy version:
bash apollo.sh build -j 8
The source code:
zy@zy:/home/apollo-r3.5.0$
apollo 3.5 official image:
https://github.com/ApolloAuto/apollo/tree/r3.5.0
Apollo 3.5的构建方法:
https://blog.csdn.net/davidhopper/article/details/85097502
# Start the docker.
bash docker/scripts/dev_start.sh
# Step into the docker.
bash docker/scripts/dev_into.sh
# Build the apollo project in the docker.
# -j 8 depends on the number of CPU cores on your machine.
bash apollo.sh build -j 8
bash scripts/bootstrap.sh
http://localhost:8888/
Restart Dreamview:
bash scripts/bootstrap.sh stop
bash scripts/bootstrap.sh start
Dreamview 用gdb调试:
$ gdb --args /apollo/bazel-bin/modules/dreamview/dreamview --flagfile=/apollo/modules/dreamview/conf/dreamview.conf
// SimOne.exe
D:\Cybertron\UnrealEngine\Output\Development\WindowsNoEditor\SimOne\Binaries\Win64
1. Rancher
Image: docker.51vr.local:6000/apolloauto/apollo:dev5
2. IN Ubuntu terminal: docker ps -a
docker exec -it 1c10ae5c4777 bash
bash scripts/bootstrap.sh
source /apollo/scripts/apolo_base.sh
cyber_recorder play -f docs/demo_guide/demo_3.5.record --loop
run.sh & kill.sh
The maps located in: root@apollo5-apollo-ubuntu14-1:/Cybertron2/apollo/modules/map/data
3. The GitLab
http://git.51vr.local/51World/apollo/tree/a3.5/docker
6. only CyberBridge bazel build:
root@apollo5-apollo-ubuntu14-1:/apollo# bazel build //CyberBridge:libApolloCyber.so
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Apollo官方:
1.
GPU version:
sudo ./apollo.sh build_gpu
CPU version:
./apollo.sh build_cpu
Easy version:
bash apollo.sh build -j 8
apollo 3.5 official image:
https://github.com/ApolloAuto/apollo/tree/r3.5.0
Apollo 3.5的构建方法:
https://blog.csdn.net/davidhopper/article/details/85097502
# Start the docker.
bash docker/scripts/dev_start.sh
# Step into the docker.
bash docker/scripts/dev_into.sh
# Build the apollo project in the docker.
# -j 8 depends on the number of CPU cores on your machine.
bash apollo.sh build -j 8
bash scripts/bootstrap.sh
http://localhost:8888/
查看Bazel依赖图:
bazel query --nohost_deps --noimplicit_deps 'deps(//modules/dreamview:dreamview)'
2. 51VR
without perception
apollo5-apollo-ubuntu14-1
docker exec -it 1c10ae5c4777 bash
root@apollo5-apollo-ubuntu14-1:/apollo# ./apollo.sh
Start the dreamview:
bash scripts/bootstrap.sh
3. 错误
./apollo.sh build_cpu
INFO: (07-23 01:17:44.831) Found 3742 targets...
ERROR: (07-23 01:17:46.748) /apollo/modules/perception/lidar/lib/segmentation/cnnseg/BUILD:84:1: Linking of rule '//modules/perception/lidar/lib/segmentation/cnnseg:cnn_segmentation_test' failed (Exit 1).
/usr/bin/ld: warning: libmkldnn.so.0, needed by bazel-out/local-dbg/bin/_solib_k8/_U@paddlepaddle_S_S_Cpaddlepaddle___Uexternal_Spaddlepaddle_Slib/libpaddle_fluid.so, not found (try using -rpath or -rpath-link)
cd
need to mount the volume: paddlepaddle_volume-x86_64-1.0.0
4. only CyberBridge bazel build:
root@apollo5-apollo-ubuntu14-1:/apollo# bazel build //CyberBridge:libApolloCyber.so
5. // How to Run Perception Module on Your Local Computer
Build Apollo: ./apollo.sh build_opt_gpu
查看显卡名称以及驱动版本: nvidia-smi
// install nvidia-docker // https://www.jianshu.com/p/f25ccedb996e //https://www.dongliwu.com/archives/61/
# If you have nvidia-docker 1.0 installed: we need to remove it and all existing GPU containers
docker volume ls -q -f driver=nvidia-docker | xargs -r -I{} -n1 docker ps -q -a -f volume={} | xargs -r docker rm -f
sudo apt-get purge -y nvidia-docker
# Add the package repositories
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update
# Install nvidia-docker2 and reload the Docker daemon configuration
sudo apt-get install -y nvidia-docker2
sudo pkill -SIGHUP dockerd
# Test nvidia-smi with the latest official CUDA image
docker run --runtime=nvidia --rm nvidia/cuda:9.0-base nvidia-smi
// 配置daemon的默认运行时
在安装完成nvidia-docker2之后,nvidia-docker2已经默认在/etc/docker/daemon.json文件中写入了以下内容:
{
"default-runtime": "nvidia",
"runtimes": {
"nvidia": {
"path": "/usr/bin/nvidia-container-runtime",
"runtimeArgs": [],
"registry-mirrors": ["https://gemfield.mirror.aliyuncs.com"]
}
}
}
我们所做的工作其实就是在第一行加上了"default-runtime": "nvidia",
重启docker服务: sudo systemctl restart docker
再次检查状态: systemctl status docker
/////////////////////////////////////////////////////////////
6. Hello, what is the output frequency of apollo 3.5 "/apollo/perception/obstacles"? I only input the data of lidar64 (not including lidar128/16, camera and radar), run the perception module, monitor with cyber_monitor, The frequency of "/apollo/perception/obstacles" is about 0.88 ~ 1. Why is it so low?
Channels FrameRatio
/apollo/localization/pose 100.05
/apollo/perception/obstacles 0.91
/apollo/sensor/camera/front_12mm/image 0.00
/apollo/sensor/camera/front_6mm/image 0.00
/apollo/sensor/velodyne64/compensator/PointCloud2 9.87
/perception/camera_debug 0.00
/perception/obstacles 0.00
/tf 100.00
/tf_static 0.00