eval without path

This commit is contained in:
toni
2016-05-07 16:50:18 +02:00
parent 85905c80fe
commit 61685b4723
3 changed files with 56 additions and 50 deletions

View File

@@ -46,23 +46,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::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::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;
//Smoothing using Simple Trans
//bf->setEstimation(std::unique_ptr<K::ParticleFilterEstimationWeightedAverage<MyState>>(new K::ParticleFilterEstimationWeightedAverage<MyState>()));
bf->setEstimation(std::unique_ptr<K::ParticleFilterEstimationWeightedAverage<MyState>>(new K::ParticleFilterEstimationWeightedAverage<MyState>()));
//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::ParticleFilterEstimationOrderedWeightedAverage<MyState>>(new K::ParticleFilterEstimationOrderedWeightedAverage<MyState>(0.50f)));
if(smoothing_resample)
bf->setResampling( std::unique_ptr<K::ParticleFilterResamplingSimple<MyState>>(new K::ParticleFilterResamplingSimple<MyState>()) );
@@ -105,8 +105,14 @@ public:
srs = new SensorReaderStep("./measurements/bergwerk/path4/nexus/vor/Steps2.txt");
gtw = getGroundTruthWay(*sr, floors.gtwp, path4dbl);
MyGridNode& end = (MyGridNode&)grid.getNodeFor( conv(floors.gtwp[path4dbl.back()]) );
GridWalkPathControl<MyGridNode>* walk = new GridWalkPathControl<MyGridNode>(grid, DijkstraMapper(grid), end);
// MyGridNode& end = (MyGridNode&)grid.getNodeFor( conv(floors.gtwp[path4dbl.back()]) );
// GridWalkPathControl<MyGridNode>* walk = new GridWalkPathControl<MyGridNode>(grid, DijkstraMapper(grid), end);
// pf->setTransition( std::unique_ptr<MyTransition>( new MyTransition(grid, *walk)) );
for (auto& n : grid) {n.imp = 1;}
GridWalkSimpleControl<MyGridNode>* walk = new GridWalkSimpleControl<MyGridNode>();
pf->setTransition( std::unique_ptr<MyTransition>( new MyTransition(grid, *walk)) );
@@ -163,8 +169,8 @@ public:
smoothing_baro_sigma = 0.05;
}
void bergwerk_path1_nexus_simple() {
runName = "bergwerk_path1_nexus_simple_interval";
void bergwerk_path1_nexus_simple(std::string name) {
runName = name;
bergwerk_path1_nexus();
for (auto& n : grid) {n.imp = 1;}
@@ -223,9 +229,9 @@ public:
}
void bergwerk_path2_nexus_simple() {
void bergwerk_path2_nexus_simple(std::string name) {
runName = "bergwerk_path2_nexus_simple_interval";
runName = name;
bergwerk_path2_nexus();
for (auto& n : grid) {n.imp = 1;} // remove importance
@@ -284,9 +290,9 @@ public:
}
void bergwerk_path3_nexus_simple() {
void bergwerk_path3_nexus_simple(std::string name) {
runName = "bergwerk_path3_nexus_simple_interval";
runName = name;
bergwerk_path3_nexus();
for (auto& n : grid) {n.imp = 1;} // remove importance
@@ -344,9 +350,9 @@ public:
}
void bergwerk_path4_nexus_simple() {
void bergwerk_path4_nexus_simple(std::string name) {
runName = "bergwerk_path4_nexus_simple_interval";
runName = name;
bergwerk_path4_nexus();
for (auto& n : grid) {n.imp = 1;} // remove importance
@@ -405,8 +411,8 @@ public:
}
void bergwerk_path1_galaxy_simple() {
runName = "bergwerk_path1_galaxy_simple_interval";
void bergwerk_path1_galaxy_simple(std::string name) {
runName = name;
bergwerk_path1_galaxy();
for (auto& n : grid) {n.imp = 1;} // remove importance
GridWalkSimpleControl<MyGridNode>* walk = new GridWalkSimpleControl<MyGridNode>();
@@ -448,8 +454,8 @@ public:
}
void bergwerk_path2_galaxy_simple() {
runName = "bergwerk_path2_galaxy_simple_interval";
void bergwerk_path2_galaxy_simple(std::string name) {
runName = name;
bergwerk_path2_galaxy();
for (auto& n : grid) {n.imp = 1;} // remove importance
GridWalkSimpleControl<MyGridNode>* walk = new GridWalkSimpleControl<MyGridNode>();
@@ -492,8 +498,8 @@ public:
}
void bergwerk_path3_galaxy_simple() {
runName = "bergwerk_path3_galaxy_simple_interval";
void bergwerk_path3_galaxy_simple(std::string name) {
runName = name;
bergwerk_path3_galaxy();
for (auto& n : grid) {n.imp = 1;} // remove importance
GridWalkSimpleControl<MyGridNode>* walk = new GridWalkSimpleControl<MyGridNode>();
@@ -536,8 +542,8 @@ public:
smoothing_baro_sigma = 0.15;
}
void bergwerk_path4_galaxy_simple() {
runName = "bergwerk_path4_galaxy_simple_interval";
void bergwerk_path4_galaxy_simple(std::string name) {
runName = name;
bergwerk_path4_galaxy();
for (auto& n : grid) {n.imp = 1;} // remove importance
GridWalkSimpleControl<MyGridNode>* walk = new GridWalkSimpleControl<MyGridNode>();