#ifndef EVAL_H #define EVAL_H #include "EvalBase.h" #include "../DijkstraMapper.h" #include #include #include #include #include #include #include #include class Eval : public EvalBase { public: Eval() { pf = new K::ParticleFilter( MiscSettings::numParticles, std::unique_ptr(new MyInitializer(grid, 1120, 150, 3*350, 90)) ); MyGridNode& start = (MyGridNode&)grid.getNodeFor(GridPoint(500,300,floors.h0.cm())); MyGridNode& end = (MyGridNode&)grid.getNodeFor(GridPoint(7000,5000,floors.h3.cm())); //GridWalkLightAtTheEndOfTheTunnel* walk = new GridWalkLightAtTheEndOfTheTunnel(grid, DijkstraMapper(grid), end); //GridWalkRandomHeadingUpdate* walk = new GridWalkRandomHeadingUpdate(); GridWalkRandomHeadingUpdateAdv* walk = new GridWalkRandomHeadingUpdateAdv(); //GridWalkPushForward* walk = new GridWalkPushForward(); pf->setTransition( std::unique_ptr( new MyTransition(grid, *walk)) ); sr = new SensorReader("./measurements/13/Galaxy/Path2/1433588396094.csv"); srt = new SensorReaderTurn("./measurements/13/Galaxy/Path2/Turns.txt"); srs = new SensorReaderStep("./measurements/13/Galaxy/Path2/Steps2.txt"); gtw = getGroundTruthWay(*sr, floors.gtwp, way2); } void setEval1() { runName = "TODO"; // the particle filter's evaluation method std::unique_ptr eval = std::unique_ptr( new MyEvaluation() ); eval.get()->setUsage(true, false, false, true, true); pf->setEvaluation( std::move(eval) ); // resampling step? pf->setNEffThreshold(1.0); pf->setResampling( std::unique_ptr>(new K::ParticleFilterResamplingSimple()) ); // state estimation step pf->setEstimation( std::unique_ptr>(new K::ParticleFilterEstimationWeightedAverage())); //pf->setEstimation( std::unique_ptr>(new K::ParticleFilterEstimationRegionalWeightedAverage())); } }; #endif // EVAL_H