Template Class ImportanceResamplingWE

Inheritance Relationships

Base Type

  • public particle_filter::ImportanceResampling< StateType >

Class Documentation

template<class StateType>
class bitbots_localization::ImportanceResamplingWE : public particle_filter::ImportanceResampling<StateType>

Public Functions

ImportanceResamplingWE(int explorer_count, std::shared_ptr<particle_filter::StateDistribution<StateType>> distribution)

The constructor of this base class inits some members.

void resample(const ParticleList &source, const ParticleList &destination) const

This is the main method of ImportanceResampling. It takes two references to particle lists. The first reference refers to the old particle list, the second to the new one.

Parameters
  • source – the source list to draw new particles from.

  • destination – the destination list where to put the copies.

void setExplorerCount(int explorer_count)

Sets the Random Number Generator to use in resample() to generate uniformly distributed random numbers.

int getExplorerCount()

Private Types

typedef std::vector<particle_filter::Particle<StateType>*> ParticleList

A ParticleList is an array of pointers to Particles.

Private Members

int explorer_count_
std::shared_ptr<particle_filter::StateDistribution<StateType>> distribution_
particle_filter::CRandomNumberGenerator m_RNG