evaluation stand

This commit is contained in:
toni
2016-05-04 10:32:28 +02:00
parent ce1a1b4d99
commit e3d7e83159
9 changed files with 66 additions and 62 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.6.0, 2016-05-03T09:50:19. -->
<!-- Written by QtCreator 3.6.0, 2016-05-04T09:06:07. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

View File

@@ -17,9 +17,9 @@ namespace MiscSettings {
const int timeSteps = 500;
const int numParticles = 2500;
const int numParticles = 50;
const int numBSParticles = 500;
const int numBSParticles = 25;
const int lag = 5;

View File

@@ -330,8 +330,8 @@ public:
statsDistFiltering.add(errDist);
errorsNorm.push_back(err);
errorsDistNorm.push_back(errDist);
std::cout << "FilteringTime: " << se.ts << " " << statsFiltering.asString() << std::endl;
std::cout << "FilteringDist: " << se.ts << " " << statsDistFiltering.asString() << std::endl;
//std::cout << "FilteringTime: " << se.ts << " " << statsFiltering.asString() << std::endl;
//std::cout << "FilteringDist: " << se.ts << " " << statsDistFiltering.asString() << std::endl;
}
if(cnt > skip){
@@ -377,8 +377,8 @@ public:
errorsSmooth.push_back(errSmoothed);
errorsDistSmooth.push_back(errDistSmoothed);
std::cout << "SmoothingTime: " << tsHistory[(tsHistory.size() - 1) - MiscSettings::lag] << " " << statsSmoothing.asString() << std::endl;
std::cout << "SmoothingDist: " << tsHistory[(tsHistory.size() - 1) - MiscSettings::lag] << " " << statsDistSmoothing.asString() << std::endl;
//std::cout << "SmoothingTime: " << tsHistory[(tsHistory.size() - 1) - MiscSettings::lag] << " " << statsSmoothing.asString() << std::endl;
//std::cout << "SmoothingDist: " << tsHistory[(tsHistory.size() - 1) - MiscSettings::lag] << " " << statsDistSmoothing.asString() << std::endl;
//plot
vis.clearStates();
@@ -420,10 +420,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);
}
}
@@ -487,7 +487,9 @@ public:
vis.gp << "set arrow 999 from screen " << p1.x<<","<<p1.y << " to screen " << p2.x<<","<<p2.y<<"\n";
vis.show();
vis.show();
vis.show();
vis.show();
// prevent gnuplot errors
usleep(1000*33);

View File

@@ -47,7 +47,7 @@ public:
// 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::ParticleFilterEstimationOrderedWeightedAverage<MyState>>(new K::ParticleFilterEstimationOrderedWeightedAverage<MyState>(0.50f)));
//create the backward smoothing filter
@@ -80,7 +80,7 @@ public:
smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.05;
bool smoothing_resample = false;
bool smoothing_resample = true;
//Smoothing using Simple Trans
@@ -115,6 +115,7 @@ public:
//Smoothing using Simple Trans
//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)
bf->setResampling( std::unique_ptr<K::ParticleFilterResamplingSimple<MyState>>(new K::ParticleFilterResamplingSimple<MyState>()) );
@@ -145,7 +146,7 @@ public:
smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.05;
bool smoothing_resample = false;
bool smoothing_resample = true;
//Smoothing using Dijkstra
@@ -174,7 +175,7 @@ public:
smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.05;
bool smoothing_resample = false;
bool smoothing_resample = true;
//Smoothing using Simple Trans
@@ -242,7 +243,7 @@ public:
smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.05;
bool smoothing_resample = false;
bool smoothing_resample = true;
//Smoothing using Simple Trans
@@ -311,7 +312,7 @@ public:
smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.05;
bool smoothing_resample = false;
bool smoothing_resample = true;
//Smoothing using Simple Trans
@@ -379,7 +380,7 @@ public:
smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.05;
bool smoothing_resample = false;
bool smoothing_resample = true;
//Smoothing using Simple Trans
@@ -448,7 +449,7 @@ public:
smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.15;
bool smoothing_resample = false;
bool smoothing_resample = true;
//Smoothing using Simple Trans
@@ -499,7 +500,7 @@ public:
smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.15;
bool smoothing_resample = false;
bool smoothing_resample = true;
//Smoothing using Simple Trans
@@ -551,7 +552,7 @@ public:
smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.15;
bool smoothing_resample = false;
bool smoothing_resample = true;
//Smoothing using Simple Trans
@@ -604,7 +605,7 @@ public:
smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.15;
bool smoothing_resample = false;
bool smoothing_resample = true;
//Smoothing using Simple Trans

View File

@@ -313,8 +313,8 @@ public:
statsDistFiltering.add(errDist);
errorsNorm.push_back(err);
errorsDistNorm.push_back(errDist);
std::cout << "FilteringTime: " << se.ts << " " << statsFiltering.asString() << std::endl;
std::cout << "FilteringDist: " << se.ts << " " << statsDistFiltering.asString() << std::endl;
//std::cout << "FilteringTime: " << se.ts << " " << statsFiltering.asString() << std::endl;
//std::cout << "FilteringDist: " << se.ts << " " << statsDistFiltering.asString() << std::endl;
//save the current estimation for later smoothing.
pfHistory.push_back(pf->getNonResamplingParticles());
@@ -395,8 +395,8 @@ public:
errorsSmooth.push_back(errSmoothed);
errorsDistSmooth.push_back(errDistSmoothed);
std::cout << "SmoothingTime: " << tsHistory[(tsHistory.size() - 1) - MiscSettings::lag] << " " << statsSmoothing.asString() << std::endl;
std::cout << "SmoothingDist: " << tsHistory[(tsHistory.size() - 1) - MiscSettings::lag] << " " << statsDistSmoothing.asString() << std::endl;
//std::cout << "SmoothingTime: " << tsHistory[t] << " " << statsSmoothing.asString() << std::endl;
//std::cout << "SmoothingDist: " << tsHistory[t] << " " << statsDistSmoothing.asString() << std::endl;
// plot
@@ -486,6 +486,9 @@ 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();
vis.show();
vis.show();
// prevent gnuplot errors

View File

@@ -87,40 +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;
// }
return 0;