#ifndef SMOOTHINGEVAL1_H #define SMOOTHINGEVAL1_H #include "SmoothingEvalBase.h" #include "../DijkstraMapper.h" #include #include #include #include #include #include #include #include "DebugShortestPath.h" #include #include #include #include #include class SmoothingEval1 : public SmoothingEvalBase { public: SmoothingEval1() { int initX = 1120; int initY = 150; int initZ = 3*350; int initHeading = 90; // create the particle filterp.state.x_cm = 1120; pf = new K::ParticleFilterHistory( MiscSettings::numParticles, std::unique_ptr(new MyInitializer(grid, initX, initY, initZ, initHeading))); std::unique_ptr eval = std::unique_ptr( new MyEvaluation() ); eval.get()->setUsage(true, true, true, true, true); pf->setEvaluation( std::move(eval) ); // resampling step? pf->setNEffThreshold(1.0); pf->setResampling( std::unique_ptr>(new K::ParticleFilterResamplingSimple()) ); //pf->setResampling( std::unique_ptr>(new K::ParticleFilterResamplingPercent(0.10)) ); // state estimation step pf->setEstimation( std::unique_ptr>(new K::ParticleFilterEstimationWeightedAverage())); //pf->setEstimation( std::unique_ptr>(new K::ParticleFilterEstimationRegionalWeightedAverage())); //pf->setEstimation( std::unique_ptr>(new K::ParticleFilterEstimationOrderedWeightedAverage(0.50f))); //create the backward smoothing filter bf = new K::BackwardSimulation(500); } void fixedIntervallSimpleTrans() { runName = "fixedIntervallSimpleTrans"; bool smoothing_resample = false; smoothing_time_delay = 1; BarometerEvaluation::barometerSigma = 0.105; sr = new SensorReader("./measurements/bergwerk/path1/nexus/vor/1454775984079.csv"); // forward srt = new SensorReaderTurn("./measurements/bergwerk/path1/nexus/vor/Turns.txt"); srs = new SensorReaderStep("./measurements/bergwerk/path1/nexus/vor/Steps2.txt"); gtw = getGroundTruthWay(*sr, floors.gtwp, path1dbl); GridWalkSimpleControl* walk = new GridWalkSimpleControl(); pf->setTransition( std::unique_ptr( new MyTransition(grid, *walk)) ); //Smoothing using Simple Trans bf->setEstimation(std::unique_ptr>(new K::ParticleFilterEstimationWeightedAverage())); if(smoothing_resample) bf->setResampling( std::unique_ptr>(new K::ParticleFilterResamplingSimple()) ); bf->setTransition(std::unique_ptr( new MySmoothingTransition(&grid)) ); } }; #endif // EVAL1_H