Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
ParticleBase< ParticleT > Class Template ReferenceProvides a common base class for particles used by the ParticleFilter. More...
Inheritance diagram for ParticleBase< ParticleT >:
Detailed Descriptiontemplate<class ParticleT>
|
Public Member Functions | |
ParticleBase () | |
constructor | |
virtual | ~ParticleBase () |
destructor | |
virtual float | sumSqErr (const ParticleT &p) const =0 |
returns the sum squared error between this particle and p | |
Public Attributes | |
float | weight |
indicates the 'health' of the particle -- the bigger the value, the better this particle |
ParticleBase< ParticleT >::ParticleBase | ( | ) |
constructor
Definition at line 43 of file ParticleFilter.h.
virtual ParticleBase< ParticleT >::~ParticleBase | ( | ) | [virtual] |
destructor
Definition at line 45 of file ParticleFilter.h.
virtual float ParticleBase< ParticleT >::sumSqErr | ( | const ParticleT & | p | ) | const [pure virtual] |
returns the sum squared error between this particle and p
This is only used to compute the confidence of the particle filter, you may want to weight some dimensions differently if they tend to have smaller values or are more important. How you interpret ParticleFilter::confidence() depends on how this function is implemented.
Implemented in LocalizationParticle.
float ParticleBase< ParticleT >::weight |
indicates the 'health' of the particle -- the bigger the value, the better this particle
Generally weights are indicative of probability, but are often unnormalized since the normalization factor is constant across particles and thus doesn't affect matters of relative comparison.
Further, weights tend to be very small as the accumulation of a number of sensor values tend to be each somewhat unlikely, and taken together the particle's weight shrinks exponentially. Thus it useful to work in log space to avoid numeric underflow on the range of a floating point value. This also has the advantage of transforming multiplication operations to slightly quicker addition operations. The default LowVarianceResamplingPolicy has a logWeights member so you can indicate whether weight values should be interpreted logarithmically (i.e. negative values) or linearly (e.g. positive (and generally very small) values). (default is logarithmic)
Definition at line 68 of file ParticleFilter.h.
Referenced by CameraShapeEvaluator::computeLikelihood(), operator<<(), LocalShapeEvaluator::updateWeight(), and ParticleFilter< LocalizationParticle >::weightLess().
Tekkotsu v5.1CVS |
Generated Mon May 9 04:59:13 2016 by Doxygen 1.6.3 |