-
Notifications
You must be signed in to change notification settings - Fork 399
348 lines (340 loc) · 19.3 KB
/
main.yml
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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
# build_macos:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v3
# - name: brew install
# run: |
# brew update
# brew upgrade
# brew install ccache pkg-config cmake git suite-sparse libomp eigen ffmpeg opencv yaml-cpp glog gflags glew protobuf clang-format
clang-format:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- uses: DoozyX/[email protected]
with:
source: "."
exclude: "./3rd"
extensions: "h,cc"
clangFormatVersion: 6
style: file
inplace: False
build_without_gui_cv3:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
container:
image: ghcr.io/ymd-stella/stella-cv/stella_vslam:cv-3.x
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: cmake and make
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTS=ON -DUSE_SSE_ORB=ON ..
make -j $(($(nproc) / 2))
- name: unit test
run: |
cd build
export BOW_VOCAB=/datasets/orb_vocab/orb_vocab.fbow
ctest -V
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
container:
image: ghcr.io/ymd-stella/stella-cv/stella_vslam:cv-4.x
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Create artifact directory
run: |
mkdir -p artifact
- name: Save cpuinfo
run: |
cp /proc/cpuinfo artifact
- name: cmake and make library
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTS=ON -DUSE_SSE_ORB=ON -DUSE_GTSAM=ON ..
make -j $(($(nproc) / 2))
make install
- uses: actions/checkout@v3
with:
repository: stella-cv/pangolin_viewer
path: pangolin_viewer
submodules: recursive
- name: cmake and make pangolin_viewer
run: |
mkdir -p pangolin_viewer/build
cd pangolin_viewer/build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
make -j $(($(nproc) / 2))
make install
- uses: actions/checkout@v3
with:
repository: stella-cv/stella_vslam_examples
path: stella_vslam_examples
submodules: recursive
- name: cmake and make examples
run: |
mkdir -p stella_vslam_examples/build
cd stella_vslam_examples/build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_STACK_TRACE_LOGGER=ON ..
make -j $(($(nproc) / 2))
- name: unit test
run: |
cd build
export BOW_VOCAB=/datasets/orb_vocab/orb_vocab.fbow
ctest -V
- name: Convert groundtruth to TUM format
run: |
python3 scripts/dataset_tools/compute_euroc_cam_tf.py > tf.json
evo_traj euroc --transform_right tf.json /datasets/EuRoC/MH_01/state_groundtruth_estimate0/data.csv --save_as_tum
mv data.tum MH_01.tum
evo_traj euroc --transform_right tf.json /datasets/EuRoC/MH_04/state_groundtruth_estimate0/data.csv --save_as_tum
mv data.tum MH_04.tum
- name: make config for gtsam backend
run: |
sed -e 's/backend: "g2o"/backend: "gtsam"/g' example/euroc/EuRoC_mono.yaml > EuRoC_mono_gtsam.yaml
sed -e 's/backend: "g2o"/backend: "gtsam"/g' example/euroc/EuRoC_stereo.yaml > EuRoC_stereo_gtsam.yaml
- name: make config for temporal mapping
run: |
sed -e 's/erase_temporal_keyframes: false/erase_temporal_keyframes: true/g' -e 's/enable_temporal_keyframe_only_tracking: false/enable_temporal_keyframe_only_tracking: true/g' example/euroc/EuRoC_mono.yaml > EuRoC_mono_temporal_mapping.yaml
- name: make config for sqlite3 map format
run: |
sed -e 's/map_format: "msgpack"/map_format: "sqlite3"/g' example/euroc/EuRoC_mono.yaml > EuRoC_mono_sqlite3.yaml
- name: SLAM test (monocular) with EuRoC MAV dataset (MH_01)
run: |
cd build
../stella_vslam_examples/build/run_euroc_slam -v /datasets/orb_vocab/orb_vocab.fbow -d /datasets/EuRoC/MH_01 -c ../example/euroc/EuRoC_mono.yaml --frame-skip 2 --no-sleep --log-level=debug --eval-log-dir . --map-db-out MH_01_mono.msg --viewer=none
mv frame_trajectory.txt ../artifact/frame_trajectory_MH_01_mono_slam.txt
mv track_times.txt ../artifact/track_times_MH_01_mono_slam.txt
../stella_vslam_examples/build/run_euroc_slam -v /datasets/orb_vocab/orb_vocab.fbow -d /datasets/EuRoC/MH_01 -c ../EuRoC_mono_gtsam.yaml --frame-skip 2 --no-sleep --log-level=debug --eval-log-dir . --map-db-out MH_01_mono_gtsam.msg --viewer=none
mv frame_trajectory.txt ../artifact/frame_trajectory_MH_01_mono_gtsam_slam.txt
mv track_times.txt ../artifact/track_times_MH_01_mono_gtsam_slam.txt
../stella_vslam_examples/build/run_euroc_slam -v /datasets/orb_vocab/orb_vocab.fbow -d /datasets/EuRoC/MH_01 -c ../EuRoC_mono_sqlite3.yaml --frame-skip 2 --no-sleep --log-level=debug --map-db-out MH_01_mono_sqlite3.db --viewer=none
- name: SLAM test (stereo) with EuRoC MAV dataset (MH_01)
run: |
cd build
../stella_vslam_examples/build/run_euroc_slam -v /datasets/orb_vocab/orb_vocab.fbow -d /datasets/EuRoC/MH_01 -c ../example/euroc/EuRoC_stereo.yaml --frame-skip 2 --no-sleep --log-level=debug --eval-log-dir . --map-db-out MH_01_stereo.msg --viewer=none
mv frame_trajectory.txt ../artifact/frame_trajectory_MH_01_stereo_slam.txt
mv track_times.txt ../artifact/track_times_MH_01_stereo_slam.txt
../stella_vslam_examples/build/run_euroc_slam -v /datasets/orb_vocab/orb_vocab.fbow -d /datasets/EuRoC/MH_01 -c ../EuRoC_stereo_gtsam.yaml --frame-skip 2 --no-sleep --log-level=debug --eval-log-dir . --map-db-out MH_01_stereo_gtsam.msg --viewer=none
mv frame_trajectory.txt ../artifact/frame_trajectory_MH_01_stereo_gtsam_slam.txt
mv track_times.txt ../artifact/track_times_MH_01_stereo_gtsam_slam.txt
- name: Localization test (monocular) with EuRoC MAV dataset (MH_01)
run: |
cd build
../stella_vslam_examples/build/run_euroc_slam --disable-mapping -v /datasets/orb_vocab/orb_vocab.fbow -d /datasets/EuRoC/MH_01 -c ../example/euroc/EuRoC_mono.yaml --frame-skip 2 --no-sleep --log-level=debug --eval-log-dir . --map-db-in MH_01_mono.msg --viewer=none
mv frame_trajectory.txt ../artifact/frame_trajectory_MH_01_mono_localization.txt
mv track_times.txt ../artifact/track_times_MH_01_mono_localization.txt
../stella_vslam_examples/build/run_euroc_slam --temporal-mapping -v /datasets/orb_vocab/orb_vocab.fbow -d /datasets/EuRoC/MH_01 -c ../EuRoC_mono_temporal_mapping.yaml --frame-skip 2 --no-sleep --log-level=debug --eval-log-dir . --map-db-in MH_01_mono.msg --viewer=none
mv frame_trajectory.txt ../artifact/frame_trajectory_MH_01_mono_localization_temporal_mapping.txt
mv track_times.txt ../artifact/track_times_MH_01_mono_localization_temporal_mapping.txt
../stella_vslam_examples/build/run_euroc_slam --disable-mapping -v /datasets/orb_vocab/orb_vocab.fbow -d /datasets/EuRoC/MH_01 -c ../EuRoC_mono_sqlite3.yaml --frame-skip 2 --no-sleep --log-level=debug --map-db-in MH_01_mono_sqlite3.db --viewer=none
- name: SLAM test (monocular) with EuRoC MAV dataset (MH_04)
run: |
cd build
../stella_vslam_examples/build/run_euroc_slam -v /datasets/orb_vocab/orb_vocab.fbow -d /datasets/EuRoC/MH_04 -c ../example/euroc/EuRoC_mono.yaml --frame-skip 2 --no-sleep --log-level=debug --eval-log-dir . --map-db-out MH_04_mono.msg --viewer=none
mv frame_trajectory.txt ../artifact/frame_trajectory_MH_04_mono_slam.txt
mv track_times.txt ../artifact/track_times_MH_04_mono_slam.txt
- name: SLAM test (stereo) with EuRoC MAV dataset (MH_04)
run: |
cd build
../stella_vslam_examples/build/run_euroc_slam -v /datasets/orb_vocab/orb_vocab.fbow -d /datasets/EuRoC/MH_04 -c ../example/euroc/EuRoC_stereo.yaml --frame-skip 2 --no-sleep --log-level=debug --eval-log-dir . --map-db-out MH_04_stereo.msg --viewer=none
mv frame_trajectory.txt ../artifact/frame_trajectory_MH_04_stereo_slam.txt
mv track_times.txt ../artifact/track_times_MH_04_stereo_slam.txt
- name: Localization test (monocular) with EuRoC MAV dataset (MH_04)
run: |
cd build
../stella_vslam_examples/build/run_euroc_slam --disable-mapping -v /datasets/orb_vocab/orb_vocab.fbow -d /datasets/EuRoC/MH_04 -c ../example/euroc/EuRoC_mono.yaml --frame-skip 2 --no-sleep --log-level=debug --eval-log-dir . --map-db-in MH_04_mono.msg --viewer=none
mv frame_trajectory.txt ../artifact/frame_trajectory_MH_04_mono_localization.txt
mv track_times.txt ../artifact/track_times_MH_04_mono_localization.txt
../stella_vslam_examples/build/run_euroc_slam --temporal-mapping -v /datasets/orb_vocab/orb_vocab.fbow -d /datasets/EuRoC/MH_04 -c ../EuRoC_mono_temporal_mapping.yaml --frame-skip 2 --no-sleep --log-level=debug --eval-log-dir . --map-db-in MH_04_mono.msg --viewer=none
mv frame_trajectory.txt ../artifact/frame_trajectory_MH_04_mono_localization_temporal_mapping.txt
mv track_times.txt ../artifact/track_times_MH_04_mono_localization_temporal_mapping.txt
- name: download openvslam_test_dataset
run: |
curl -sL "https://github.com/stella-cv/openvslam_test_dataset/raw/main/openvslam_test_dataset.zip" -o openvslam_test_dataset.zip
unzip openvslam_test_dataset.zip
rm openvslam_test_dataset.zip
- name: make config for openvslam_test_dataset
run: |
sed -e 's/fps: .*/fps: 24.0/g' example/aist/equirectangular.yaml > equirectangular.yaml
- name: make config for gtsam backend
run: |
sed -e 's/backend: "g2o"/backend: "gtsam"/g' equirectangular.yaml > equirectangular_gtsam.yaml
- name: SLAM test with equirectangular dataset (1)
run: |
cd build
../stella_vslam_examples/build/run_video_slam -v /datasets/orb_vocab/orb_vocab.fbow -m ../openvslam_test_dataset/1/equirectangular/video.mp4 -c ../equirectangular.yaml --no-sleep --log-level=debug --eval-log-dir . --map-db-out equirectangular_map.msg -t 0.0 --viewer=none
mv frame_trajectory.txt ../artifact/frame_trajectory_equirectangular_1.txt
mv track_times.txt ../artifact/track_times_equirectangular_1.txt
../stella_vslam_examples/build/run_video_slam -v /datasets/orb_vocab/orb_vocab.fbow -m ../openvslam_test_dataset/1/equirectangular/video.mp4 -c ../equirectangular_gtsam.yaml --no-sleep --log-level=debug --eval-log-dir . --map-db-out equirectangular_gtsam_map.msg -t 0.0 --viewer=none
mv frame_trajectory.txt ../artifact/frame_trajectory_equirectangular_gtsam_1.txt
mv track_times.txt ../artifact/track_times_equirectangular_gtsam_1.txt
- name: SLAM test with equirectangular dataset (2)
run: |
cd build
../stella_vslam_examples/build/run_video_slam -v /datasets/orb_vocab/orb_vocab.fbow -m ../openvslam_test_dataset/2/equirectangular/video.mp4 -c ../equirectangular.yaml --no-sleep --log-level=debug --eval-log-dir . --map-db-out equirectangular_map.msg -t 0.0 --viewer=none
mv frame_trajectory.txt ../artifact/frame_trajectory_equirectangular_2.txt
mv track_times.txt ../artifact/track_times_equirectangular_2.txt
- name: SLAM test with equirectangular dataset (3)
run: |
cd build
../stella_vslam_examples/build/run_video_slam -v /datasets/orb_vocab/orb_vocab.fbow -m ../openvslam_test_dataset/3/equirectangular/video.mp4 -c ../equirectangular.yaml --no-sleep --log-level=debug --eval-log-dir . --map-db-out equirectangular_map.msg -t 0.0 --viewer=none
mv frame_trajectory.txt ../artifact/frame_trajectory_equirectangular_3.txt
mv track_times.txt ../artifact/track_times_equirectangular_3.txt
- name: Evaluation
run: |
cp scripts/workflows/* .
(
echo '<details>'
echo '<summary>Track time and Relative pose error</summary>'
echo
echo '|dataset|track_time<br>(mean)|track_time<br>(median)|track_time<br>(max)|RPE<br>(mean)|RPE<br>(median)|RPE<br>(max)|RPE<br>(rmse)|RPE<br>(sse)|RPE<br>(std)|'
echo '|---|---|---|---|---|---|---|---|---|---|'
echo -n '| EuRoC MH_01 (SLAM, perspective, mono)'
bash track_time_print_row.bash artifact/track_times_MH_01_mono_slam.txt
bash evo_rpe_print_row.bash tum MH_01.tum artifact/frame_trajectory_MH_01_mono_slam.txt -as
echo '|'
echo -n '| EuRoC MH_01 (SLAM, perspective, mono, gtsam)'
bash track_time_print_row.bash artifact/track_times_MH_01_mono_gtsam_slam.txt
bash evo_rpe_print_row.bash tum MH_01.tum artifact/frame_trajectory_MH_01_mono_gtsam_slam.txt -as
echo '|'
echo -n '| EuRoC MH_01 (SLAM, perspective, stereo)'
bash track_time_print_row.bash artifact/track_times_MH_01_stereo_slam.txt
bash evo_rpe_print_row.bash tum MH_01.tum artifact/frame_trajectory_MH_01_stereo_slam.txt -a
echo '|'
echo -n '| EuRoC MH_01 (SLAM, perspective, stereo, gtsam)'
bash track_time_print_row.bash artifact/track_times_MH_01_stereo_gtsam_slam.txt
bash evo_rpe_print_row.bash tum MH_01.tum artifact/frame_trajectory_MH_01_stereo_gtsam_slam.txt -a
echo '|'
echo -n '| EuRoC MH_01 (Localization, perspective, mono)'
bash track_time_print_row.bash artifact/track_times_MH_01_mono_localization.txt
bash evo_rpe_print_row.bash tum MH_01.tum artifact/frame_trajectory_MH_01_mono_localization.txt -as
echo '|'
echo -n '| EuRoC MH_01 (Localization, perspective, mono, temporal mapping)'
bash track_time_print_row.bash artifact/track_times_MH_01_mono_localization_temporal_mapping.txt
bash evo_rpe_print_row.bash tum MH_01.tum artifact/frame_trajectory_MH_01_mono_localization_temporal_mapping.txt -as
echo '|'
echo -n '| EuRoC MH_04 (SLAM, perspective, mono)'
bash track_time_print_row.bash artifact/track_times_MH_04_mono_slam.txt
bash evo_rpe_print_row.bash tum MH_04.tum artifact/frame_trajectory_MH_04_mono_slam.txt -as
echo '|'
echo -n '| EuRoC MH_04 (SLAM, perspective, stereo)'
bash track_time_print_row.bash artifact/track_times_MH_04_stereo_slam.txt
bash evo_rpe_print_row.bash tum MH_04.tum artifact/frame_trajectory_MH_04_stereo_slam.txt -a
echo '|'
echo -n '| EuRoC MH_04 (Localization, perspective, mono)'
bash track_time_print_row.bash artifact/track_times_MH_04_mono_localization.txt
bash evo_rpe_print_row.bash tum MH_04.tum artifact/frame_trajectory_MH_04_mono_localization.txt -as
echo '|'
echo -n '| EuRoC MH_04 (Localization, perspective, mono, temporal mapping)'
bash track_time_print_row.bash artifact/track_times_MH_04_mono_localization_temporal_mapping.txt
bash evo_rpe_print_row.bash tum MH_04.tum artifact/frame_trajectory_MH_04_mono_localization_temporal_mapping.txt -as
echo '|'
echo -n '| openvslam_test_dataset 1 (SLAM, equirectangular, mono)'
bash track_time_print_row.bash artifact/track_times_equirectangular_1.txt
bash evo_rpe_print_row.bash tum openvslam_test_dataset/1/gt.tum artifact/frame_trajectory_equirectangular_1.txt -as
echo '|'
echo -n '| openvslam_test_dataset 1 (SLAM, equirectangular, mono, gtsam)'
bash track_time_print_row.bash artifact/track_times_equirectangular_gtsam_1.txt
bash evo_rpe_print_row.bash tum openvslam_test_dataset/1/gt.tum artifact/frame_trajectory_equirectangular_gtsam_1.txt -as
echo '|'
echo -n '| openvslam_test_dataset 2 (SLAM, equirectangular, mono)'
bash track_time_print_row.bash artifact/track_times_equirectangular_2.txt
bash evo_rpe_print_row.bash tum openvslam_test_dataset/2/gt.tum artifact/frame_trajectory_equirectangular_2.txt -as
echo '|'
echo -n '| openvslam_test_dataset 3 (SLAM, equirectangular, mono)'
bash track_time_print_row.bash artifact/track_times_equirectangular_3.txt
bash evo_rpe_print_row.bash tum openvslam_test_dataset/3/gt.tum artifact/frame_trajectory_equirectangular_3.txt -as
echo '|'
echo '</details>'
) >> artifact/result.md
- uses: actions/upload-artifact@v3
with:
name: artifact
path: artifact
build_tutorial:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
container:
image: ghcr.io/ymd-stella/stella-cv/stella_vslam:cv-4.x
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: cmake and make library
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON -DUSE_OPENMP=OFF ..
make -j $(($(nproc) / 2))
make install
- uses: actions/checkout@v3
with:
repository: stella-cv/stella_vslam_examples
path: stella_vslam_examples
submodules: recursive
- name: cmake and make examples
run: |
mkdir -p stella_vslam_examples/build
cd stella_vslam_examples/build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_STACK_TRACE_LOGGER=ON ..
make -j $(($(nproc) / 2))
- name: download a dataset
run: |
cd build
gdown "https://drive.google.com/uc?id=1TXjREzkht3iRz__qVx4oYRW1GXsv37ct" -q
unzip video_for_ci_1.zip
rm video_for_ci_1.zip
- name: mapping test with the tutorial
run: |
cd build
../stella_vslam_examples/build/run_video_slam -v /datasets/orb_vocab/orb_vocab.fbow -m ./video_for_ci_1/video.mp4 -c ../example/aist/equirectangular.yaml --frame-skip 3 --no-sleep --log-level=debug --eval-log-dir . --map-db-out map.msg --viewer=none
- name: localization test with the tutorial
run: |
cd build
../stella_vslam_examples/build/run_video_slam --disable-mapping -v /datasets/orb_vocab/orb_vocab.fbow -m ./video_for_ci_1/video.mp4 -c ../example/aist/equirectangular.yaml --frame-skip 3 --no-sleep --log-level=debug --eval-log-dir . --map-db-in map.msg --viewer=none
rosdep_humble:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
container:
image: ghcr.io/ymd-stella/stella-cv/ros:humble-ros-base
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: build ros2 packages
run: |
mkdir -p /ros_ws/src
cp -r . /ros_ws/src/stella_vslam
cd /ros_ws/
rosdep update
apt update
rosdep install -y -i --from-paths src
export MAKEFLAGS="-j $(($(nproc) / 2))"
(source /opt/ros/${ROS_DISTRO}/setup.bash && colcon build --parallel-workers 1)