Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
ParticleFilter< ParticleT >::DistributionPolicy Class ReferenceA distribution policy provides the ability to randomize ("redistribute") or tweak the values of a group of particles. More...
Inheritance diagram for ParticleFilter< ParticleT >::DistributionPolicy:
Detailed Descriptiontemplate<typename ParticleT>
|
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_type > | particle_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 | ~DistributionPolicy () |
destructor | |
virtual void | randomize (particle_type *begin, index_t num)=0 |
This should redistribute the particles over a large area, independently of the particle's current value. | |
virtual void | jiggle (float var, particle_type *begin, index_t num)=0 |
This should slightly modify the particles' state values. |
typedef particle_collection::size_type ParticleFilter< ParticleT >::DistributionPolicy::index_t |
index type for refering to particles within the collection
Reimplemented in LocalizationParticleDistributionPolicy< ParticleT >, and DualCoding::ShapeParticleDistributionPolicy< ParticleT >.
Definition at line 186 of file ParticleFilter.h.
typedef std::vector<particle_type> ParticleFilter< ParticleT >::DistributionPolicy::particle_collection |
the collection type we'll be using to store the particles
Definition at line 185 of file ParticleFilter.h.
typedef ParticleT ParticleFilter< ParticleT >::DistributionPolicy::particle_type |
redefinition here allows reference to the particle type even if the template parameter may be abstracted away due to a typedef
Reimplemented in LocalizationParticleDistributionPolicy< ParticleT >, and DualCoding::ShapeParticleDistributionPolicy< ParticleT >.
Definition at line 184 of file ParticleFilter.h.
virtual ParticleFilter< ParticleT >::DistributionPolicy::~DistributionPolicy | ( | ) | [virtual] |
destructor
Definition at line 187 of file ParticleFilter.h.
virtual void ParticleFilter< ParticleT >::DistributionPolicy::jiggle | ( | float | var, | |
particle_type * | begin, | |||
index_t | num | |||
) | [pure virtual] |
This should slightly modify the particles' state values.
var | indicates the scale of the variance desired -- multiply whatever variance you use for modifying each state parameter by this value | |
begin | the first particle in the array | |
num | the number of particles to apply the operation to |
This function is called on particles which have been replicated from an existing particle to explore the space around that particle. The more accurate your sensors and particle evaluation, the smaller the jiggle variance can be.
Referenced by ParticleFilter< ParticleT >::LowVarianceResamplingPolicy::resample(), and ParticleFilter< LocalizationParticle >::setPosition().
virtual void ParticleFilter< ParticleT >::DistributionPolicy::randomize | ( | particle_type * | begin, | |
index_t | num | |||
) | [pure virtual] |
This should redistribute the particles over a large area, independently of the particle's current value.
Randomization occurs whenever the particle filter doesn't have any usable particles for replication, either because the particle filter has just been created and doesn't have any information yet, or because new sensor readings have invalidated all of the current particles.
Referenced by ParticleFilter< ParticleT >::LowVarianceResamplingPolicy::resample(), ParticleFilter< LocalizationParticle >::resetFilter(), and ParticleFilter< LocalizationParticle >::resizeParticles().
Tekkotsu v5.1CVS |
Generated Mon May 9 04:59:14 2016 by Doxygen 1.6.3 |