push for merge
This commit is contained in:
@@ -294,13 +294,17 @@ public:
|
||||
|
||||
pathEst.push_back(curEst);
|
||||
const float err = diff.length();
|
||||
errorsNorm.push_back(err);
|
||||
|
||||
|
||||
|
||||
// count number of transitions
|
||||
++cnt;
|
||||
|
||||
|
||||
if (cnt > 35) {
|
||||
statsFiltering.add(err);
|
||||
errorsNorm.push_back(err);
|
||||
std::cout << "Filtering: " << se.ts << " " << statsFiltering.asString() << std::endl;
|
||||
}
|
||||
|
||||
if(cnt > skip){
|
||||
//save the current estimation for later smoothing.
|
||||
@@ -335,10 +339,7 @@ public:
|
||||
|
||||
|
||||
// skip the first 35 scans due to uniform distribution start
|
||||
// if (cnt > 35) {
|
||||
statsFiltering.add(err);
|
||||
std::cout << "Filtering: " << se.ts << " " << statsFiltering.asString() << std::endl;
|
||||
//}
|
||||
|
||||
|
||||
const float errSmoothed = diffSmoothed.length();
|
||||
statsSmoothing.add(errSmoothed);
|
||||
@@ -489,7 +490,7 @@ public:
|
||||
std::ofstream oErrPlot("/tmp/plot_err_" + runName + ".gp");
|
||||
oErrPlot << "plot \\\n";
|
||||
oErrPlot << "'err_norm_" << runName << ".dat' with lines, \\\n";
|
||||
oErrPlot << "'err_smooth_" << runName << ".dat' using (($$0)+" << skip << "):1 with lines";
|
||||
oErrPlot << "'err_smooth_" << runName << ".dat' with lines";
|
||||
oErrPlot.close();
|
||||
|
||||
|
||||
|
||||
@@ -51,9 +51,9 @@ public:
|
||||
|
||||
|
||||
//create the backward smoothing filter
|
||||
bf = new K::BackwardSimulation<MyState>(50);
|
||||
//bf = new K::CondensationBackwardFilter<MyState>;
|
||||
bf->setSampler( std::unique_ptr<K::CumulativeSampler<MyState>>(new K::CumulativeSampler<MyState>()));
|
||||
//bf = new K::BackwardSimulation<MyState>(50);
|
||||
bf = new K::CondensationBackwardFilter<MyState>;
|
||||
//bf->setSampler( std::unique_ptr<K::CumulativeSampler<MyState>>(new K::CumulativeSampler<MyState>()));
|
||||
|
||||
|
||||
}
|
||||
@@ -145,7 +145,7 @@ public:
|
||||
bf->setEstimation(std::unique_ptr<K::ParticleFilterEstimationWeightedAverage<MyState>>(new K::ParticleFilterEstimationWeightedAverage<MyState>()));
|
||||
if(smoothing_resample)
|
||||
bf->setResampling( std::unique_ptr<K::ParticleFilterResamplingSimple<MyState>>(new K::ParticleFilterResamplingSimple<MyState>()) );
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransition>( new MySmoothingTransition(&grid)) );
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransitionExperimental>( new MySmoothingTransitionExperimental) );
|
||||
}
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ public:
|
||||
//Smoothing Variables
|
||||
smoothing_walk_mu = 0.7;
|
||||
smoothing_walk_sigma = 0.5;
|
||||
smoothing_heading_sigma = 15.0;
|
||||
smoothing_heading_sigma = 5.0;
|
||||
smoothing_baro_sigma = 0.05;
|
||||
|
||||
bool smoothing_resample = false;
|
||||
@@ -174,7 +174,7 @@ public:
|
||||
bf->setEstimation(std::unique_ptr<K::ParticleFilterEstimationWeightedAverage<MyState>>(new K::ParticleFilterEstimationWeightedAverage<MyState>()));
|
||||
if(smoothing_resample)
|
||||
bf->setResampling( std::unique_ptr<K::ParticleFilterResamplingSimple<MyState>>(new K::ParticleFilterResamplingSimple<MyState>()) );
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransition>( new MySmoothingTransition(&grid)) );
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransitionExperimental>( new MySmoothingTransitionExperimental) );
|
||||
}
|
||||
|
||||
void bergwerk_path1_nexus_simple() {
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
bf->setEstimation(std::unique_ptr<K::ParticleFilterEstimationWeightedAverage<MyState>>(new K::ParticleFilterEstimationWeightedAverage<MyState>()));
|
||||
if(smoothing_resample)
|
||||
bf->setResampling( std::unique_ptr<K::ParticleFilterResamplingSimple<MyState>>(new K::ParticleFilterResamplingSimple<MyState>()) );
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransition>( new MySmoothingTransition(&grid)) );
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransitionExperimental>( new MySmoothingTransitionExperimental) );
|
||||
}
|
||||
|
||||
void bergwerk_path2_nexus_simple() {
|
||||
@@ -311,7 +311,7 @@ public:
|
||||
bf->setEstimation(std::unique_ptr<K::ParticleFilterEstimationWeightedAverage<MyState>>(new K::ParticleFilterEstimationWeightedAverage<MyState>()));
|
||||
if(smoothing_resample)
|
||||
bf->setResampling( std::unique_ptr<K::ParticleFilterResamplingSimple<MyState>>(new K::ParticleFilterResamplingSimple<MyState>()) );
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransition>( new MySmoothingTransition(&grid)) );
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransitionExperimental>( new MySmoothingTransitionExperimental) );
|
||||
}
|
||||
|
||||
void bergwerk_path3_nexus_simple() {
|
||||
@@ -379,7 +379,7 @@ public:
|
||||
bf->setEstimation(std::unique_ptr<K::ParticleFilterEstimationWeightedAverage<MyState>>(new K::ParticleFilterEstimationWeightedAverage<MyState>()));
|
||||
if(smoothing_resample)
|
||||
bf->setResampling( std::unique_ptr<K::ParticleFilterResamplingSimple<MyState>>(new K::ParticleFilterResamplingSimple<MyState>()) );
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransition>( new MySmoothingTransition(&grid)) );
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransitionExperimental>( new MySmoothingTransitionExperimental) );
|
||||
}
|
||||
|
||||
void bergwerk_path4_nexus_simple() {
|
||||
@@ -448,7 +448,7 @@ public:
|
||||
bf->setEstimation(std::unique_ptr<K::ParticleFilterEstimationWeightedAverage<MyState>>(new K::ParticleFilterEstimationWeightedAverage<MyState>()));
|
||||
if(smoothing_resample)
|
||||
bf->setResampling( std::unique_ptr<K::ParticleFilterResamplingSimple<MyState>>(new K::ParticleFilterResamplingSimple<MyState>()) );
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransition>( new MySmoothingTransition(&grid)) );
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransitionExperimental>( new MySmoothingTransitionExperimental) );
|
||||
}
|
||||
|
||||
void bergwerk_path1_galaxy_simple() {
|
||||
@@ -499,7 +499,7 @@ public:
|
||||
bf->setEstimation(std::unique_ptr<K::ParticleFilterEstimationWeightedAverage<MyState>>(new K::ParticleFilterEstimationWeightedAverage<MyState>()));
|
||||
if(smoothing_resample)
|
||||
bf->setResampling( std::unique_ptr<K::ParticleFilterResamplingSimple<MyState>>(new K::ParticleFilterResamplingSimple<MyState>()) );
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransition>( new MySmoothingTransition(&grid)) );
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransitionExperimental>( new MySmoothingTransitionExperimental) );
|
||||
}
|
||||
|
||||
void bergwerk_path2_galaxy_simple() {
|
||||
@@ -550,7 +550,7 @@ public:
|
||||
bf->setEstimation(std::unique_ptr<K::ParticleFilterEstimationWeightedAverage<MyState>>(new K::ParticleFilterEstimationWeightedAverage<MyState>()));
|
||||
if(smoothing_resample)
|
||||
bf->setResampling( std::unique_ptr<K::ParticleFilterResamplingSimple<MyState>>(new K::ParticleFilterResamplingSimple<MyState>()) );
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransition>( new MySmoothingTransition(&grid)) );
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransitionExperimental>( new MySmoothingTransitionExperimental) );
|
||||
}
|
||||
|
||||
void bergwerk_path3_galaxy_simple() {
|
||||
@@ -603,7 +603,7 @@ public:
|
||||
bf->setEstimation(std::unique_ptr<K::ParticleFilterEstimationWeightedAverage<MyState>>(new K::ParticleFilterEstimationWeightedAverage<MyState>()));
|
||||
if(smoothing_resample)
|
||||
bf->setResampling( std::unique_ptr<K::ParticleFilterResamplingSimple<MyState>>(new K::ParticleFilterResamplingSimple<MyState>()) );
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransition>( new MySmoothingTransition(&grid)) );
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransitionExperimental>( new MySmoothingTransitionExperimental) );
|
||||
}
|
||||
|
||||
void bergwerk_path4_galaxy_simple() {
|
||||
|
||||
Reference in New Issue
Block a user