Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ParticleShapeEvaluator Class Reference

#include <PFShapeLocalization.h>

Inheritance diagram for ParticleShapeEvaluator:

List of all members.


Detailed Description

provides evaluation of the matching between local and world given a candidate particle

The reason for separating ParticleShapeEvaluator and ShapeSensorModel? Partly so the fairly lengthy evaluation code can go in the .cc file to avoid repeated recompilation, but also to allow inheritance (e.g. SLAMShapeParticleEvaluator) as a clean way to extend the evaluation code for particle sub-types.

Definition at line 27 of file PFShapeLocalization.h.


Public Member Functions

 ParticleShapeEvaluator (ShapeSpace &localShS, ShapeSpace &worldShS)
 constructor, pass the local and world shape spaces, these will be used to initialize the appropriate particle-independent fields of the class
virtual ~ParticleShapeEvaluator ()
 destructor
void evaluate (LocalizationParticle &part)
 the heart of the class, call with a particle, will adjust the weight
void setMaxDist (float const dist)
const std::vector< float > & getLocalScores () const
unsigned int getNumMatches () const

Static Public Member Functions

static float distanceFromLine (coordinate_t x0, coordinate_t y0, PfLine &wline)
 helper function which calculates the distance between a point and a line along a perpendicular

Public Attributes

std::vector< PfRoot * > localLms
 a vector of the landmarks in the local space
std::vector< PfRoot * > worldLms
 a vector of landmarks in the world space
float maxDist
 maximum distance for a landmark to be useful in distance error calculation
std::vector< int > localMatches
 Index of best matching world landmark for each local landmark according to the currently-selected particle.
unsigned int numMatches
 number of matches found
std::vector< float > localScores
 Match scores for local landmarks according to this particle, only first numMatches are filled in (skip non-matching).
std::vector< float > particleViewX
 x coords of local landmarks according to the currently-selected particle
std::vector< float > particleViewY
 y coords of local landmarks according to the currently-selected particle
std::vector< float > particleViewX2
 x coords of other point of local line
std::vector< float > particleViewY2
 y coords of other point of local line

Constructor & Destructor Documentation

ParticleShapeEvaluator ( ShapeSpace localShS,
ShapeSpace worldShS 
)

constructor, pass the local and world shape spaces, these will be used to initialize the appropriate particle-independent fields of the class

Definition at line 17 of file PFShapeLocalization.cc.

virtual ~ParticleShapeEvaluator (  )  [inline, virtual]

destructor

Definition at line 31 of file PFShapeLocalization.h.


Member Function Documentation

void evaluate ( LocalizationParticle part  ) 

the heart of the class, call with a particle, will adjust the weight

Definition at line 39 of file PFShapeLocalization.cc.

Referenced by SLAMParticleShapeEvaluator::evaluate(), and ShapeSensorModel< LocalizationParticle >::evaluate().

void setMaxDist ( float const   dist  )  [inline]

Definition at line 36 of file PFShapeLocalization.h.

const std::vector<float>& getLocalScores (  )  const [inline]

unsigned int getNumMatches (  )  const [inline]

float distanceFromLine ( coordinate_t  x0,
coordinate_t  y0,
PfLine wline 
) [static]

helper function which calculates the distance between a point and a line along a perpendicular

Definition at line 134 of file PFShapeLocalization.cc.

Referenced by ParticleShapeEvaluator::evaluate().


Member Data Documentation

float maxDist

maximum distance for a landmark to be useful in distance error calculation

Definition at line 43 of file PFShapeLocalization.h.

Referenced by ParticleShapeEvaluator::setMaxDist().

std::vector<int> localMatches

Index of best matching world landmark for each local landmark according to the currently-selected particle.

Definition at line 45 of file PFShapeLocalization.h.

Referenced by SLAMParticleShapeEvaluator::determineAdditions(), SLAMParticleShapeEvaluator::determineDeletions(), SLAMParticleShapeEvaluator::evaluate(), ParticleShapeEvaluator::evaluate(), and ParticleShapeEvaluator::ParticleShapeEvaluator().

std::vector<float> particleViewX

x coords of local landmarks according to the currently-selected particle

Definition at line 52 of file PFShapeLocalization.h.

Referenced by SLAMParticleShapeEvaluator::determineDeletions(), ParticleShapeEvaluator::evaluate(), and ParticleShapeEvaluator::ParticleShapeEvaluator().

std::vector<float> particleViewY

y coords of local landmarks according to the currently-selected particle

Definition at line 53 of file PFShapeLocalization.h.

Referenced by SLAMParticleShapeEvaluator::determineDeletions(), ParticleShapeEvaluator::evaluate(), and ParticleShapeEvaluator::ParticleShapeEvaluator().

std::vector<float> particleViewX2

x coords of other point of local line

Definition at line 54 of file PFShapeLocalization.h.

Referenced by ParticleShapeEvaluator::evaluate(), and ParticleShapeEvaluator::ParticleShapeEvaluator().

std::vector<float> particleViewY2

y coords of other point of local line

Definition at line 55 of file PFShapeLocalization.h.

Referenced by ParticleShapeEvaluator::evaluate(), and ParticleShapeEvaluator::ParticleShapeEvaluator().


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

DualCoding 4.0
Generated Thu Nov 22 00:53:59 2007 by Doxygen 1.5.4