PaFilBFLAbsRel.h

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00002 //
00003 // $Id$
00004 //
00005 // Copyright 2008, 2009, 2010, 2011, 2012  Antonio Franchi and Paolo Stegagno    
00006 //
00007 // This file is part of MIP.
00008 //
00009 // MIP is free software: you can redistribute it and/or modify
00010 // it under the terms of the GNU General Public License as published by
00011 // the Free Software Foundation, either version 3 of the License, or
00012 // (at your option) any later version.
00013 //
00014 // MIP is distributed in the hope that it will be useful,
00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 // GNU General Public License for more details.
00018 //
00019 // You should have received a copy of the GNU General Public License
00020 // along with MIP. If not, see <http://www.gnu.org/licenses/>.
00021 //
00022 // Contact info: antonio.franchi@tuebingen.mpg.de stegagno@diag.uniroma1.it
00023 //
00024 // ----------------------------------------------------------------------------
00025 
00026 
00030 
00032 /* @{ */
00033 
00034 #ifndef __PA_FIL_BFL_AR_H_
00035 #define __PA_FIL_BFL_AR_H_
00036 
00037 #include <filter/bootstrapfilter.h>
00038 
00039 #include <model/systemmodel.h>
00040 #include <model/measurementmodel.h>
00041 
00042 
00043 #include <iostream>
00044 #include <fstream>
00045 
00046 #include <pdf/conditionalpdf.h>
00047 #include <pdf/gaussian.h>
00048 
00049 #include "PaFilBFL.h"
00050 
00051 using namespace MatrixWrapper;
00052 using namespace BFL;
00053 using namespace std;
00054 
00055 
00056 namespace MipAlgorithms {
00058  class NonlinearMobileRobAbsRelPdf : public ConditionalPdf<MatrixWrapper::ColumnVector, MatrixWrapper::ColumnVector> {
00059   public:
00062    NonlinearMobileRobAbsRelPdf( const Gaussian& additiveNoise);
00063    
00065    virtual ~NonlinearMobileRobAbsRelPdf();
00066    
00067    // implement this virtual function for system model of a particle filter
00068    virtual bool SampleFrom (Sample<MatrixWrapper::ColumnVector>& one_sample, int method=DEFAULT, void * args=NULL) const;
00069   
00070   private:
00071    Gaussian _additiveNoise;
00072  };
00073 }
00074 
00075 namespace MipAlgorithms {
00077  class NonlinearMeasurementAbsRelPdf : public ConditionalPdf<MatrixWrapper::ColumnVector, MatrixWrapper::ColumnVector> {
00078   public:
00081    NonlinearMeasurementAbsRelPdf( const Gaussian& measNoise);
00082    
00084    virtual ~NonlinearMeasurementAbsRelPdf();
00085    
00086    // implement this virtual function for measurement model of a particle filter
00087    virtual Probability ProbabilityGet(const MatrixWrapper::ColumnVector& measurement) const;
00088   
00089   private:
00090    Gaussian _measNoise;
00091  };
00092 }
00093 
00094 
00095 namespace MipAlgorithms {
00099  class PaFilBFLAbsRel : public PaFilBFL{
00100   public:
00101    
00103    PaFilBFLAbsRel(PaFilBFLPar par);
00104    
00106    ~PaFilBFLAbsRel();
00107    
00110    void step(MutLocFilInput &input);
00111    
00113    void reset();
00114    
00116    string print();
00117    
00118   private:
00119    
00120    NonlinearMobileRobAbsRelPdf*     _sys_pdf;
00121    SystemModel<ColumnVector>* _sys_model;
00122    
00123    NonlinearMeasurementAbsRelPdf*           _meas_pdf;
00124    MeasurementModel<ColumnVector, ColumnVector>* _meas_model;
00125    
00126    Pose _hisPrevConf;
00127    Pose _hisCurrConf;
00128    Pose _hisOdometry;
00129    
00130    Decimal _hisOdometryNorm;
00131    
00132    void _normalStep(MutLocFilInput &input);
00133    
00134    void _firstStep(MutLocFilInput &input);
00135    
00136    void _computeHisOdometry(MutLocFilInput &input);
00137    
00138  };
00139 }
00140 #endif
00141 
00142 
00143 
00144 
00145 
00146 

Generated on Mon Feb 20 07:01:06 2017 for MIP by  doxygen 1.5.6