Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ParticleFilter< ParticleT >::SensorModel Class Reference

#include <ParticleFilter.h>

List of all members.


Detailed Description

template<typename ParticleT>
class ParticleFilter< ParticleT >::SensorModel

A sensor model is used to update particle weights to account based on each particle's ability to explain observations taken from the system.

Definition at line 134 of file ParticleFilter.h.

Public Types

typedef ParticleT particle_type
 redefinition here allows reference to the particle type even if the template parameter may be abstracted away due to a typedef
typedef std::vector< particle_typeparticle_collection
 the collection type we'll be using to store the particles
typedef particle_collection::size_type index_t
 index type for refering to particles within the collection

Public Member Functions

virtual ~SensorModel ()
virtual void evaluate (particle_collection &particles, index_t &bestIndex)=0
 once passed to the particle filter's updateSensors(), this will be called to allow the sensor model to update the 'weight' member of each particle


Member Function Documentation

template<typename ParticleT>
virtual void ParticleFilter< ParticleT >::SensorModel::evaluate ( particle_collection particles,
index_t bestIndex 
) [pure virtual]

once passed to the particle filter's updateSensors(), this will be called to allow the sensor model to update the 'weight' member of each particle

Parameters:
particles the current set of particles to be evaluated
[in] bestIndex on input, this will hold the index within particles of the particle with the highest weight.
[out] bestIndex on return, your function should update the parameter so it still indicates the best particle
Remember to update each particle's weight, don't overwrite it. In other words, you want to combine (e.g. add or multiply) the weight from the current sensor evaluation with the weight currently stored in each particle, don't just replace it. This is because there may be several sensor updates between resamplings so that particles can be more accurately evaluated.

Referenced by ParticleFilter< ParticleT >::updateSensors().


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

Tekkotsu v3.0
Generated Fri May 11 20:08:31 2007 by Doxygen 1.4.7