-
Notifications
You must be signed in to change notification settings - Fork 26
/
run_ros_tracking.sh
executable file
·129 lines (106 loc) · 2.63 KB
/
run_ros_tracking.sh
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
#!/usr/bin/env bash
# Source our workspace directory to load ENV variables
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
source ${SCRIPT_DIR}/../../../devel/setup.bash
#=============================================================
#=============================================================
#=============================================================
config=(
"euroc_mav"
"euroc_mav"
"euroc_mav"
"euroc_mav"
"euroc_mav"
"euroc_mav"
"rpng_plane"
"rpng_plane"
"rpng_plane"
"rpng_plane"
"rpng_plane"
"rpng_plane"
"rpng_plane"
"rpng_plane"
)
# dataset locations
bagnames=(
"V1_01_easy"
"V1_02_medium"
"V1_03_difficult"
"V2_01_easy"
"V2_02_medium"
"V2_03_difficult"
"table_01"
"table_02"
"table_03"
"table_04"
"table_05"
"table_06"
"table_07"
"table_08"
)
# how far we should start into the dataset
# this can be used to skip the initial sections
bagstarttimes=(
"0"
"0"
"0"
"0"
"0"
"0"
"0"
"0"
"0"
"0"
"0"
"0"
"0"
"0"
)
do_slam_plane="true"
sigma_c="0.010"
max_slam="30"
# location to save log files into
bag_path="/home/patrick/datasets/"
base_path="/home/patrick/workspace/catkin_ws_plane/src/ov_plane/results/"
save_path3="$base_path/exp_track_stats/trackings"
#=============================================================
#=============================================================
#=============================================================
# Loop through all datasets
for i in "${!bagnames[@]}"; do
# start timing
start_time="$(date -u +%s)"
filename_track="$save_path3/${config[i]}_${bagnames[i]}.txt"
# run our ROS launch file (note we send console output to terminator)
roslaunch ov_plane serial.launch \
verbosity:="WARNING" \
max_cameras:="1" \
use_stereo:="false" \
config:="${config[i]}" \
object:="" \
dataset:="${bagnames[i]}" \
bag:="$bag_path/${config[i]}/${bagnames[i]}.bag" \
bag_start:="${bagstarttimes[i]}" \
use_plane_constraint:="true" \
use_plane_constraint_msckf:="true" \
use_plane_constraint_slamu:="true" \
use_plane_constraint_slamd:="true" \
use_plane_slam_feats:="$do_slam_plane" \
use_refine_plane_feat:="true" \
sigma_constraint:="$sigma_c" \
const_init_multi:="1.00" \
const_init_chi2:="1.00" \
num_pts:="200" \
num_slam:="${max_slam[c]}" \
dobag:="true" \
bag_rate:="2" \
dosave:="false" \
dotime:="false" \
dotrackinfo:="true" \
path_track:="$filename_track" \
dolivetraj:="true" &> /dev/null
# print out the time elapsed
end_time="$(date -u +%s)"
elapsed="$(($end_time-$start_time))"
echo "BASH: ${config[i]}_${bagnames[i]} - took $elapsed seconds";
done