-
Notifications
You must be signed in to change notification settings - Fork 0
/
exp_sacia_param_grid_search.cpp
65 lines (47 loc) · 2.5 KB
/
exp_sacia_param_grid_search.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
#include "./include/tools.hpp"
#include<ctime>
// RUN FROM THE BUILD FOLDER
// Author: DS, 2021-07-22
int main(int argc, char **argv)
{
time_t timetoday;
time (&timetoday);
std::cout << "exp_sacia_param_grid_search initiated on : "<< asctime(localtime(&timetoday)) << std::endl;
std::string configFilenames[] = {"../data/exp_sacia_param_grid_search.txt", "../data/exp_sacia_param_grid_search_yaw110deg.txt"}; // including path
Settings pipelineSettings = getPipelineDefaultSettings();
// set up values to be traversed (exponential growing )
double saciaNumSampleVals[] = {5, 10.0, 20, 40, 80};
double d = 0.5;
double saciaMinSampleDistVals[] = {0., 1.1*d, 2.1*d, 4.1*d, 8.1*d};
double saciaNumIterVals[] = {800};
double saciaMaxCorrDistVals[] = {0.5, 1.0, 2.0, 4.0, 8.0};
// num iterations per combination of sacia values
int numberIter = 1;
double seedRef(0.1), seedSource(0.2), seedCustomRotation(0.3);
// for assessing stability of pose estimation, use same seed for several iterations and observe if pose estimation is stable
seedRef = 0.19, seedSource = 0.344, seedCustomRotation = .7668;
double inc = 0.37;
for (std::string configFilename : configFilenames) {
for (size_t i = 1; i <= numberIter; i++) {
seedRef += inc;
seedSource += inc;
seedCustomRotation += inc;
// write results from each iteration in own logfile to ease excel analysis
std::string outputFilename = appendTimestamp("../results/exp_sacia_param_grid_search_fixedYaw");
for (double saciaNumIter : saciaNumIterVals) {
pipelineSettings.setValue(SACIA_NUM_ITERATIONS, saciaNumIter);
for (double saciaNumSample : saciaNumSampleVals) {
pipelineSettings.setValue(SACIA_NUM_SAMPLES, saciaNumSample);
for (double saciaMinSampleDist : saciaMinSampleDistVals) {
pipelineSettings.setValue(SACIA_MIN_SAMPLE_DIST, saciaMinSampleDist);
for (double saciaMaxCorrDist : saciaMaxCorrDistVals) {
pipelineSettings.setValue(SACIA_MAX_CORRESPONDENCE_DIST, saciaMaxCorrDist);
fullRegistration(configFilename, pipelineSettings, outputFilename, &seedRef, &seedSource, &seedCustomRotation);
}
}
}
}
}
}
return 0;
}