Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BFL::EKParticleFilter Class Reference

Particle filter using EKF for proposal step. More...

#include <EKparticlefilter.h>

Inheritance diagram for BFL::EKParticleFilter:
Inheritance graph
[legend]

Public Member Functions

 EKParticleFilter (MCPdf< ColumnVector > *prior, int resampleperiod=0, double resamplethreshold=0, int resamplescheme=DEFAULT_RS)
 Constructor. More...
 
virtual ~EKParticleFilter ()
 Destructor. More...
 
- Public Member Functions inherited from BFL::ParticleFilter< ColumnVector, ColumnVector >
 ParticleFilter (MCPdf< ColumnVector > *prior, ConditionalPdf< ColumnVector, ColumnVector > *proposal, int resampleperiod=0, double resamplethreshold=0, int resamplescheme=DEFAULT_RS)
 Constructor. More...
 
 ParticleFilter (MCPdf< ColumnVector > *prior, MCPdf< ColumnVector > *post, ConditionalPdf< ColumnVector, ColumnVector > *proposal, int resampleperiod=0, double resamplethreshold=0, int resamplescheme=DEFAULT_RS)
 Constructor. More...
 
 ParticleFilter (const ParticleFilter< ColumnVector, ColumnVector > &filt)
 Copy Constructor. More...
 
virtual MCPdf< ColumnVector > * PostGet ()
 Get Posterior density. More...
 
ConditionalPdf< ColumnVector, ColumnVector > * ProposalGet ()
 Get a pointer to the proposal density. More...
 
virtual void ProposalSet (ConditionalPdf< ColumnVector, ColumnVector > *const cpdf)
 Set the proposal density. More...
 
virtual ~ParticleFilter ()
 Destructor. More...
 
- Public Member Functions inherited from BFL::Filter< ColumnVector, ColumnVector >
 Filter (Pdf< ColumnVector > *prior)
 Constructor. More...
 
 Filter (const Filter< ColumnVector, ColumnVector > &filt)
 copy constructor More...
 
virtual void Reset (Pdf< ColumnVector > *prior)
 Reset Filter. More...
 
int TimeStepGet () const
 Get current time. More...
 
virtual bool Update (SystemModel< ColumnVector > *const sysmodel, const ColumnVector &u, MeasurementModel< ColumnVector, ColumnVector > *const measmodel, const ColumnVector &z, const ColumnVector &s)
 Full Update (system with inputs/sensing params) More...
 
virtual bool Update (SystemModel< ColumnVector > *const sysmodel, MeasurementModel< ColumnVector, ColumnVector > *const measmodel, const ColumnVector &z, const ColumnVector &s)
 Full Update (system without inputs, with sensing params) More...
 
virtual bool Update (SystemModel< ColumnVector > *const sysmodel, MeasurementModel< ColumnVector, ColumnVector > *const measmodel, const ColumnVector &z)
 Full Update (system without inputs/sensing params) More...
 
virtual bool Update (SystemModel< ColumnVector > *const sysmodel, const ColumnVector &u, MeasurementModel< ColumnVector, ColumnVector > *const measmodel, const ColumnVector &z)
 Full Update (system with inputs, without sensing params) More...
 
virtual bool Update (SystemModel< ColumnVector > *const sysmodel, const ColumnVector &u)
 System Update (system with inputs) More...
 
virtual bool Update (SystemModel< ColumnVector > *const sysmodel)
 System Update (system without inputs) More...
 
virtual bool Update (MeasurementModel< ColumnVector, ColumnVector > *const measmodel, const ColumnVector &z, const ColumnVector &s)
 Measurement Update (system with "sensing params") More...
 
virtual bool Update (MeasurementModel< ColumnVector, ColumnVector > *const measmodel, const ColumnVector &z)
 Measurement Update (system without "sensing params") More...
 
virtual ~Filter ()
 destructor More...
 

Protected Member Functions

virtual bool ProposalStepInternal (SystemModel< ColumnVector > *const sysmodel, const ColumnVector &u, MeasurementModel< ColumnVector, ColumnVector > *const measmodel, const ColumnVector &z, const ColumnVector &s)
 
virtual bool Resample ()
 Resample also redefined for the same reasons... More...
 
virtual bool UpdateInternal (SystemModel< ColumnVector > *const sysmodel, const ColumnVector &u, MeasurementModel< ColumnVector, ColumnVector > *const measmodel, const ColumnVector &z, const ColumnVector &s)
 Actual implementation of Update, varies along filters. More...
 
- Protected Member Functions inherited from BFL::ParticleFilter< ColumnVector, ColumnVector >
virtual bool DynamicResampleStep ()
 Resample if necessary. More...
 
virtual bool StaticResampleStep ()
 Resample if wanted. More...
 
virtual bool UpdateWeightsInternal (SystemModel< ColumnVector > *const sysmodel, const ColumnVector &u, MeasurementModel< ColumnVector, ColumnVector > *const measmodel, const ColumnVector &z, const ColumnVector &s)
 Update Weights. More...
 

Protected Attributes

std::vector< SymmetricMatrix >::iterator _cov_it
 
std::vector< double > _CumPDF
 
std::vector< double >::const_iterator _CumPDFit
 
const int _dimension
 
const int _num_samples
 
std::vector< WeightedSample< ColumnVector > >::iterator _oit
 
std::vector< WeightedSample< ColumnVector > > _old_samples
 
std::vector< WeightedSample< ColumnVector > > _result_samples
 
std::vector< WeightedSample< ColumnVector > >::iterator _rit
 
Sample< ColumnVector > _sample
 
std::vector< SymmetricMatrix > _sampleCov
 Sample Covariances for use with EKF Proposal density. More...
 
std::vector< SymmetricMatrix > _tmpCov
 
std::vector< SymmetricMatrix >::iterator _tmpCovit
 
std::vector< double > _unif_samples
 
ColumnVector _x_old
 
- Protected Attributes inherited from BFL::ParticleFilter< ColumnVector, ColumnVector >
bool _created_post
 created own post More...
 
bool _dynamicResampling
 Dynamic resampling or fixed period resampling? More...
 
vector< WeightedSample< ColumnVector > > _new_samples
 While updating store list of new samples. More...
 
vector< Sample< ColumnVector > > _new_samples_unweighted
 While resampling. More...
 
vector< WeightedSample< ColumnVector > >::iterator _ns_it
 Iterator for new list of samples. More...
 
vector< WeightedSample< ColumnVector > > _old_samples
 While updating store list of old samples. More...
 
vector< WeightedSample< ColumnVector > >::iterator _os_it
 Iterator for old list of samples. More...
 
ConditionalPdf< ColumnVector, ColumnVector > * _proposal
 Pointer to the Proposal Density. More...
 
bool _proposal_depends_on_meas
 Proposal depends on last measurement? More...
 
int _resamplePeriod
 Number of timestep between resampling from the Posterior Pdf. More...
 
int _resampleScheme
 Which resample algorithm (see top of particle.h for #defines) More...
 
double _resampleThreshold
 Threshold used when dynamic resampling. More...
 
WeightedSample< ColumnVector > _sample
 While updating use sample<StateVar> More...
 
- Protected Attributes inherited from BFL::Filter< ColumnVector, ColumnVector >
Pdf< ColumnVector > * _post
 Pointer to the Posterior Pdf. More...
 
Pdf< ColumnVector > * _prior
 prior Pdf More...
 
int _timestep
 Represents the current timestep of the filter. More...
 

Detailed Description

Particle filter using EKF for proposal step.

NOTE: Only applicable to continuous problems with additive gaussian noise, so the models you specify ... specify should by

Definition at line 35 of file EKparticlefilter.h.

Constructor & Destructor Documentation

BFL::EKParticleFilter::EKParticleFilter ( MCPdf< ColumnVector > *  prior,
int  resampleperiod = 0,
double  resamplethreshold = 0,
int  resamplescheme = DEFAULT_RS 
)

Constructor.

Precondition
you created the necessary models and the prior
Parameters
priorpointer to the Monte Carlo Pdf prior density
resampleperiodfixed resampling period (if desired)
resamplethresholdthreshold used when dynamic resampling
resampleschemeresampling scheme, see header file for different defines and their meaning
Bug:
prior should be of type pdf and not mcpdf. See also notes with implementation

Definition at line 26 of file EKparticlefilter.cpp.

BFL::EKParticleFilter::~EKParticleFilter ( )
virtual

Destructor.

Definition at line 50 of file EKparticlefilter.cpp.

Member Function Documentation

bool BFL::EKParticleFilter::ProposalStepInternal ( SystemModel< ColumnVector > *const  sysmodel,
const ColumnVector &  u,
MeasurementModel< ColumnVector, ColumnVector > *const  measmodel,
const ColumnVector &  z,
const ColumnVector &  s 
)
protectedvirtual

Proposalstep is redefined here since we have to take into account the sample covariances here!

Reimplemented from BFL::ParticleFilter< ColumnVector, ColumnVector >.

Definition at line 117 of file EKparticlefilter.cpp.

bool BFL::EKParticleFilter::Resample ( )
protectedvirtual

Resample also redefined for the same reasons...

Reimplemented from BFL::ParticleFilter< ColumnVector, ColumnVector >.

Definition at line 76 of file EKparticlefilter.cpp.

bool BFL::EKParticleFilter::UpdateInternal ( SystemModel< ColumnVector > *const  sysmodel,
const ColumnVector &  u,
MeasurementModel< ColumnVector, ColumnVector > *const  measmodel,
const ColumnVector &  z,
const ColumnVector &  s 
)
protectedvirtual

Actual implementation of Update, varies along filters.

Parameters
sysmodelpointer to the used system model
uinput param for proposal density
measmodelpointer to the used measurementmodel
zmeasurement param for proposal density
ssensor param for proposal density

Reimplemented from BFL::ParticleFilter< ColumnVector, ColumnVector >.

Definition at line 57 of file EKparticlefilter.cpp.

Member Data Documentation

std::vector<SymmetricMatrix>::iterator BFL::EKParticleFilter::_cov_it
protected

Definition at line 41 of file EKparticlefilter.h.

std::vector<double> BFL::EKParticleFilter::_CumPDF
protected

Definition at line 54 of file EKparticlefilter.h.

std::vector<double>::const_iterator BFL::EKParticleFilter::_CumPDFit
protected

Definition at line 55 of file EKparticlefilter.h.

const int BFL::EKParticleFilter::_dimension
protected

Definition at line 47 of file EKparticlefilter.h.

const int BFL::EKParticleFilter::_num_samples
protected

Definition at line 48 of file EKparticlefilter.h.

std::vector<WeightedSample<ColumnVector> >::iterator BFL::EKParticleFilter::_oit
protected

Definition at line 50 of file EKparticlefilter.h.

std::vector<WeightedSample<ColumnVector> > BFL::EKParticleFilter::_old_samples
protected

Definition at line 49 of file EKparticlefilter.h.

std::vector<WeightedSample<ColumnVector> > BFL::EKParticleFilter::_result_samples
protected

Definition at line 51 of file EKparticlefilter.h.

std::vector<WeightedSample<ColumnVector> >::iterator BFL::EKParticleFilter::_rit
protected

Definition at line 52 of file EKparticlefilter.h.

Sample<ColumnVector> BFL::EKParticleFilter::_sample
protected

Definition at line 57 of file EKparticlefilter.h.

std::vector<SymmetricMatrix> BFL::EKParticleFilter::_sampleCov
protected

Sample Covariances for use with EKF Proposal density.

Definition at line 40 of file EKparticlefilter.h.

std::vector<SymmetricMatrix> BFL::EKParticleFilter::_tmpCov
protected

Definition at line 43 of file EKparticlefilter.h.

std::vector<SymmetricMatrix>::iterator BFL::EKParticleFilter::_tmpCovit
protected

Definition at line 44 of file EKparticlefilter.h.

std::vector<double> BFL::EKParticleFilter::_unif_samples
protected

Definition at line 53 of file EKparticlefilter.h.

ColumnVector BFL::EKParticleFilter::_x_old
protected

Definition at line 56 of file EKparticlefilter.h.


The documentation for this class was generated from the following files:


bfl
Author(s): Klaas Gadeyne, Wim Meeussen, Tinne Delaet and many others. See web page for a full contributor list. ROS package maintained by Wim Meeussen.
autogenerated on Mon Jun 10 2019 12:48:01