Main MRPT website > C++ reference
MRPT logo
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | Friends

mrpt::slam::CMultiMetricMapPDF Class Reference


Detailed Description

Declares a class that represents a Rao-Blackwellized set of particles for solving the SLAM problem (This class is the base of RBPF-SLAM applications).

This class is used internally by the map building algorithm in "mrpt::slam::CMetricMapBuilderRBPF"

See also:
mrpt::slam::CMetricMapBuilderRBPF

Definition at line 77 of file CMultiMetricMapPDF.h.

#include <mrpt/slam/CMultiMetricMapPDF.h>

Inheritance diagram for mrpt::slam::CMultiMetricMapPDF:
Inheritance graph
[legend]

List of all members.

Classes

struct  TPredictionParams
 The struct for passing extra simulation parameters to the prediction/update stage when running a particle filter. More...

Public Member Functions

 IMPLEMENT_PARTICLE_FILTER_CAPABLE (CRBPFParticleData)
 CMultiMetricMapPDF (const bayes::CParticleFilter::TParticleFilterOptions &opts=bayes::CParticleFilter::TParticleFilterOptions(), const mrpt::slam::TSetOfMetricMapInitializers *mapsInitializers=NULL, const TPredictionParams *predictionOptions=NULL)
 Constructor.
virtual ~CMultiMetricMapPDF ()
 Destructor.
void clear (const CPose2D &initialPose)
 Clear all elements of the maps, and restore all paths to a single starting pose.
void clear (const CPose3D &initialPose)
 Clear all elements of the maps, and restore all paths to a single starting pose.
void getEstimatedPosePDFAtTime (size_t timeStep, CPose3DPDFParticles &out_estimation) const
 Returns the estimate of the robot pose as a particles PDF for the instant of time "timeStep", from 0 to N-1.
void getEstimatedPosePDF (CPose3DPDFParticles &out_estimation) const
 Returns the current estimate of the robot pose, as a particles PDF.
CMultiMetricMapgetCurrentMetricMapEstimation ()
 Returns the weighted averaged map based on the current best estimation.
CMultiMetricMapgetCurrentMostLikelyMetricMap ()
 Returns a pointer to the current most likely map (associated to the most likely particle).
size_t getNumberOfObservationsInSimplemap () const
 Get the number of CSensoryFrame inserted into the internal member SFs.
void insertObservation (CSensoryFrame &sf)
 Insert an observation to the map, at each particle's pose and to each particle's metric map.
void getPath (size_t i, std::deque< math::TPose3D > &out_path) const
 Return the path (in absolute coordinate poses) for the i'th particle.
double getCurrentEntropyOfPaths ()
 Returns the current entropy of paths, computed as the average entropy of poses along the path, where entropy of each pose estimation is computed as the entropy of the gaussian approximation covariance.
double getCurrentJointEntropy ()
 Returns the joint entropy estimation over paths and maps, acording to "Information Gain-based Exploration Using" by C.
void updateSensoryFrameSequence ()
 Update the poses estimation of the member "SFs" according to the current path belief.
void saveCurrentPathEstimationToTextFile (const std::string &fil)
 A logging utility: saves the current path estimation for each particle in a text file (a row per particle, each 3-column-entry is a set [x,y,phi], respectively).
Virtual methods that the PF_implementations assume exist.
const TPose3DgetLastPose (const size_t i) const
 Return a pointer to the last robot pose in the i'th particle (or NULL if it's a path and it's empty).
void PF_SLAM_implementation_custom_update_particle_with_new_pose (CParticleDataContent *particleData, const TPose3D &newPose) const
bool PF_SLAM_implementation_doWeHaveValidObservations (const CParticleList &particles, const CSensoryFrame *sf) const
bool PF_SLAM_implementation_skipRobotMovement () const
 Make a specialization if needed, eg.
double PF_SLAM_computeObservationLikelihoodForParticle (const CParticleFilter::TParticleFilterOptions &PF_options, const size_t particleIndexForMap, const CSensoryFrame &observation, const CPose3D &x) const
 Evaluate the observation likelihood for one particle at a given location.

Public Attributes

mrpt::slam::CMultiMetricMapPDF::TPredictionParams options
float newInfoIndex
 An index [0,1] measuring how much information an observation aports to the map (Typ.

Protected Member Functions

void prediction_and_update_pfStandardProposal (const mrpt::slam::CActionCollection *action, const mrpt::slam::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &PF_options)
 The PF algorithm implementation.
void prediction_and_update_pfOptimalProposal (const mrpt::slam::CActionCollection *action, const mrpt::slam::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &PF_options)
 The PF algorithm implementation.
void prediction_and_update_pfAuxiliaryPFOptimal (const mrpt::slam::CActionCollection *action, const mrpt::slam::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &PF_options)
 The PF algorithm implementation.

Private Member Functions

float H (float p)
 Entropy aux.
void rebuildAverageMap ()
 Rebuild the "expected" grid map.

Private Attributes

CMultiMetricMap averageMap
 Internal buffer for the averaged map.
bool averageMapIsUpdated
CSimpleMap SFs
 The SFs and their corresponding pose estimations:
std::vector< uint32_t > SF2robotPath
 A mapping between indexes in the SFs to indexes in the robot paths from particles.

Friends

class CMetricMapBuilderRBPF

RTTI stuff

typedef CMultiMetricMapPDFPtr SmartPtr
static mrpt::utils::CLASSINIT _init_CMultiMetricMapPDF
static mrpt::utils::TRuntimeClassId classCMultiMetricMapPDF
static const
mrpt::utils::TRuntimeClassId
classinfo
static const
mrpt::utils::TRuntimeClassId
_GetBaseClass ()
virtual const
mrpt::utils::TRuntimeClassId
GetRuntimeClass () const
 Returns information about the class of an object in runtime.
virtual mrpt::utils::CObjectduplicate () const
 Returns a copy of the object, indepently of its class.
static mrpt::utils::CObjectCreateObject ()
static CMultiMetricMapPDFPtr Create ()

Member Typedef Documentation

A typedef for the associated smart pointer

Definition at line 87 of file CMultiMetricMapPDF.h.


Constructor & Destructor Documentation

mrpt::slam::CMultiMetricMapPDF::CMultiMetricMapPDF ( const bayes::CParticleFilter::TParticleFilterOptions opts = bayes::CParticleFilter::TParticleFilterOptions(),
const mrpt::slam::TSetOfMetricMapInitializers mapsInitializers = NULL,
const TPredictionParams predictionOptions = NULL 
)

Constructor.

virtual mrpt::slam::CMultiMetricMapPDF::~CMultiMetricMapPDF ( ) [virtual]

Destructor.


Member Function Documentation

static const mrpt::utils::TRuntimeClassId* mrpt::slam::CMultiMetricMapPDF::_GetBaseClass ( ) [static, protected]

Reimplemented from mrpt::utils::CSerializable.

void mrpt::slam::CMultiMetricMapPDF::clear ( const CPose2D initialPose)

Clear all elements of the maps, and restore all paths to a single starting pose.

void mrpt::slam::CMultiMetricMapPDF::clear ( const CPose3D initialPose)

Clear all elements of the maps, and restore all paths to a single starting pose.

static CMultiMetricMapPDFPtr mrpt::slam::CMultiMetricMapPDF::Create ( ) [static]
static mrpt::utils::CObject* mrpt::slam::CMultiMetricMapPDF::CreateObject ( ) [static]
virtual mrpt::utils::CObject* mrpt::slam::CMultiMetricMapPDF::duplicate ( ) const [virtual]

Returns a copy of the object, indepently of its class.

Implements mrpt::utils::CObject.

double mrpt::slam::CMultiMetricMapPDF::getCurrentEntropyOfPaths ( )

Returns the current entropy of paths, computed as the average entropy of poses along the path, where entropy of each pose estimation is computed as the entropy of the gaussian approximation covariance.

double mrpt::slam::CMultiMetricMapPDF::getCurrentJointEntropy ( )

Returns the joint entropy estimation over paths and maps, acording to "Information Gain-based Exploration Using" by C.

Stachniss, G. Grissetti and W.Burgard.

CMultiMetricMap* mrpt::slam::CMultiMetricMapPDF::getCurrentMetricMapEstimation ( )

Returns the weighted averaged map based on the current best estimation.

If you need a persistent copy of this object, please use "CSerializable::duplicate" and use the copy.

CMultiMetricMap* mrpt::slam::CMultiMetricMapPDF::getCurrentMostLikelyMetricMap ( )

Returns a pointer to the current most likely map (associated to the most likely particle).

void mrpt::slam::CMultiMetricMapPDF::getEstimatedPosePDF ( CPose3DPDFParticles out_estimation) const

Returns the current estimate of the robot pose, as a particles PDF.

See also:
getEstimatedPosePDFAtTime
void mrpt::slam::CMultiMetricMapPDF::getEstimatedPosePDFAtTime ( size_t  timeStep,
CPose3DPDFParticles out_estimation 
) const

Returns the estimate of the robot pose as a particles PDF for the instant of time "timeStep", from 0 to N-1.

See also:
getEstimatedPosePDF
const TPose3D* mrpt::slam::CMultiMetricMapPDF::getLastPose ( const size_t  i) const [virtual]

Return a pointer to the last robot pose in the i'th particle (or NULL if it's a path and it's empty).

Implements mrpt::slam::PF_implementation< CRBPFParticleData, CMultiMetricMapPDF >.

size_t mrpt::slam::CMultiMetricMapPDF::getNumberOfObservationsInSimplemap ( ) const [inline]

Get the number of CSensoryFrame inserted into the internal member SFs.

Definition at line 220 of file CMultiMetricMapPDF.h.

void mrpt::slam::CMultiMetricMapPDF::getPath ( size_t  i,
std::deque< math::TPose3D > &  out_path 
) const

Return the path (in absolute coordinate poses) for the i'th particle.

Exceptions:
Onindex out of bounds
virtual const mrpt::utils::TRuntimeClassId* mrpt::slam::CMultiMetricMapPDF::GetRuntimeClass ( ) const [virtual]

Returns information about the class of an object in runtime.

Reimplemented from mrpt::utils::CSerializable.

float mrpt::slam::CMultiMetricMapPDF::H ( float  p) [private]

Entropy aux.

function

mrpt::slam::CMultiMetricMapPDF::IMPLEMENT_PARTICLE_FILTER_CAPABLE ( CRBPFParticleData  )
void mrpt::slam::CMultiMetricMapPDF::insertObservation ( CSensoryFrame sf)

Insert an observation to the map, at each particle's pose and to each particle's metric map.

Parameters:
sfThe SF to be inserted
double mrpt::slam::CMultiMetricMapPDF::PF_SLAM_computeObservationLikelihoodForParticle ( const CParticleFilter::TParticleFilterOptions PF_options,
const size_t  particleIndexForMap,
const CSensoryFrame observation,
const CPose3D x 
) const [virtual]

Evaluate the observation likelihood for one particle at a given location.

Implements mrpt::slam::PF_implementation< CRBPFParticleData, CMultiMetricMapPDF >.

void mrpt::slam::CMultiMetricMapPDF::PF_SLAM_implementation_custom_update_particle_with_new_pose ( CParticleDataContent particleData,
const TPose3D newPose 
) const [virtual]
bool mrpt::slam::CMultiMetricMapPDF::PF_SLAM_implementation_doWeHaveValidObservations ( const CParticleList particles,
const CSensoryFrame sf 
) const
bool mrpt::slam::CMultiMetricMapPDF::PF_SLAM_implementation_skipRobotMovement ( ) const [virtual]

Make a specialization if needed, eg.

in the first step in SLAM.

Reimplemented from mrpt::slam::PF_implementation< CRBPFParticleData, CMultiMetricMapPDF >.

void mrpt::slam::CMultiMetricMapPDF::prediction_and_update_pfAuxiliaryPFOptimal ( const mrpt::slam::CActionCollection action,
const mrpt::slam::CSensoryFrame observation,
const bayes::CParticleFilter::TParticleFilterOptions PF_options 
) [protected, virtual]

The PF algorithm implementation.

Reimplemented from mrpt::bayes::CParticleFilterCapable.

void mrpt::slam::CMultiMetricMapPDF::prediction_and_update_pfOptimalProposal ( const mrpt::slam::CActionCollection action,
const mrpt::slam::CSensoryFrame observation,
const bayes::CParticleFilter::TParticleFilterOptions PF_options 
) [protected, virtual]

The PF algorithm implementation.

Reimplemented from mrpt::bayes::CParticleFilterCapable.

void mrpt::slam::CMultiMetricMapPDF::prediction_and_update_pfStandardProposal ( const mrpt::slam::CActionCollection action,
const mrpt::slam::CSensoryFrame observation,
const bayes::CParticleFilter::TParticleFilterOptions PF_options 
) [protected, virtual]

The PF algorithm implementation.

Reimplemented from mrpt::bayes::CParticleFilterCapable.

void mrpt::slam::CMultiMetricMapPDF::rebuildAverageMap ( ) [private]

Rebuild the "expected" grid map.

Used internally, do not call

void mrpt::slam::CMultiMetricMapPDF::saveCurrentPathEstimationToTextFile ( const std::string &  fil)

A logging utility: saves the current path estimation for each particle in a text file (a row per particle, each 3-column-entry is a set [x,y,phi], respectively).

void mrpt::slam::CMultiMetricMapPDF::updateSensoryFrameSequence ( )

Update the poses estimation of the member "SFs" according to the current path belief.


Friends And Related Function Documentation

friend class CMetricMapBuilderRBPF [friend]

Definition at line 83 of file CMultiMetricMapPDF.h.


Member Data Documentation

Definition at line 87 of file CMultiMetricMapPDF.h.

Internal buffer for the averaged map.

Definition at line 118 of file CMultiMetricMapPDF.h.

Definition at line 119 of file CMultiMetricMapPDF.h.

Definition at line 87 of file CMultiMetricMapPDF.h.

Definition at line 87 of file CMultiMetricMapPDF.h.

An index [0,1] measuring how much information an observation aports to the map (Typ.

threshold=0.07)

Definition at line 250 of file CMultiMetricMapPDF.h.

std::vector<uint32_t> mrpt::slam::CMultiMetricMapPDF::SF2robotPath [private]

A mapping between indexes in the SFs to indexes in the robot paths from particles.

Definition at line 127 of file CMultiMetricMapPDF.h.

The SFs and their corresponding pose estimations:

Definition at line 123 of file CMultiMetricMapPDF.h.




Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN: at Sat Mar 26 06:16:28 UTC 2011