Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

PFPMRandomWalk.h

Go to the documentation of this file.
00001 /* Copyright (C) 2005 Pierre Moisan (Pierre.Moisan@USherbrooke.ca) 
00002 
00003    This library is free software; you can redistribute it and/or
00004    modify it under the terms of the GNU Lesser General Public
00005    License as published by the Free Software Foundation; either
00006    version 2.1 of the License, or (at your option) any later version.
00007    
00008    This library is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011    Lesser General Public License for more details.
00012    
00013    You should have received a copy of the GNU Lesser General Public
00014    License along with this library; if not, write to the Free Software
00015    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00016 */
00017 
00018 #ifndef _PFPMRANDOMWALK_H_
00019 #define _PFPMRANDOMWALK_H_
00020 
00021 #include "PFPredictionModel.h"
00022 #include "PFGenericParticle.h"
00023 #include "PFUtilityFct.h"
00024 #include "Vector.h"
00025 
00026 namespace RobotFlow {
00027 //
00028 // Random walk prediction model for particle filters
00029 //
00030 class PFPMRandomWalk : public PFPredictionModel
00031 {
00032 public:
00033         PFPMRandomWalk();
00034         
00035         PFPMRandomWalk(int i_stateSize, const FD::Vector<float> *i_variance);
00036         
00037         PFPMRandomWalk(std::string nodeName, FD::ParameterSet params);
00038 
00039         virtual ~PFPMRandomWalk();
00040         
00041         virtual void calculate(int output_id, int count, FD::Buffer &out);
00042         
00043         virtual void Predict(PFParticle *io_sample);
00044         
00045         void Initialize(const FD::Vector<float> *i_variance);
00046         
00047 private:
00048         // BufferedNode inputs
00049         int m_varianceInID;
00050         int m_particleInID;
00051         
00052         // BufferedNode outputs
00053         int m_completedOutID;
00054         
00055         bool m_init;
00056         unsigned int m_stateSize;
00057         FD::Vector<float> *m_noiseVariance;
00058 };
00059 
00060 }
00061 
00062 #endif

Generated on Wed Oct 5 14:36:12 2005 for RobotFlow by  doxygen 1.4.4