Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

LocalShapeEvaluator Class Reference

Provides evaluation of the match between local or camera and world given a candidate particle. More...

#include <ShapeSensorModel.h>

Inheritance diagram for LocalShapeEvaluator:

Detailed Description

Provides evaluation of the match between local or camera and world given a candidate particle.

The reason for separating LocalShapeEvaluator 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. ShapeSLAMParticleEvaluator) as a clean way to extend the evaluation code for particle sub-types.

Definition at line 21 of file ShapeSensorModel.h.

List of all members.

Public Member Functions

 LocalShapeEvaluator (DualCoding::ShapeSpace &localShS, DualCoding::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 ~LocalShapeEvaluator ()
 destructor
void evaluate (LocalizationParticle &part)
 the heart of the class, call with a particle, will adjust the weight
void evaluateWorkhorse (LocalizationParticle &p, const unsigned int nLocals, float particleViewX[], float particleViewY[], float particleViewX2[], float ParticleViewY2[], int localMatches[], float localScores[])
 the real work is done here; shared with SLAM version
void updateWeight (LocalizationParticle &p, int const localMatches[], float const localScores[])
 update the particle weight after computing local match scores (and possibly additions/deletions if SLAM)
float normpdf (float const distsq)

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

Static Public Attributes

static float const maxDist = 1e10
 maximum distance for a landmark to be useful in distance error calculation; value should be < 1e10
static float const stdevSq = 150*150
 controls how much weight is given to "near-misses"

Constructor & Destructor Documentation

LocalShapeEvaluator::LocalShapeEvaluator ( DualCoding::ShapeSpace &  localShS,
DualCoding::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 LocalShapeEvaluator::~LocalShapeEvaluator (  )  [virtual]

destructor

Definition at line 25 of file ShapeSensorModel.h.


Member Function Documentation

float LocalShapeEvaluator::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

computes a (non-normalized) gaussian distribution

Definition at line 193 of file ShapeSensorModel.cc.

void LocalShapeEvaluator::evaluate ( LocalizationParticle part  ) 

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

Definition at line 28 of file ShapeSensorModel.cc.

Referenced by ShapeSensorModel< LocalizationParticle >::updateFromLocal().

void LocalShapeEvaluator::evaluateWorkhorse ( LocalizationParticle p,
const unsigned int  nLocals,
float  particleViewX[],
float  particleViewY[],
float  particleViewX2[],
float  ParticleViewY2[],
int  localMatches[],
float  localScores[] 
)

the real work is done here; shared with SLAM version

Definition at line 43 of file ShapeSensorModel.cc.

Referenced by DualCoding::ShapeSLAMParticleEvaluator::evaluate(), and evaluate().

float LocalShapeEvaluator::normpdf ( float const   distsq  ) 

normalization isn't needed because the scale factor is constant across particles, and so doesn't matter for purposes of comparison between particles

Definition at line 50 of file ShapeSensorModel.h.

void LocalShapeEvaluator::updateWeight ( LocalizationParticle p,
int const   localMatches[],
float const   localScores[] 
)

update the particle weight after computing local match scores (and possibly additions/deletions if SLAM)

Definition at line 186 of file ShapeSensorModel.cc.

Referenced by DualCoding::ShapeSLAMParticleEvaluator::evaluate(), and evaluate().


Member Data Documentation

float const LocalShapeEvaluator::maxDist = 1e10 [static]

maximum distance for a landmark to be useful in distance error calculation; value should be < 1e10

Definition at line 41 of file ShapeSensorModel.h.

float const LocalShapeEvaluator::stdevSq = 150*150 [static]

controls how much weight is given to "near-misses"

Definition at line 42 of file ShapeSensorModel.h.

Referenced by normpdf(), and updateWeight().


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

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