MRPT logo

mrpt::bayes::CParticleFilter Class Reference

This class acts as a common interface to the different interfaces (see CParticleFilter::TParticleFilterAlgorithm) any bayes::CParticleFilterCapable class can implement: it is the invoker of particle filter algorithms. More...

#include <mrpt/bayes/CParticleFilter.h>

Inheritance diagram for mrpt::bayes::CParticleFilter:

mrpt::utils::CDebugOutputCapable

List of all members.

Classes

struct  TParticleFilterOptions
 The configuration of a particle filter. More...
struct  TParticleFilterStats
 Statistics for being returned from the "execute" method. More...

Public Types

enum  TParticleFilterAlgorithm { pfStandardProposal = 0, pfAuxiliaryPFStandard, pfOptimalProposal, pfAuxiliaryPFOptimal }
 Defines different types of particle filter algorithms. More...
enum  TParticleResamplingAlgorithm { prMultinomial = 0, prResidual, prStratified, prSystematic }
 Defines the different resampling algorithms. More...

Public Member Functions

 CParticleFilter (CParticleFilterCapable *obj, const TParticleFilterOptions &opts)
 Constructor with a PDF object.
 CParticleFilter ()
 Default constructor.
 CParticleFilter (const CParticleFilter &o)
CParticleFilteroperator= (const CParticleFilter &o)
 ~CParticleFilter ()
MRPT_DEPRECATED_PRE void execute (const mrpt::slam::CActionCollection *action, const mrpt::slam::CSensoryFrame *observation, TParticleFilterStats *stats=NULL) MRPT_DEPRECATED_POST
 Executes a complete prediction + update step of the selected particle filtering algorithm.
void executeOn (CParticleFilterCapable &obj, const mrpt::slam::CActionCollection *action, const mrpt::slam::CSensoryFrame *observation, TParticleFilterStats *stats=NULL)
 Executes a complete prediction + update step of the selected particle filtering algorithm.

Public Attributes

CParticleFilter::TParticleFilterOptions m_options
 The options to be used in the PF, must be set before executing any step of the particle filter.

Protected Attributes

CParticleFilterCapablem_obj
 The PDF object to run the filter on.


Detailed Description

This class acts as a common interface to the different interfaces (see CParticleFilter::TParticleFilterAlgorithm) any bayes::CParticleFilterCapable class can implement: it is the invoker of particle filter algorithms.

The particle filter is executed on a probability density function (PDF) described by a CParticleFilterCapable object, passed in the constructor or alternatively through the CParticleFilter::executeOn method.

For a complete example and further details, see the Particle Filter tutorial.

The basic SIR algorithm (pfStandardProposal) consists of:

See also:
mrpt::poses::CPoseParticlesPDF

Definition at line 63 of file CParticleFilter.h.


Member Enumeration Documentation

Defines different types of particle filter algorithms.

The defined SIR implementations are:

  • pfStandardProposal: Standard proposal distribution + weights according to likelihood function.
  • pfAuxiliaryPFStandard: An auxiliary PF using the standard proposal distribution.
  • pfOptimalProposal: Use the optimal proposal distribution (where available!, usually this will perform approximations)
  • pfAuxiliaryPFOptimal: Use the optimal proposal and a auxiliary particle filter (see paper).

See the theoretical discussion in resampling schemes.

Enumerator:
pfStandardProposal 
pfAuxiliaryPFStandard 
pfOptimalProposal 
pfAuxiliaryPFOptimal 

Definition at line 76 of file CParticleFilter.h.

Defines the different resampling algorithms.

The implemented resampling methods are:

  • prMultinomial (Default): Uses standard select with replacement (draws M random uniform numbers)
  • prResidual: The residual or "remainder" method.
  • prStratified: The stratified resampling, where a uniform sample is drawn for each of M subdivisions of the range (0,1].
  • prSystematic: A single uniform sample is drawn in the range (0,1/M].

See the theoretical discussion in resampling schemes.

Enumerator:
prMultinomial 
prResidual 
prStratified 
prSystematic 

Definition at line 93 of file CParticleFilter.h.


Constructor & Destructor Documentation

mrpt::bayes::CParticleFilter::CParticleFilter ( CParticleFilterCapable obj,
const TParticleFilterOptions opts 
)

Constructor with a PDF object.

Parameters:
obj An existing object representing a set of particles describing PDF.
opts The configuration of the particle filter.
See also:
CParticleFilterCapable
Deprecated:
{This constructor is deprecated, use the default constructor instead, then CParticleFilter::executeOn.}

mrpt::bayes::CParticleFilter::CParticleFilter (  ) 

Default constructor.

After creating the PF object, set the options in CParticleFilter::m_options, then execute steps through CParticleFilter::executeOn.

mrpt::bayes::CParticleFilter::CParticleFilter ( const CParticleFilter o  )  [inline]

Definition at line 177 of file CParticleFilter.h.

mrpt::bayes::CParticleFilter::~CParticleFilter (  )  [inline]

Definition at line 186 of file CParticleFilter.h.


Member Function Documentation

MRPT_DEPRECATED_PRE void mrpt::bayes::CParticleFilter::execute ( const mrpt::slam::CActionCollection action,
const mrpt::slam::CSensoryFrame observation,
TParticleFilterStats stats = NULL 
)

Executes a complete prediction + update step of the selected particle filtering algorithm.

This method must be used only if a pointer to the PDF was passed in the contructor. The executeOn method is preferred since does not imply storing any pointer so it's safer.

Parameters:
action A pointer to an action in the form of a CActionCollection, or NULL if there is no action.
observation A pointer to observations in the form of a CSensoryFrame, or NULL if there is no observation.
stats An output structure for gathering statistics of the particle filter execution, or set to NULL if you do not need it (see CParticleFilter::TParticleFilterStats).
See also:
CParticleFilterCapable, executeOn

void mrpt::bayes::CParticleFilter::executeOn ( CParticleFilterCapable obj,
const mrpt::slam::CActionCollection action,
const mrpt::slam::CSensoryFrame observation,
TParticleFilterStats stats = NULL 
)

Executes a complete prediction + update step of the selected particle filtering algorithm.

The member CParticleFilter::m_options must be set before calling this to settle the algorithm parameters.

Parameters:
obj The object representing the probability distribution function (PDF) which apply the particle filter algorithm to.
action A pointer to an action in the form of a CActionCollection, or NULL if there is no action.
observation A pointer to observations in the form of a CSensoryFrame, or NULL if there is no observation.
stats An output structure for gathering statistics of the particle filter execution, or set to NULL if you do not need it (see CParticleFilter::TParticleFilterStats).
See also:
CParticleFilterCapable, executeOn

CParticleFilter& mrpt::bayes::CParticleFilter::operator= ( const CParticleFilter o  )  [inline]

Definition at line 179 of file CParticleFilter.h.

References m_obj, and m_options.


Member Data Documentation

The PDF object to run the filter on.

Definition at line 226 of file CParticleFilter.h.

Referenced by operator=().

The options to be used in the PF, must be set before executing any step of the particle filter.

Definition at line 221 of file CParticleFilter.h.

Referenced by operator=().




Page generated by Doxygen 1.5.8 for MRPT 0.6.5 SVN: at Sun Aug 9 21:47:23 CEST 2009