forked from HpWang-whu/RoReg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprepare_dataset_all.py
75 lines (64 loc) · 2.45 KB
/
prepare_dataset_all.py
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
import os, shutil
from multiprocessing import Pool
from pathlib import Path
PY3="python3"
GPU = "0"
os.environ["CUDA_VISIBLE_DEVICES"] = GPU
BENCHMARK_DIR="/benchmark/point_clouds_registration_benchmark/"
OUTPUT_DIR = "./data/origin_data/benchmark/"
base_command = (f'{PY3}' + ' prepare_benchmark_dataset.py ')
problem_txts = ['kaist/urban05_global.txt',
'eth/apartment_global.txt',
'eth/gazebo_summer_global.txt',
'eth/gazebo_winter_global.txt',
'eth/hauptgebaude_global.txt',
'eth/plain_global.txt',
'eth/stairs_global.txt',
'eth/wood_autumn_global.txt',
'eth/wood_summer_global.txt',
'tum/long_office_household_global.txt',
'tum/pioneer_slam_global.txt',
'tum/pioneer_slam3_global.txt',
'planetary/box_met_global.txt',
'planetary/p2at_met_global.txt',
'planetary/planetary_map_global.txt']
pcd_dirs = ['kaist/urban05/',
'eth/apartment/',
'eth/gazebo_summer/',
'eth/gazebo_winter/',
'eth/hauptgebaude/',
'eth/plain/',
'eth/stairs/',
'eth/wood_autumn/',
'eth/wood_summer/',
'tum/long_office_household/',
'tum/pioneer_slam/',
'tum/pioneer_slam3/',
'planetary/box_met/',
'planetary/p2at_met/',
'planetary/p2at_met/']
out_dirs = ['urban05/problems/',
'apartment/problems/',
'gazebo_summer/problems/',
'gazebo_winter/problems/',
'hauptgebaude/problems/',
'plain/problems/',
'stairs/problems/',
'wood_autumn/problems/',
'wood_summer/problems/',
'long_office_household/problems/',
'pioneer_slam/problems/',
'pioneer_slam3/problems/',
'box_met/problems/',
'p2at_met/problems/',
'planetary_map/problems/']
commands = []
for problem_txt, pcd_dir, out_dir in zip(problem_txts, pcd_dirs, out_dirs):
full_command = (base_command +
f' --input_txt={BENCHMARK_DIR}/{problem_txt}' +
f' --pcd_dir={BENCHMARK_DIR}/{pcd_dir}' +
f' --output_dir={OUTPUT_DIR}/{out_dir}')
problem_name = Path(problem_txt).stem
commands.append(full_command)
pool = Pool(1)
pool.map(os.system, commands)