push before merge

This commit is contained in:
toni
2016-05-05 09:42:05 +02:00
parent e3d7e83159
commit bbc8f5aa19
6 changed files with 92 additions and 104 deletions

View File

@@ -15,9 +15,9 @@ namespace MiscSettings {
const int gridSize_cm = 20;
const int timeSteps = 500;
const int timeSteps = 500;
const int numParticles = 50;
const int numParticles = 2500;
const int numBSParticles = 25;

View File

@@ -45,15 +45,23 @@ public:
//pf->setResampling( std::unique_ptr<K::ParticleFilterResamplingPercent<MyState>>(new K::ParticleFilterResamplingPercent<MyState>(0.10)) );
// state estimation step
pf->setEstimation( std::unique_ptr<K::ParticleFilterEstimationWeightedAverageWithAngle<MyState>>(new K::ParticleFilterEstimationWeightedAverageWithAngle<MyState>()));
//pf->setEstimation( std::unique_ptr<K::ParticleFilterEstimationRegionalWeightedAverage<MyState>>(new K::ParticleFilterEstimationRegionalWeightedAverage<MyState>()));
//pf->setEstimation( std::unique_ptr<K::ParticleFilterEstimationOrderedWeightedAverage<MyState>>(new K::ParticleFilterEstimationOrderedWeightedAverage<MyState>(0.50f)));
//pf->setEstimation( std::unique_ptr<K::ParticleFilterEstimationWeightedAverageWithAngle<MyState>>(new K::ParticleFilterEstimationWeightedAverageWithAngle<MyState>()));
//pf->setEstimation( std::unique_ptr<K::ParticleFilterEstimationRegionalWeightedAverage<MyState>>(new K::ParticleFilterEstimationRegionalWeightedAverage<MyState>()));
pf->setEstimation( std::unique_ptr<K::ParticleFilterEstimationOrderedWeightedAverage<MyState>>(new K::ParticleFilterEstimationOrderedWeightedAverage<MyState>(0.50f)));
//create the backward smoothing filter
bf = new K::BackwardSimulation<MyState>(MiscSettings::numBSParticles);
//bf = new K::CondensationBackwardFilter<MyState>;
bf->setSampler( std::unique_ptr<K::CumulativeSampler<MyState>>(new K::CumulativeSampler<MyState>()));
//bf = new K::BackwardSimulation<MyState>(MiscSettings::numBSParticles);
bf = new K::CondensationBackwardFilter<MyState>;
//bf->setSampler( std::unique_ptr<K::CumulativeSampler<MyState>>(new K::CumulativeSampler<MyState>()));
bool smoothing_resample = false;
bf->setEstimation( std::unique_ptr<K::ParticleFilterEstimationOrderedWeightedAverage<MyState>>(new K::ParticleFilterEstimationOrderedWeightedAverage<MyState>(0.50f)));
//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<MySmoothingTransitionExperimental>( new MySmoothingTransitionExperimental) );
}
@@ -80,7 +88,7 @@ public:
smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.05;
bool smoothing_resample = true;
bool smoothing_resample = false;
//Smoothing using Simple Trans
@@ -115,6 +123,7 @@ public:
//Smoothing using Simple Trans
//bf->setEstimation( std::unique_ptr<K::ParticleFilterEstimationRegionalWeightedAverage<MyState>>(new K::ParticleFilterEstimationRegionalWeightedAverage<MyState>()));
//bf->setEstimation( std::unique_ptr<K::ParticleFilterEstimationOrderedWeightedAverage<MyState>>(new K::ParticleFilterEstimationOrderedWeightedAverage<MyState>(0.50f)));
bf->setEstimation(std::unique_ptr<K::ParticleFilterEstimationWeightedAverageWithAngle<MyState>>(new K::ParticleFilterEstimationWeightedAverageWithAngle<MyState>()));
if(smoothing_resample)
@@ -146,7 +155,7 @@ public:
smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.05;
bool smoothing_resample = true;
bool smoothing_resample = false;
//Smoothing using Dijkstra
@@ -175,14 +184,6 @@ public:
smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.05;
bool smoothing_resample = true;
//Smoothing using Simple Trans
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<MySmoothingTransitionExperimental>( new MySmoothingTransitionExperimental) );
}
void bergwerk_path1_nexus_simple() {
@@ -243,14 +244,6 @@ public:
smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.05;
bool smoothing_resample = true;
//Smoothing using Simple Trans
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<MySmoothingTransitionExperimental>( new MySmoothingTransitionExperimental) );
}
void bergwerk_path2_nexus_simple() {
@@ -312,14 +305,6 @@ public:
smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.05;
bool smoothing_resample = true;
//Smoothing using Simple Trans
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<MySmoothingTransitionExperimental>( new MySmoothingTransitionExperimental) );
}
void bergwerk_path3_nexus_simple() {
@@ -380,14 +365,6 @@ public:
smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.05;
bool smoothing_resample = true;
//Smoothing using Simple Trans
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<MySmoothingTransitionExperimental>( new MySmoothingTransitionExperimental) );
}
void bergwerk_path4_nexus_simple() {
@@ -449,14 +426,6 @@ public:
smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.15;
bool smoothing_resample = true;
//Smoothing using Simple Trans
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<MySmoothingTransitionExperimental>( new MySmoothingTransitionExperimental) );
}
void bergwerk_path1_galaxy_simple() {
@@ -500,14 +469,6 @@ public:
smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.15;
bool smoothing_resample = true;
//Smoothing using Simple Trans
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<MySmoothingTransitionExperimental>( new MySmoothingTransitionExperimental) );
}
void bergwerk_path2_galaxy_simple() {
@@ -552,14 +513,6 @@ public:
smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.15;
bool smoothing_resample = true;
//Smoothing using Simple Trans
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<MySmoothingTransitionExperimental>( new MySmoothingTransitionExperimental) );
}
void bergwerk_path3_galaxy_simple() {
@@ -605,14 +558,6 @@ public:
smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.15;
bool smoothing_resample = true;
//Smoothing using Simple Trans
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<MySmoothingTransitionExperimental>( new MySmoothingTransitionExperimental) );
}
void bergwerk_path4_galaxy_simple() {

View File

@@ -344,10 +344,10 @@ public:
//Point2 p2 = p1 + Angle::getPointer(obs.orientation.values[0]) * 0.05;
vis.gp << "set arrow 999 from screen " << p1.x<<","<<p1.y << " to screen " << p2.x<<","<<p2.y<<"\n";
vis.show();
//vis.show();
// prevent gnuplot errors
usleep(1000*33);
//usleep(1000*33);
}
@@ -423,10 +423,10 @@ public:
//Point2 p2 = p1 + Angle::getPointer(obs.orientation.values[0]) * 0.05;
vis.gp << "set arrow 999 from screen " << p1.x<<","<<p1.y << " to screen " << p2.x<<","<<p2.y<<"\n";
vis.show();
//vis.show();
// prevent gnuplot errors
usleep(1000*33);
//usleep(1000*33);
}
//statsout2.close();

View File

@@ -87,42 +87,42 @@ void testModelWalk() {
int main(void) {
{SmoothingEval1 eval;
eval.fixedIntervallSimpleTransPath4();
eval.run();}
// {SmoothingEval1 eval;
// eval.fixedIntervallSimpleTransPath4();
// eval.run();}
// for(int i = 0; i < 10; ++i){
for(int i = 0; i < 10; ++i){
// //nexus
// std::string name = "bergwerk_path1_nexus_simple_interval_" + std::to_string(i);
// {SmoothingEval1 eval; eval.bergwerk_path1_nexus_multi(name); eval.run();}
//nexus
std::string name = "bergwerk_path1_nexus_simple_interval_" + std::to_string(i);
{SmoothingEval1 eval; eval.bergwerk_path1_nexus_multi(name); eval.run();}
// name = "bergwerk_path2_nexus_simple_interval" + std::to_string(i);
// {SmoothingEval1 eval; eval.bergwerk_path2_nexus_multi(name); eval.run();}
name = "bergwerk_path2_nexus_simple_interval" + std::to_string(i);
{SmoothingEval1 eval; eval.bergwerk_path2_nexus_multi(name); eval.run();}
// name = "bergwerk_path3_nexus_simple_interval" + std::to_string(i);
// {SmoothingEval1 eval; eval.bergwerk_path3_nexus_multi(name); eval.run();}
name = "bergwerk_path3_nexus_simple_interval" + std::to_string(i);
{SmoothingEval1 eval; eval.bergwerk_path3_nexus_multi(name); eval.run();}
// name = "bergwerk_path4_nexus_simple_interval" + std::to_string(i);
// {SmoothingEval1 eval; eval.bergwerk_path4_nexus_multi(name); eval.run();}
name = "bergwerk_path4_nexus_simple_interval" + std::to_string(i);
{SmoothingEval1 eval; eval.bergwerk_path4_nexus_multi(name); eval.run();}
// //galaxy
// name = "bergwerk_path1_galaxy_simple_interval" + std::to_string(i);
// {SmoothingEval1 eval; eval.bergwerk_path1_galaxy_multi(name); eval.run();}
//galaxy
name = "bergwerk_path1_galaxy_simple_interval" + std::to_string(i);
{SmoothingEval1 eval; eval.bergwerk_path1_galaxy_multi(name); eval.run();}
// name = "bergwerk_path2_galaxy_simple_interval" + std::to_string(i);
// {SmoothingEval1 eval; eval.bergwerk_path2_galaxy_multi(name); eval.run();}
name = "bergwerk_path2_galaxy_simple_interval" + std::to_string(i);
{SmoothingEval1 eval; eval.bergwerk_path2_galaxy_multi(name); eval.run();}
// name = "bergwerk_path3_galaxy_simple_interval" + std::to_string(i);
// {SmoothingEval1 eval; eval.bergwerk_path3_galaxy_multi(name); eval.run();}
name = "bergwerk_path3_galaxy_simple_interval" + std::to_string(i);
{SmoothingEval1 eval; eval.bergwerk_path3_galaxy_multi(name); eval.run();}
// name = "bergwerk_path4_galaxy_simple_interval" + std::to_string(i);
// {SmoothingEval1 eval; eval.bergwerk_path4_galaxy_multi(name); eval.run();}
name = "bergwerk_path4_galaxy_simple_interval" + std::to_string(i);
{SmoothingEval1 eval; eval.bergwerk_path4_galaxy_multi(name); eval.run();}
// std::cout << "We are in loop number: " << i << "of " << 10 << std::endl;
// }
std::cout << "We are in loop number: " << i << "of " << 10 << std::endl;
}
return 0;