Main MRPT website > C++ reference for MRPT 1.9.9
List of all members | Public Member Functions
mrpt::slam::PF_implementation< PARTICLE_TYPE, PDF_TYPE, CParticleList > Class Template Referenceabstract

Detailed Description

template<class PARTICLE_TYPE, class PDF_TYPE, class CParticleList = typename PDF_TYPE::CParticleList>
class mrpt::slam::PF_implementation< PARTICLE_TYPE, PDF_TYPE, CParticleList >

A set of common data shared by PF implementations for both SLAM and localization.

Definition at line 40 of file PF_implementations_data.h.

#include <mrpt/slam/PF_implementations_data.h>

Inheritance diagram for mrpt::slam::PF_implementation< PARTICLE_TYPE, PDF_TYPE, CParticleList >:
Inheritance graph

Public Member Functions

 PF_implementation ()
 
Virtual methods that the PF_implementations assume exist.
virtual mrpt::math::TPose3D getLastPose (const size_t i, bool &is_valid_pose) const =0
 Return the last robot pose in the i'th particle; is_valid_pose will be false if there is no such last pose. More...
 
virtual void PF_SLAM_implementation_custom_update_particle_with_new_pose (PARTICLE_TYPE *particleData, const mrpt::math::TPose3D &newPose) const =0
 
virtual void PF_SLAM_implementation_replaceByNewParticleSet (CParticleList &old_particles, const std::vector< mrpt::math::TPose3D > &newParticles, const std::vector< double > &newParticlesWeight, const std::vector< size_t > &newParticlesDerivedFromIdx) const
 This is the default algorithm to efficiently replace one old set of samples by another new set. More...
 
virtual bool PF_SLAM_implementation_doWeHaveValidObservations (const typename mrpt::bayes::CParticleFilterData< PARTICLE_TYPE >::CParticleList &particles, const mrpt::obs::CSensoryFrame *sf) const
 
virtual bool PF_SLAM_implementation_skipRobotMovement () const
 Make a specialization if needed, eg. More...
 
virtual double PF_SLAM_computeObservationLikelihoodForParticle (const mrpt::bayes::CParticleFilter::TParticleFilterOptions &PF_options, const size_t particleIndexForMap, const mrpt::obs::CSensoryFrame &observation, const mrpt::poses::CPose3D &x) const =0
 Evaluate the observation likelihood for one particle at a given location. More...
 

Data members and methods used by generic PF implementations

mrpt::obs::CActionRobotMovement2D m_accumRobotMovement2D
 
bool m_accumRobotMovement2DIsValid = false
 
mrpt::poses::CPose3DPDFGaussian m_accumRobotMovement3D
 
bool m_accumRobotMovement3DIsValid = false
 
mrpt::poses::CPoseRandomSampler m_movementDrawer
 Used in al PF implementations. More...
 
mrpt::math::CVectorDouble m_pfAuxiliaryPFOptimal_estimatedProb
 Auxiliary variable used in the "pfAuxiliaryPFOptimal" algorithm. More...
 
mrpt::math::CVectorDouble m_pfAuxiliaryPFStandard_estimatedProb
 Auxiliary variable used in the "pfAuxiliaryPFStandard" algorithm. More...
 
mrpt::math::CVectorDouble m_pfAuxiliaryPFOptimal_maxLikelihood
 Auxiliary variable used in the "pfAuxiliaryPFOptimal" algorithm. More...
 
std::vector< mrpt::math::TPose3Dm_pfAuxiliaryPFOptimal_maxLikDrawnMovement
 Auxiliary variable used in the "pfAuxiliaryPFOptimal" algorithm. More...
 
std::vector< bool > m_pfAuxiliaryPFOptimal_maxLikMovementDrawHasBeenUsed
 
template<class BINTYPE >
static double PF_SLAM_particlesEvaluator_AuxPFStandard (const mrpt::bayes::CParticleFilter::TParticleFilterOptions &PF_options, const mrpt::bayes::CParticleFilterCapable *obj, size_t index, const void *action, const void *observation)
 Compute w[i]*p(z_t | mu_t^i), with mu_t^i being the mean of the new robot pose. More...
 

Constructor & Destructor Documentation

◆ PF_implementation()

template<class PARTICLE_TYPE, class PDF_TYPE, class CParticleList = typename PDF_TYPE::CParticleList>
mrpt::slam::PF_implementation< PARTICLE_TYPE, PDF_TYPE, CParticleList >::PF_implementation ( )
inline

Definition at line 43 of file PF_implementations_data.h.

Member Function Documentation

◆ getLastPose()

template<class PARTICLE_TYPE, class PDF_TYPE, class CParticleList = typename PDF_TYPE::CParticleList>
virtual mrpt::math::TPose3D mrpt::slam::PF_implementation< PARTICLE_TYPE, PDF_TYPE, CParticleList >::getLastPose ( const size_t  i,
bool &  is_valid_pose 
) const
pure virtual

Return the last robot pose in the i'th particle; is_valid_pose will be false if there is no such last pose.

Exceptions
std::exceptionon out-of-range particle index

Implemented in mrpt::maps::CMultiMetricMapPDF, mrpt::slam::CMonteCarloLocalization2D, and mrpt::slam::CMonteCarloLocalization3D.

◆ PF_SLAM_computeObservationLikelihoodForParticle()

template<class PARTICLE_TYPE, class PDF_TYPE, class CParticleList = typename PDF_TYPE::CParticleList>
virtual double mrpt::slam::PF_implementation< PARTICLE_TYPE, PDF_TYPE, CParticleList >::PF_SLAM_computeObservationLikelihoodForParticle ( const mrpt::bayes::CParticleFilter::TParticleFilterOptions PF_options,
const size_t  particleIndexForMap,
const mrpt::obs::CSensoryFrame observation,
const mrpt::poses::CPose3D x 
) const
pure virtual

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

Implemented in mrpt::maps::CMultiMetricMapPDF, mrpt::slam::CMonteCarloLocalization2D, and mrpt::slam::CMonteCarloLocalization3D.

◆ PF_SLAM_implementation_custom_update_particle_with_new_pose()

template<class PARTICLE_TYPE, class PDF_TYPE, class CParticleList = typename PDF_TYPE::CParticleList>
virtual void mrpt::slam::PF_implementation< PARTICLE_TYPE, PDF_TYPE, CParticleList >::PF_SLAM_implementation_custom_update_particle_with_new_pose ( PARTICLE_TYPE *  particleData,
const mrpt::math::TPose3D newPose 
) const
pure virtual

◆ PF_SLAM_implementation_doWeHaveValidObservations()

template<class PARTICLE_TYPE, class PDF_TYPE, class CParticleList = typename PDF_TYPE::CParticleList>
virtual bool mrpt::slam::PF_implementation< PARTICLE_TYPE, PDF_TYPE, CParticleList >::PF_SLAM_implementation_doWeHaveValidObservations ( const typename mrpt::bayes::CParticleFilterData< PARTICLE_TYPE >::CParticleList &  particles,
const mrpt::obs::CSensoryFrame sf 
) const
inlinevirtual

Definition at line 179 of file PF_implementations_data.h.

◆ PF_SLAM_implementation_replaceByNewParticleSet()

template<class PARTICLE_TYPE, class PDF_TYPE, class CParticleList = typename PDF_TYPE::CParticleList>
virtual void mrpt::slam::PF_implementation< PARTICLE_TYPE, PDF_TYPE, CParticleList >::PF_SLAM_implementation_replaceByNewParticleSet ( CParticleList &  old_particles,
const std::vector< mrpt::math::TPose3D > &  newParticles,
const std::vector< double > &  newParticlesWeight,
const std::vector< size_t > &  newParticlesDerivedFromIdx 
) const
inlinevirtual

This is the default algorithm to efficiently replace one old set of samples by another new set.

The method uses pointers to make fast copies the first time each particle is duplicated, then makes real copies for the next ones.

Note that more efficient specializations might exist for specific particle data structs.

Definition at line 105 of file PF_implementations_data.h.

◆ PF_SLAM_implementation_skipRobotMovement()

template<class PARTICLE_TYPE, class PDF_TYPE, class CParticleList = typename PDF_TYPE::CParticleList>
virtual bool mrpt::slam::PF_implementation< PARTICLE_TYPE, PDF_TYPE, CParticleList >::PF_SLAM_implementation_skipRobotMovement ( ) const
inlinevirtual

Make a specialization if needed, eg.

in the first step in SLAM.

Reimplemented in mrpt::maps::CMultiMetricMapPDF.

Definition at line 190 of file PF_implementations_data.h.

◆ PF_SLAM_particlesEvaluator_AuxPFStandard()

template<class PARTICLE_TYPE, class PDF_TYPE, class CParticleList = typename PDF_TYPE::CParticleList>
template<class BINTYPE >
static double mrpt::slam::PF_implementation< PARTICLE_TYPE, PDF_TYPE, CParticleList >::PF_SLAM_particlesEvaluator_AuxPFStandard ( const mrpt::bayes::CParticleFilter::TParticleFilterOptions PF_options,
const mrpt::bayes::CParticleFilterCapable obj,
size_t  index,
const void action,
const void observation 
)
static

Compute w[i]*p(z_t | mu_t^i), with mu_t^i being the mean of the new robot pose.

Parameters
actionMUST be a "const CPose3D*"
observationMUST be a "const CSensoryFrame*"

Member Data Documentation

◆ m_accumRobotMovement2D

template<class PARTICLE_TYPE, class PDF_TYPE, class CParticleList = typename PDF_TYPE::CParticleList>
mrpt::obs::CActionRobotMovement2D mrpt::slam::PF_implementation< PARTICLE_TYPE, PDF_TYPE, CParticleList >::m_accumRobotMovement2D

Definition at line 48 of file PF_implementations_data.h.

◆ m_accumRobotMovement2DIsValid

template<class PARTICLE_TYPE, class PDF_TYPE, class CParticleList = typename PDF_TYPE::CParticleList>
bool mrpt::slam::PF_implementation< PARTICLE_TYPE, PDF_TYPE, CParticleList >::m_accumRobotMovement2DIsValid = false

Definition at line 49 of file PF_implementations_data.h.

◆ m_accumRobotMovement3D

template<class PARTICLE_TYPE, class PDF_TYPE, class CParticleList = typename PDF_TYPE::CParticleList>
mrpt::poses::CPose3DPDFGaussian mrpt::slam::PF_implementation< PARTICLE_TYPE, PDF_TYPE, CParticleList >::m_accumRobotMovement3D

Definition at line 50 of file PF_implementations_data.h.

◆ m_accumRobotMovement3DIsValid

template<class PARTICLE_TYPE, class PDF_TYPE, class CParticleList = typename PDF_TYPE::CParticleList>
bool mrpt::slam::PF_implementation< PARTICLE_TYPE, PDF_TYPE, CParticleList >::m_accumRobotMovement3DIsValid = false

Definition at line 51 of file PF_implementations_data.h.

◆ m_movementDrawer

template<class PARTICLE_TYPE, class PDF_TYPE, class CParticleList = typename PDF_TYPE::CParticleList>
mrpt::poses::CPoseRandomSampler mrpt::slam::PF_implementation< PARTICLE_TYPE, PDF_TYPE, CParticleList >::m_movementDrawer

Used in al PF implementations.

See also
PF_SLAM_implementation_gatherActionsCheckBothActObs

Definition at line 55 of file PF_implementations_data.h.

◆ m_pfAuxiliaryPFOptimal_estimatedProb

template<class PARTICLE_TYPE, class PDF_TYPE, class CParticleList = typename PDF_TYPE::CParticleList>
mrpt::math::CVectorDouble mrpt::slam::PF_implementation< PARTICLE_TYPE, PDF_TYPE, CParticleList >::m_pfAuxiliaryPFOptimal_estimatedProb
mutable

Auxiliary variable used in the "pfAuxiliaryPFOptimal" algorithm.

Definition at line 57 of file PF_implementations_data.h.

◆ m_pfAuxiliaryPFOptimal_maxLikDrawnMovement

template<class PARTICLE_TYPE, class PDF_TYPE, class CParticleList = typename PDF_TYPE::CParticleList>
std::vector<mrpt::math::TPose3D> mrpt::slam::PF_implementation< PARTICLE_TYPE, PDF_TYPE, CParticleList >::m_pfAuxiliaryPFOptimal_maxLikDrawnMovement
mutable

Auxiliary variable used in the "pfAuxiliaryPFOptimal" algorithm.

Definition at line 64 of file PF_implementations_data.h.

◆ m_pfAuxiliaryPFOptimal_maxLikelihood

template<class PARTICLE_TYPE, class PDF_TYPE, class CParticleList = typename PDF_TYPE::CParticleList>
mrpt::math::CVectorDouble mrpt::slam::PF_implementation< PARTICLE_TYPE, PDF_TYPE, CParticleList >::m_pfAuxiliaryPFOptimal_maxLikelihood
mutable

Auxiliary variable used in the "pfAuxiliaryPFOptimal" algorithm.

Definition at line 61 of file PF_implementations_data.h.

◆ m_pfAuxiliaryPFOptimal_maxLikMovementDrawHasBeenUsed

template<class PARTICLE_TYPE, class PDF_TYPE, class CParticleList = typename PDF_TYPE::CParticleList>
std::vector<bool> mrpt::slam::PF_implementation< PARTICLE_TYPE, PDF_TYPE, CParticleList >::m_pfAuxiliaryPFOptimal_maxLikMovementDrawHasBeenUsed

Definition at line 65 of file PF_implementations_data.h.

◆ m_pfAuxiliaryPFStandard_estimatedProb

template<class PARTICLE_TYPE, class PDF_TYPE, class CParticleList = typename PDF_TYPE::CParticleList>
mrpt::math::CVectorDouble mrpt::slam::PF_implementation< PARTICLE_TYPE, PDF_TYPE, CParticleList >::m_pfAuxiliaryPFStandard_estimatedProb
mutable

Auxiliary variable used in the "pfAuxiliaryPFStandard" algorithm.

Definition at line 59 of file PF_implementations_data.h.




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019