Localization Class Reference

contains functions for tracking the position of the sub using particle filter technic More...

#include <src/Robots/SeaBeeIII/Localization.H>

Inheritance diagram for Localization:
Inheritance graph
[legend]
Collaboration diagram for Localization:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Localization (OptionManager &mgr, const std::string &descrName="Localization", const std::string &tagName="Localization")
 ~Localization ()
virtual void evolve ()
virtual void updateMessage (const RobotSimEvents::EventMessagePtr &eMsg, const Ice::Current &)
 Get a message.
virtual void registerTopics ()
void initPoints (const short int)
float getNormalizer ()
float rand_N ()
void predict (RobotSimEvents::OrientationMessagePtr)
void update (RobotSimEvents::ObstacleMessagePtr)
void resample (int no=0)
class pParticlegetCurrentEstimate ()

Detailed Description

contains functions for tracking the position of the sub using particle filter technic

Definition at line 78 of file Localization.H.


Constructor & Destructor Documentation

Localization::Localization ( OptionManager mgr,
const std::string descrName = "Localization",
const std::string tagName = "Localization" 
)

LocaLization Constructor function Initializes the Localization class

Definition at line 13 of file Localization.C.

References ModelComponent::addSubComponent(), initPoints(), and ZEROS.

Localization::~Localization (  ) 

~Localization() Destructor for the Localization class. Returns the total probability of all the particles

Definition at line 300 of file Localization.C.


Member Function Documentation

void Localization::evolve (  )  [virtual]

evolve

Reimplemented from RobotBrainComponent.

Definition at line 84 of file Localization.C.

class pParticle & Localization::getCurrentEstimate (  ) 

getCurrentEstimate Return the current estimate

Definition at line 266 of file Localization.C.

Referenced by predict().

float Localization::getNormalizer (  ) 

getNormalizer Returns the total probability of all the particles

Definition at line 70 of file Localization.C.

References Image< T >::setVal().

Referenced by resample().

void Localization::initPoints ( const short int  no = 1000  ) 

initPoints initialize the points in the image

Definition at line 51 of file Localization.C.

Referenced by Localization().

void Localization::predict ( RobotSimEvents::OrientationMessagePtr  oMsg  ) 

predict predict the new position based on the updates received from the compass

First erase the current position of the point

Definition at line 129 of file Localization.C.

References distance(), getCurrentEstimate(), Point2D< T >::i, Image< T >::setVal(), SRC_POS, and ZEROS.

Referenced by updateMessage().

void Localization::registerTopics (  )  [virtual]

registerTopics For registering the messages that we want to listen to and publish

Reimplemented from RobotBrainComponent.

Definition at line 37 of file Localization.C.

References RobotBrainComponent::registerSubscription().

void Localization::resample ( int  no = 0  ) 

resample the population and remove the unrelevant particles

Definition at line 225 of file Localization.C.

References getNormalizer(), mean(), and sqrt().

Referenced by updateMessage().

void Localization::update ( RobotSimEvents::ObstacleMessagePtr  oMsg  ) 

update update the position stats according to the obstacle position

Definition at line 210 of file Localization.C.

References Point2D< T >::i.

Referenced by updateMessage().

void Localization::updateMessage ( const RobotSimEvents::EventMessagePtr &  eMsg,
const Ice::Current &   
) [virtual]

Get a message.

updateMessage Returns the total probability of all the particles

Reimplemented from RobotBrainComponent.

Definition at line 97 of file Localization.C.

References predict(), resample(), and update().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:43:36 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3