Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

DualCoding::ShapeBasedParticleFilter Class Reference

Bundles a motion model (DeadReckoningBehavior or CreateMotionModel) and a ShapeSensorModel for easy use of a shape-based particle filter for localization. More...

#include <ShapeBasedParticleFilter.h>

Inheritance diagram for DualCoding::ShapeBasedParticleFilter:

Detailed Description

Bundles a motion model (DeadReckoningBehavior or CreateMotionModel) and a ShapeSensorModel for easy use of a shape-based particle filter for localization.

Definition at line 99 of file ShapeBasedParticleFilter.h.

List of all members.

Public Member Functions

 ShapeBasedParticleFilter (ShapeSpace &camShS, ShapeSpace &localShS, ShapeSpace &worldShS, unsigned int numParticles=2000)
 constructor, must pass local and world shape spaces, which will be used in future calls to update()
virtual ~ShapeBasedParticleFilter ()
 destructor
virtual void updateFromLocal ()
virtual void updateFromCamera ()
virtual ShapeSensorModel
< LocalizationParticle > & 
getSensorModel () const
 accessor for sensorModel
virtual void setSensorModel (ShapeSensorModel< LocalizationParticle > *customSensorModel)
 replaces the sensor model in use, the particle filter will take responsibility for deallocating the sensor model's memory when destructed or replaced
virtual void resetFilter ()
 randomizes all the particles
virtual void resizeParticles (unsigned int numParticles)
 Adjusts the size of the particle collection -- more particles gives better coverage, but more computation.
virtual void synchEstimateToAgent ()
 Synchs the estimate to the agent's current position and heading in worldShS. During odometry, the Pilot will use the estimate to update the agent's position.
virtual void setPosition (float const x, float const y, AngTwoPi const orientation, float variance=0)
 Resets particles to the specified position and orientation, and optionally jiggles them by variance.
virtual void computeVariance ()
 Computes the weighted variance in the position and heading estimates of the particle collection.
virtual void setWorldBounds (const Shape< PolygonData > &bounds)
 Sets boundary within which particles should lie.
virtual void setWorldBounds (float minX, float width, float minY, float height)
 Sets boundary within which particles should lie.
virtual void displayParticles (float const howmany=100)
 Displays particles on the world map using a GraphicsData shape; howmany can either be a percentage (<= 1.0) or a whole number.
virtual void displayIndividualParticles (float const howmany=100)
 Displays individual particles on the world map using LocalizationParticle shapes; howmany can either be a percentage (<= 1.0) or a whole number.

Static Public Member Functions

static void deleteParticleDisplay (ShapeSpace &wShS)
 Deletes particle shapes and "particle" GraphicsData object so we can prepare a new display.

Protected Attributes

ShapeSensorModel
< LocalizationParticle > * 
sensorModel
 provides evaluation of particles

Private Member Functions

 ShapeBasedParticleFilter (const ShapeBasedParticleFilter &)
 don't call (copy constructor)
ShapeBasedParticleFilteroperator= (const ShapeBasedParticleFilter &)
 don't call (assignment operator)

Constructor & Destructor Documentation

DualCoding::ShapeBasedParticleFilter::ShapeBasedParticleFilter ( ShapeSpace &  camShS,
ShapeSpace &  localShS,
ShapeSpace &  worldShS,
unsigned int  numParticles = 2000 
)

constructor, must pass local and world shape spaces, which will be used in future calls to update()

Definition at line 103 of file ShapeBasedParticleFilter.h.

virtual DualCoding::ShapeBasedParticleFilter::~ShapeBasedParticleFilter (  )  [virtual]

destructor

Definition at line 134 of file ShapeBasedParticleFilter.h.

DualCoding::ShapeBasedParticleFilter::ShapeBasedParticleFilter ( const ShapeBasedParticleFilter  )  [private]

don't call (copy constructor)


Member Function Documentation

void DualCoding::ShapeBasedParticleFilter::computeVariance (  )  [virtual]

Computes the weighted variance in the position and heading estimates of the particle collection.

Reimplemented from ParticleFilter< LocalizationParticle >.

Definition at line 44 of file ShapeBasedParticleFilter.cc.

void DualCoding::ShapeBasedParticleFilter::deleteParticleDisplay ( ShapeSpace &  wShS  )  [static]

Deletes particle shapes and "particle" GraphicsData object so we can prepare a new display.

Definition at line 95 of file ShapeBasedParticleFilter.cc.

Referenced by displayIndividualParticles(), and displayParticles().

void DualCoding::ShapeBasedParticleFilter::displayIndividualParticles ( float const   howmany = 100  )  [virtual]

Displays individual particles on the world map using LocalizationParticle shapes; howmany can either be a percentage (<= 1.0) or a whole number.

Definition at line 118 of file ShapeBasedParticleFilter.cc.

void DualCoding::ShapeBasedParticleFilter::displayParticles ( float const   howmany = 100  )  [virtual]

Displays particles on the world map using a GraphicsData shape; howmany can either be a percentage (<= 1.0) or a whole number.

Definition at line 102 of file ShapeBasedParticleFilter.cc.

Referenced by resizeParticles().

virtual ShapeSensorModel<LocalizationParticle>& DualCoding::ShapeBasedParticleFilter::getSensorModel (  )  const [virtual]

accessor for sensorModel

Definition at line 152 of file ShapeBasedParticleFilter.h.

Referenced by updateFromCamera(), and updateFromLocal().

ShapeBasedParticleFilter& DualCoding::ShapeBasedParticleFilter::operator= ( const ShapeBasedParticleFilter  )  [private]

don't call (assignment operator)

void DualCoding::ShapeBasedParticleFilter::resetFilter (  )  [virtual]

randomizes all the particles

Definition at line 18 of file ShapeBasedParticleFilter.cc.

void DualCoding::ShapeBasedParticleFilter::resizeParticles ( unsigned int  numParticles  )  [virtual]

Adjusts the size of the particle collection -- more particles gives better coverage, but more computation.

You may wish to shrink the number of particles when the confidence interval is small or particle weights are high, and increase particles when the filter is getting "lost".

Reimplemented from ParticleFilter< LocalizationParticle >.

Definition at line 23 of file ShapeBasedParticleFilter.cc.

void DualCoding::ShapeBasedParticleFilter::setPosition ( float const   x,
float const   y,
AngTwoPi const   orientation,
float  variance = 0 
) [virtual]

Resets particles to the specified position and orientation, and optionally jiggles them by variance.

Definition at line 39 of file ShapeBasedParticleFilter.cc.

virtual void DualCoding::ShapeBasedParticleFilter::setSensorModel ( ShapeSensorModel< LocalizationParticle > *  customSensorModel  )  [virtual]

replaces the sensor model in use, the particle filter will take responsibility for deallocating the sensor model's memory when destructed or replaced

Definition at line 155 of file ShapeBasedParticleFilter.h.

void DualCoding::ShapeBasedParticleFilter::setWorldBounds ( float  minX,
float  width,
float  minY,
float  height 
) [virtual]

Sets boundary within which particles should lie.

Definition at line 79 of file ShapeBasedParticleFilter.cc.

void DualCoding::ShapeBasedParticleFilter::setWorldBounds ( const Shape< PolygonData > &  bounds  )  [virtual]

Sets boundary within which particles should lie.

Definition at line 70 of file ShapeBasedParticleFilter.cc.

void DualCoding::ShapeBasedParticleFilter::synchEstimateToAgent (  )  [virtual]

Synchs the estimate to the agent's current position and heading in worldShS. During odometry, the Pilot will use the estimate to update the agent's position.

Definition at line 33 of file ShapeBasedParticleFilter.cc.

virtual void DualCoding::ShapeBasedParticleFilter::updateFromCamera (  )  [virtual]

Definition at line 147 of file ShapeBasedParticleFilter.h.

virtual void DualCoding::ShapeBasedParticleFilter::updateFromLocal (  )  [virtual]

Definition at line 143 of file ShapeBasedParticleFilter.h.


Member Data Documentation


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:21 2016 by Doxygen 1.6.3