Main MRPT website > C++ reference for MRPT 1.9.9
List of all members | Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
mrpt::hmtslam::CLSLAM_RBPF_2DLASER Class Reference

Detailed Description

Implements a 2D local SLAM method based on a RBPF over an occupancy grid map.

This class is used internally in mrpt::slam::CHMTSLAM

Definition at line 548 of file CHMTSLAM.h.

#include <mrpt/hmtslam/CHMTSLAM.h>

Inheritance diagram for mrpt::hmtslam::CLSLAM_RBPF_2DLASER:
Inheritance graph

Classes

struct  TPathBin
 Auxiliary structure. More...
 

Public Member Functions

 CLSLAM_RBPF_2DLASER (CHMTSLAM *parent)
 Constructor. More...
 
virtual ~CLSLAM_RBPF_2DLASER ()
 Destructor. More...
 
void processOneLMH (CLocalMetricHypothesis *LMH, const mrpt::obs::CActionCollection::Ptr &act, const mrpt::obs::CSensoryFrame::Ptr &sf)
 Main entry point from HMT-SLAM: process some actions & observations. More...
 
template<class PF_ALGORITHM >
void prediction_and_update (CLocalMetricHypothesis *LMH, const mrpt::obs::CActionCollection *action, const mrpt::obs::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &PF_options)
 

Protected Member Functions

void loadTPathBinFromPath (TPathBin &outBin, TMapPoseID2Pose3D *path=nullptr, mrpt::poses::CPose2D *newPose=nullptr)
 Fills out a "TPathBin" variable, given a path hypotesis and (if not set to nullptr) a new pose appended at the end, using the KLD params in "options". More...
 
int findTPathBinIntoSet (TPathBin &desiredBin, std::deque< TPathBin > &theSet)
 Checks if a given "TPathBin" element is already into a set of them, and return its index (first one is 0), or -1 if not found. More...
 

Protected Attributes

bool m_insertNewRobotPose
 For use within PF callback methods. More...
 
mrpt::utils::safe_ptr< CHMTSLAMm_parent
 

Friends

class CLocalMetricHypothesis
 

Constructor & Destructor Documentation

◆ CLSLAM_RBPF_2DLASER()

mrpt::hmtslam::CLSLAM_RBPF_2DLASER::CLSLAM_RBPF_2DLASER ( CHMTSLAM parent)

Constructor.

Definition at line 88 of file CHMTSLAM_LSLAM_RBPF_2DLASER.cpp.

◆ ~CLSLAM_RBPF_2DLASER()

mrpt::hmtslam::CLSLAM_RBPF_2DLASER::~CLSLAM_RBPF_2DLASER ( )
virtual

Destructor.

Definition at line 93 of file CHMTSLAM_LSLAM_RBPF_2DLASER.cpp.

Member Function Documentation

◆ findTPathBinIntoSet()

int mrpt::hmtslam::CLSLAM_RBPF_2DLASER::findTPathBinIntoSet ( CLSLAM_RBPF_2DLASER::TPathBin desiredBin,
std::deque< TPathBin > &  theSet 
)
protected

Checks if a given "TPathBin" element is already into a set of them, and return its index (first one is 0), or -1 if not found.

Definition at line 808 of file CHMTSLAM_LSLAM_RBPF_2DLASER.cpp.

References mrpt::hmtslam::CLSLAM_RBPF_2DLASER::TPathBin::phi, mrpt::hmtslam::CLSLAM_RBPF_2DLASER::TPathBin::x, and mrpt::hmtslam::CLSLAM_RBPF_2DLASER::TPathBin::y.

◆ loadTPathBinFromPath()

void mrpt::hmtslam::CLSLAM_RBPF_2DLASER::loadTPathBinFromPath ( CLSLAM_RBPF_2DLASER::TPathBin outBin,
TMapPoseID2Pose3D path = nullptr,
mrpt::poses::CPose2D newPose = nullptr 
)
protected

Fills out a "TPathBin" variable, given a path hypotesis and (if not set to nullptr) a new pose appended at the end, using the KLD params in "options".

Definition at line 753 of file CHMTSLAM_LSLAM_RBPF_2DLASER.cpp.

References mrpt::hmtslam::CLSLAMAlgorithmBase::m_parent, mrpt::poses::CPose2D::phi(), mrpt::hmtslam::CLSLAM_RBPF_2DLASER::TPathBin::phi, mrpt::utils::round(), mrpt::poses::CPoseOrPoint< DERIVEDCLASS >::x(), mrpt::hmtslam::CLSLAM_RBPF_2DLASER::TPathBin::x, mrpt::poses::CPoseOrPoint< DERIVEDCLASS >::y(), and mrpt::hmtslam::CLSLAM_RBPF_2DLASER::TPathBin::y.

Here is the call graph for this function:

◆ prediction_and_update()

template<class PF_ALGORITHM >
void mrpt::hmtslam::CLSLAM_RBPF_2DLASER::prediction_and_update ( CLocalMetricHypothesis LMH,
const mrpt::obs::CActionCollection action,
const mrpt::obs::CSensoryFrame observation,
const bayes::CParticleFilter::TParticleFilterOptions PF_options 
)

◆ processOneLMH()

void mrpt::hmtslam::CLSLAM_RBPF_2DLASER::processOneLMH ( CLocalMetricHypothesis LMH,
const mrpt::obs::CActionCollection::Ptr act,
const mrpt::obs::CSensoryFrame::Ptr sf 
)
virtual

Main entry point from HMT-SLAM: process some actions & observations.

The passed action/observation will be deleted, so a copy must be made if necessary. This method must be in charge of updating the robot pose estimates and also to update the map when required.

Parameters
LMHThe local metric hypothesis which must be updated by this SLAM algorithm.
actThe action to process (or nullptr).
sfThe observations to process (or nullptr).

Implements mrpt::hmtslam::CLSLAMAlgorithmBase.

Definition at line 109 of file CHMTSLAM_LSLAM_RBPF_2DLASER.cpp.

References ASSERT_, mrpt::poses::CPoseOrPoint< DERIVEDCLASS >::distanceTo(), mrpt::hmtslam::CLocalMetricHypothesis::executeOn(), mrpt::hmtslam::CHMTSLAM::generatePoseID(), mrpt::hmtslam::CLocalMetricHypothesis::getMeans(), mrpt::hmtslam::CLocalMetricHypothesis::m_currentRobotPose, mrpt::hmtslam::CLocalMetricHypothesis::m_ID, m_insertNewRobotPose, mrpt::hmtslam::CLocalMetricHypothesis::m_nodeIDmemberships, mrpt::bayes::CParticleFilter::m_options, mrpt::hmtslam::CLSLAMAlgorithmBase::m_parent, mrpt::bayes::CParticleFilterData< T >::m_particles, mrpt::hmtslam::CLocalMetricHypothesis::m_poseParticles, mrpt::hmtslam::CLocalMetricHypothesis::m_posesPendingAddPartitioner, mrpt::hmtslam::CLocalMetricHypothesis::m_SFs, min, MRPT_END, MRPT_START, NODE_ANNOTATION_REF_POSEID, mrpt::bayes::CParticleFilter::TParticleFilterOptions::PF_algorithm, POSEID_INVALID, mrpt::math::wrapToPi(), and mrpt::poses::CPose3D::yaw().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ CLocalMetricHypothesis

friend class CLocalMetricHypothesis
friend

Definition at line 550 of file CHMTSLAM.h.

Member Data Documentation

◆ m_insertNewRobotPose

bool mrpt::hmtslam::CLSLAM_RBPF_2DLASER::m_insertNewRobotPose
protected

For use within PF callback methods.

Definition at line 586 of file CHMTSLAM.h.

Referenced by processOneLMH().

◆ m_parent

mrpt::utils::safe_ptr<CHMTSLAM> mrpt::hmtslam::CLSLAMAlgorithmBase::m_parent
protectedinherited

Definition at line 516 of file CHMTSLAM.h.

Referenced by loadTPathBinFromPath(), and processOneLMH().




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