Classes | |
struct | Landmark |
struct | ObjectState |
struct | Particle |
struct | TopicInfo |
Public Member Functions | |
HippocampusI (OptionManager &mgr, nub::ref< OutputFrameSeries > ofs, const std::string &descrName="HippocampusService", const std::string &tagName="HippocampusService") | |
virtual void | start2 () |
This is called from within start() after the subcomponents have started. | |
virtual void | evolve (const SimEvents::EventMessagePtr &eMsg, const Ice::Current &) |
void | initSimEvents (Ice::CommunicatorPtr icPtr, Ice::ObjectPrx objectPrx) |
void | unsubscribeSimEvents () |
void | resetCurrentObject () |
Point3D< float > | get3Dpos (int pan, int tilt) |
void | drawObject (Image< PixRGB< byte > > &img, ObjectState &objState) |
HippocampusI (OptionManager &mgr, const std::string &descrName="Hippocampus", const std::string &tagName="Hippocampus") | |
virtual void | run () |
void | evolve () |
Update the current map. | |
virtual void | updateMessage (const RobotSimEvents::EventMessagePtr &eMsg, const Ice::Current &) |
Get a message from another part of the brain. | |
void | init (Ice::CommunicatorPtr ic, Ice::ObjectAdapterPtr adapter) |
Initalize the object. | |
void | displayMap () |
void | resampleParticles () |
void | updateParticleObservation (RobotSimEvents::LandmarksMessagePtr landmarksMsg) |
void | updateParticleSlamObservation (RobotSimEvents::LandmarksMessagePtr landmarksMsg) |
void | addLandmark (Landmark lm) |
Add a new landmark to the landmark database. | |
void | updateParticleMotion (RobotSimEvents::MotionMessagePtr newMotion) |
Move each particle according to the motion model, plus some uniform noise. |
Definition at line 68 of file HippocampusService.H.
void HippocampusI::addLandmark | ( | Landmark | lm | ) |
Add a new landmark to the landmark database.
Definition at line 560 of file HippocampusI.C.
void HippocampusI::displayMap | ( | ) |
Display an image representation of our current belief state ie. Draw all of our particles, landmarks, etc onto an image and display it
Definition at line 608 of file HippocampusI.C.
References Image< T >::coordsOk(), drawCircle(), drawCross(), drawDisk(), SimpleFont::FIXED(), flipVertic(), Image< T >::getDims(), Point2D< T >::i, inplaceNormalize(), inplacePaste(), Image< T >::setVal(), SRC_POS, toRGB(), writeText(), and ZEROS.
Referenced by updateMessage().
void HippocampusI::evolve | ( | ) |
Update the current map.
Definition at line 207 of file HippocampusI.C.
void HippocampusI::init | ( | Ice::CommunicatorPtr | ic, | |
Ice::ObjectAdapterPtr | adapter | |||
) |
Initalize the object.
Definition at line 167 of file HippocampusI.C.
void HippocampusI::resampleParticles | ( | ) |
Use a roulette wheel to probabilistically duplicate particles with high weights, and discard those with low weights
Definition at line 570 of file HippocampusI.C.
References randomDouble().
Referenced by updateMessage().
void HippocampusI::start2 | ( | ) | [virtual] |
This is called from within start() after the subcomponents have started.
Reimplemented from ModelComponent.
Definition at line 70 of file HippocampusService.C.
void HippocampusI::updateMessage | ( | const RobotSimEvents::EventMessagePtr & | eMsg, | |
const Ice::Current & | ||||
) | [virtual] |
Get a message from another part of the brain.
Definition at line 234 of file HippocampusI.C.
References displayMap(), resampleParticles(), updateParticleMotion(), and updateParticleSlamObservation().
void HippocampusI::updateParticleMotion | ( | RobotSimEvents::MotionMessagePtr | newMotion | ) |
Move each particle according to the motion model, plus some uniform noise.
Definition at line 307 of file HippocampusI.C.
References abs(), randomDoubleFromNormal(), and sqrt().
Referenced by updateMessage().
void HippocampusI::updateParticleObservation | ( | RobotSimEvents::LandmarksMessagePtr | landmarksMsg | ) |
Assign weights to each particle to judge how likely a particle is to observe the currently observed set of landmarks
Definition at line 504 of file HippocampusI.C.
void HippocampusI::updateParticleSlamObservation | ( | RobotSimEvents::LandmarksMessagePtr | landmarksMsg | ) |
Assign weights to each particle to judge how likely a particle is to observe the currently observed set of landmarks. use EKF to track the landmarks
Definition at line 366 of file HippocampusI.C.
References exp(), G, Image< T >::getVal(), matrixInv(), matrixMult(), NO_INIT, Image< T >::setVal(), sqrt(), squareOf(), sum(), transpose(), and ZEROS.
Referenced by updateMessage().