This class is used in HMT-SLAM to represent each of the Local Metric Hypotheses (LMHs).
It has a set of particles representing the robot path in nearby poses.
Definition at line 75 of file CLocalMetricHypothesis.h.
#include <mrpt/hmtslam/CLocalMetricHypothesis.h>
Classes | |
struct | TRobotPosesPartitioning |
Used by AA thread. More... | |
Public Types | |
using | CParticleData = CLSLAMParticleDataParticles::CParticleData |
using | CParticleList = mrpt::bayes::CParticleFilterData< CLSLAMParticleData >::CParticleList |
Public Member Functions | |
void * | operator new (size_t size) |
void * | operator new[] (size_t size) |
void | operator delete (void *ptr) noexcept |
void | operator delete[] (void *ptr) noexcept |
void | operator delete (void *memory, void *ptr) noexcept |
void * | operator new (size_t size, const std::nothrow_t &) noexcept |
void | operator delete (void *ptr, const std::nothrow_t &) noexcept |
CLocalMetricHypothesis (CHMTSLAM *parent=nullptr) | |
Constructor (Default param only used from STL classes) More... | |
~CLocalMetricHypothesis () | |
Destructor. More... | |
MRPT_TODO ("Separate the serializable class from this code, so we don't have to " "worry about copying locks") struct ThreadLocks | |
void | getAs3DScene (mrpt::opengl::CSetOfObjects::Ptr &objs) const |
Returns a 3D representation of the the current robot pose, all the poses in the auxiliary graph, and each of the areas they belong to. More... | |
void | getMeans (TMapPoseID2Pose3D &outList) const |
Returns the mean of each robot pose in this LMH, as computed from the set of particles. More... | |
void | getPathParticles (std::map< TPoseID, mrpt::poses::CPose3DPDFParticles > &outList) const |
Returns the mean and covariance of each robot pose in this LMH, as computed from the set of particles. More... | |
void | getPoseParticles (const TPoseID &poseID, mrpt::poses::CPose3DPDFParticles &outPDF) const |
Returns the mean and covariance of each robot pose in this LMH, as computed from the set of particles. More... | |
void | getRelativePose (const TPoseID &reference, const TPoseID &pose, mrpt::poses::CPose3DPDFParticles &outPDF) const |
Returns the pose PDF of some pose relative to some other pose ID (both must be part of the the LMH). More... | |
void | dumpAsText (utils::CStringList &st) const |
Describes the LMH in text. More... | |
void | changeCoordinateOrigin (const TPoseID &newOrigin) |
Change all coordinates to set a given robot pose as the new coordinate origin, and rebuild metric maps and change coords in the partitioning subsystem as well. More... | |
void | rebuildMetricMaps () |
Rebuild the metric maps of all particles from the observations and their estimated poses. More... | |
void | clearRobotPoses () |
Rebuild the auxiliary metric maps in "m_robotPosesGraph" from the observations "m_SFs" and their estimated poses. More... | |
const mrpt::poses::CPose3D * | getCurrentPose (const size_t &particleIdx) const |
Returns the i'th particle hypothesis for the current robot pose. More... | |
mrpt::poses::CPose3D * | getCurrentPose (const size_t &particleIdx) |
Returns the i'th particle hypothesis for the current robot pose. More... | |
void | removeAreaFromLMH (const CHMHMapNode::TNodeID areaID) |
Removes a given area from the LMH: More... | |
void | updateAreaFromLMH (const CHMHMapNode::TNodeID areaID, bool eraseSFsFromLMH=false) |
The corresponding node in the HMT map is updated with the robot poses & SFs in the LMH: the poses are referenced to the area's reference poseID, such as that reference is at the origin. More... | |
template<> | |
void | prediction_and_update (const mrpt::obs::CActionCollection *actions, const mrpt::obs::CSensoryFrame *sf, const bayes::CParticleFilter::TParticleFilterOptions &PF_options) |
The PF algorithm implementation for "optimal sampling for non-parametric
observation models". More... | |
template<> | |
void | prediction_and_update (const mrpt::obs::CActionCollection *actions, const mrpt::obs::CSensoryFrame *sf, const bayes::CParticleFilter::TParticleFilterOptions &PF_options) |
The PF algorithm implementation for "optimal sampling" approximated with scan matching (Stachniss method) More... | |
virtual mxArray * | writeToMatlab () const |
Introduces a pure virtual method responsible for writing to a mxArray Matlab object, typically a MATLAB struct whose contents are documented in each derived class. More... | |
Virtual methods for Particle Filter implementation (just a wrapper | |
interface, actually implemented in CHMTSLAM::m_LSLAM_method) | |
template<class PF_ALGORITHM > | |
void | prediction_and_update (const mrpt::obs::CActionCollection *action, const mrpt::obs::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &PF_options) |
The PF algorithm implementation. More... | |
double | particlesEvaluator_AuxPFOptimal (const mrpt::bayes::CParticleFilter::TParticleFilterOptions &PF_options, size_t index, const mrpt::obs::CSensoryFrame *observation) |
Auxiliary function used in "prediction_and_update_pfAuxiliaryPFOptimal". More... | |
double | auxiliarComputeObservationLikelihood (const mrpt::bayes::CParticleFilter::TParticleFilterOptions &PF_options, size_t particleIndexForMap, const mrpt::obs::CSensoryFrame *observation, const mrpt::poses::CPose2D *x) |
Auxiliary function that evaluates the likelihood of an observation, given a robot pose, and according to the options in "CPosePDFParticles::options". More... | |
void | executeOn (mrpt::bayes::CParticleFilter &pf, const mrpt::obs::CActionCollection *action, const mrpt::obs::CSensoryFrame *observation, mrpt::bayes::CParticleFilter::TParticleFilterStats *stats, mrpt::bayes::CParticleFilter::TParticleFilterAlgorithm PF_algorithm) |
RTTI classes and functions | |
mrpt::utils::CObject::Ptr | duplicateGetSmartPtr () const |
Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer). More... | |
Static Public Member Functions | |
static void * | operator new (size_t size, void *ptr) |
Public Attributes | |
CLSLAMParticleDataParticles | m_poseParticles |
threadLocks | |
THypothesisID | m_ID |
The unique ID of the hypothesis (Used for accessing mrpt::slam::CHierarchicalMHMap). More... | |
mrpt::utils::safe_ptr< CHMTSLAM > | m_parent |
For quick access to our parent object. More... | |
TPoseID | m_currentRobotPose |
The current robot pose (its global unique ID) for this hypothesis. More... | |
TNodeIDSet | m_neighbors |
The list of all areas sourronding the current one (this includes the current area itself). More... | |
std::map< TPoseID, CHMHMapNode::TNodeID > | m_nodeIDmemberships |
The hybrid map node membership for each robot pose. More... | |
std::map< TPoseID, mrpt::obs::CSensoryFrame > | m_SFs |
The SF gathered at each robot pose. More... | |
TPoseIDList | m_posesPendingAddPartitioner |
The list of poseIDs waiting to be added to the graph partitioner, what happens in the LSLAM thread main loop. More... | |
TNodeIDList | m_areasPendingTBI |
The list of area IDs waiting to be processed by the TBI (topological bayesian inference) engines to search for potential loop-closures. More... | |
double | m_log_w |
Log-weight of this hypothesis. More... | |
std::vector< std::map< TPoseID, double > > | m_log_w_metric_history |
The historic log-weights of the metric observations inserted in this LMH, for each particle. More... | |
mrpt::obs::CActionRobotMovement2D | m_accumRobotMovement |
Used in CLSLAM_RBPF_2DLASER. More... | |
bool | m_accumRobotMovementIsValid |
Used in CLSLAM_RBPF_2DLASER. More... | |
struct mrpt::hmtslam::CLocalMetricHypothesis::TRobotPosesPartitioning | m_robotPosesGraph |
Protected Member Functions | |
CSerializable virtual methods | |
void | writeToStream (mrpt::utils::CStream &out, int *getVersion) const override |
Introduces a pure virtual method responsible for writing to a CStream. More... | |
void | readFromStream (mrpt::utils::CStream &in, int version) override |
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori. More... | |
Protected Attributes | |
mrpt::math::CVectorDouble | m_pfAuxiliaryPFOptimal_estimatedProb |
Auxiliary variable used in the "pfAuxiliaryPFOptimal" algorithm. More... | |
std::vector< double > | m_maxLikelihood |
Auxiliary variable used in the "pfAuxiliaryPFOptimal" algorithm. More... | |
unsigned int | m_movementDrawsIdx |
Auxiliary variable used in the "pfAuxiliaryPFOptimal" algorithm. More... | |
mrpt::poses::StdVector_CPose2D | m_movementDraws |
Auxiliary variable used in the "pfAuxiliaryPFOptimal" algorithm. More... | |
mrpt::poses::StdVector_CPose2D | m_movementDrawMaximumLikelihood |
Auxiliary variable used in the "pfAuxiliaryPFOptimal" algorithm. More... | |
Friends | |
class | CLSLAM_RBPF_2DLASER |
RTTI stuff | |
using | Ptr = std::shared_ptr< CLocalMetricHypothesis > |
using | ConstPtr = std::shared_ptr< const CLocalMetricHypothesis > |
static mrpt::utils::CLASSINIT | _init_CLocalMetricHypothesis |
static const mrpt::utils::TRuntimeClassId | runtimeClassId |
static constexpr const char * | className = "CLocalMetricHypothesis" |
static const mrpt::utils::TRuntimeClassId * | _GetBaseClass () |
static const mrpt::utils::TRuntimeClassId & | GetRuntimeClassIdStatic () |
static mrpt::utils::CObject * | CreateObject () |
template<typename... Args> | |
static Ptr | Create (Args &&... args) |
virtual const mrpt::utils::TRuntimeClassId * | GetRuntimeClass () const override |
Returns information about the class of an object in runtime. More... | |
virtual mrpt::utils::CObject * | clone () const override |
Returns a deep copy (clone) of the object, indepently of its class. More... | |
using mrpt::hmtslam::CLocalMetricHypothesis::ConstPtr = std::shared_ptr<const CLocalMetricHypothesis > |
Definition at line 79 of file CLocalMetricHypothesis.h.
using mrpt::hmtslam::CLocalMetricHypothesis::CParticleData = CLSLAMParticleDataParticles::CParticleData |
Definition at line 82 of file CLocalMetricHypothesis.h.
using mrpt::hmtslam::CLocalMetricHypothesis::CParticleList = mrpt::bayes::CParticleFilterData<CLSLAMParticleData>::CParticleList |
Definition at line 84 of file CLocalMetricHypothesis.h.
using mrpt::hmtslam::CLocalMetricHypothesis::Ptr = std::shared_ptr< CLocalMetricHypothesis > |
A typedef for the associated smart pointer
Definition at line 79 of file CLocalMetricHypothesis.h.
CLocalMetricHypothesis::CLocalMetricHypothesis | ( | CHMTSLAM * | parent = nullptr | ) |
Constructor (Default param only used from STL classes)
Definition at line 42 of file CLocalMetricHypothesis.cpp.
CLocalMetricHypothesis::~CLocalMetricHypothesis | ( | ) |
Destructor.
Definition at line 53 of file CLocalMetricHypothesis.cpp.
|
staticprotected |
double mrpt::hmtslam::CLocalMetricHypothesis::auxiliarComputeObservationLikelihood | ( | const mrpt::bayes::CParticleFilter::TParticleFilterOptions & | PF_options, |
size_t | particleIndexForMap, | ||
const mrpt::obs::CSensoryFrame * | observation, | ||
const mrpt::poses::CPose2D * | x | ||
) |
Auxiliary function that evaluates the likelihood of an observation, given a robot pose, and according to the options in "CPosePDFParticles::options".
Definition at line 718 of file CHMTSLAM_LSLAM_RBPF_2DLASER.cpp.
References mrpt::maps::CMetricMap::computeObservationsLikelihood(), mrpt::bayes::CParticleFilterData< T >::m_particles, m_poseParticles, and MRPT_UNUSED_PARAM.
Referenced by particlesEvaluator_AuxPFOptimal().
Change all coordinates to set a given robot pose as the new coordinate origin, and rebuild metric maps and change coords in the partitioning subsystem as well.
Definition at line 557 of file CLocalMetricHypothesis.cpp.
References ASSERT_, CLASS_ID, and mrpt::maps::CSimpleMap::get().
void CLocalMetricHypothesis::clearRobotPoses | ( | ) |
Rebuild the auxiliary metric maps in "m_robotPosesGraph" from the observations "m_SFs" and their estimated poses.
Sets the number of particles to the initial number according to the PF options, and initialize them with no robot poses & empty metric maps.
Definition at line 474 of file CLocalMetricHypothesis.cpp.
Referenced by mrpt::hmtslam::CHMTSLAM::initializeEmptyMap().
|
overridevirtual |
Returns a deep copy (clone) of the object, indepently of its class.
Implements mrpt::utils::CObject.
|
inlinestatic |
Definition at line 79 of file CLocalMetricHypothesis.h.
|
static |
void CLocalMetricHypothesis::dumpAsText | ( | utils::CStringList & | st | ) | const |
Describes the LMH in text.
Definition at line 900 of file CLocalMetricHypothesis.cpp.
References mrpt::utils::CStringList::clear(), mrpt::format(), and RAD2DEG.
void mrpt::hmtslam::CLocalMetricHypothesis::executeOn | ( | mrpt::bayes::CParticleFilter & | pf, |
const mrpt::obs::CActionCollection * | action, | ||
const mrpt::obs::CSensoryFrame * | observation, | ||
mrpt::bayes::CParticleFilter::TParticleFilterStats * | stats, | ||
mrpt::bayes::CParticleFilter::TParticleFilterAlgorithm | PF_algorithm | ||
) |
Definition at line 58 of file CHMTSLAM_LSLAM_RBPF_2DLASER.cpp.
References mrpt::bayes::CParticleFilter::executeOn(), and THROW_EXCEPTION.
Referenced by mrpt::hmtslam::CLSLAM_RBPF_2DLASER::processOneLMH().
void CLocalMetricHypothesis::getAs3DScene | ( | mrpt::opengl::CSetOfObjects::Ptr & | objs | ) | const |
Returns a 3D representation of the the current robot pose, all the poses in the auxiliary graph, and each of the areas they belong to.
The metric maps are not included here for convenience, call m_metricMaps.getAs3DScene(). The previous contents of "objs" will be discarded
Definition at line 61 of file CLocalMetricHypothesis.cpp.
References ASSERT_, mrpt::poses::CPose3DPDFGaussian::copyFrom(), mrpt::opengl::stock_objects::CornerXYZ(), mrpt::poses::CPose3DPDFGaussian::cov, mrpt::opengl::CArrow::Create(), mrpt::format(), mrpt::poses::CPose3DPDFGaussian::mean, NODE_ANNOTATION_REF_POSEID, mrpt::poses::CPose3D::pitch(), RAD2DEG, mrpt::opengl::stock_objects::RobotPioneer(), mrpt::poses::CPose3D::roll(), mrpt::poses::CPoseOrPoint< DERIVEDCLASS >::x(), mrpt::poses::CPoseOrPoint< DERIVEDCLASS >::y(), and mrpt::poses::CPose3D::yaw().
Referenced by mrpt::hmtslam::CHMTSLAM::generateLogFiles().
const CPose3D * CLocalMetricHypothesis::getCurrentPose | ( | const size_t & | particleIdx | ) | const |
Returns the i'th particle hypothesis for the current robot pose.
Definition at line 495 of file CLocalMetricHypothesis.cpp.
References ASSERT_, and THROW_EXCEPTION.
Referenced by particlesEvaluator_AuxPFOptimal().
CPose3D * CLocalMetricHypothesis::getCurrentPose | ( | const size_t & | particleIdx | ) |
Returns the i'th particle hypothesis for the current robot pose.
Definition at line 510 of file CLocalMetricHypothesis.cpp.
References ASSERT_, and THROW_EXCEPTION.
void CLocalMetricHypothesis::getMeans | ( | TMapPoseID2Pose3D & | outList | ) | const |
Returns the mean of each robot pose in this LMH, as computed from the set of particles.
Definition at line 393 of file CLocalMetricHypothesis.cpp.
References MRPT_END, and MRPT_START.
Referenced by mrpt::hmtslam::CLSLAM_RBPF_2DLASER::processOneLMH().
void CLocalMetricHypothesis::getPathParticles | ( | std::map< TPoseID, mrpt::poses::CPose3DPDFParticles > & | outList | ) | const |
Returns the mean and covariance of each robot pose in this LMH, as computed from the set of particles.
Definition at line 414 of file CLocalMetricHypothesis.cpp.
References MRPT_END, and MRPT_START.
void CLocalMetricHypothesis::getPoseParticles | ( | const TPoseID & | poseID, |
mrpt::poses::CPose3DPDFParticles & | outPDF | ||
) | const |
Returns the mean and covariance of each robot pose in this LMH, as computed from the set of particles.
Definition at line 448 of file CLocalMetricHypothesis.cpp.
References ASSERT_, mrpt::bayes::CParticleFilterData< T >::m_particles, MRPT_END, MRPT_START, mrpt::poses::CPose3DPDFParticles::resetDeterministic(), and mrpt::poses::CPose3D::size().
Referenced by mrpt::hmtslam::CHMTSLAM::areaAbstraction(), and mrpt::hmtslam::CHMTSLAM::perform_TLC().
void CLocalMetricHypothesis::getRelativePose | ( | const TPoseID & | reference, |
const TPoseID & | pose, | ||
mrpt::poses::CPose3DPDFParticles & | outPDF | ||
) | const |
Returns the pose PDF of some pose relative to some other pose ID (both must be part of the the LMH).
Definition at line 524 of file CLocalMetricHypothesis.cpp.
References ASSERT_, mrpt::bayes::CParticleFilterData< T >::m_particles, MRPT_END, MRPT_START, mrpt::poses::CPose3DPDFParticles::resetDeterministic(), and mrpt::poses::CPose3D::size().
|
overridevirtual |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::utils::CSerializable.
|
static |
|
inline |
Definition at line 94 of file CLocalMetricHypothesis.h.
Definition at line 79 of file CLocalMetricHypothesis.h.
|
inlinenoexcept |
Definition at line 79 of file CLocalMetricHypothesis.h.
|
inlinenoexcept |
Definition at line 79 of file CLocalMetricHypothesis.h.
Definition at line 79 of file CLocalMetricHypothesis.h.
|
inlinestatic |
Definition at line 79 of file CLocalMetricHypothesis.h.
|
inlinenoexcept |
Definition at line 79 of file CLocalMetricHypothesis.h.
|
inline |
Definition at line 79 of file CLocalMetricHypothesis.h.
|
inline |
Definition at line 79 of file CLocalMetricHypothesis.h.
double mrpt::hmtslam::CLocalMetricHypothesis::particlesEvaluator_AuxPFOptimal | ( | const mrpt::bayes::CParticleFilter::TParticleFilterOptions & | PF_options, |
size_t | index, | ||
const mrpt::obs::CSensoryFrame * | observation | ||
) |
Auxiliary function used in "prediction_and_update_pfAuxiliaryPFOptimal".
Definition at line 630 of file CHMTSLAM_LSLAM_RBPF_2DLASER.cpp.
References ASSERT_, auxiliarComputeObservationLikelihood(), getCurrentPose(), m_maxLikelihood, m_movementDrawMaximumLikelihood, m_movementDraws, m_movementDrawsIdx, mrpt::bayes::CParticleFilterData< T >::m_particles, m_pfAuxiliaryPFOptimal_estimatedProb, m_poseParticles, mrpt::math::maximum(), MRPT_CHECK_NORMAL_NUMBER, MRPT_END, MRPT_START, and mrpt::bayes::CParticleFilter::TParticleFilterOptions::pfAuxFilterOptimal_MaximumSearchSamples.
void mrpt::hmtslam::CLocalMetricHypothesis::prediction_and_update | ( | const mrpt::obs::CActionCollection * | action, |
const mrpt::obs::CSensoryFrame * | observation, | ||
const bayes::CParticleFilter::TParticleFilterOptions & | PF_options | ||
) |
The PF algorithm implementation.
Definition at line 19 of file CLocalMetricHypothesis_impl.h.
void mrpt::hmtslam::CLocalMetricHypothesis::prediction_and_update | ( | const mrpt::obs::CActionCollection * | actions, |
const mrpt::obs::CSensoryFrame * | sf, | ||
const bayes::CParticleFilter::TParticleFilterOptions & | PF_options | ||
) |
The PF algorithm implementation for "optimal sampling for non-parametric observation models".
Definition at line 279 of file CHMTSLAM_LSLAM_RBPF_2DLASER.cpp.
References ASSERT_, mrpt::poses::CPose2D::composeFrom(), mrpt::obs::CActionRobotMovement2D::computeFromOdometry(), mrpt::random::CRandomGenerator::drawUniform(), mrpt::obs::CActionRobotMovement2D::fastDrawSingleSample(), mrpt::random::getRandomGenerator(), mrpt::utils::keep_max(), mrpt::math::maximum(), mrpt::math::mean(), min, mrpt::math::minimum(), MRPT_END, MRPT_START, mrpt::obs::CActionRobotMovement2D::prepareFastDrawSingleSamples(), mrpt::poses::CPose2D::resize(), mrpt::poses::CPose3D::resize(), mrpt::utils::CTicTac::Tac(), THROW_EXCEPTION, and mrpt::utils::CTicTac::Tic().
void mrpt::hmtslam::CLocalMetricHypothesis::prediction_and_update | ( | const mrpt::obs::CActionCollection * | actions, |
const mrpt::obs::CSensoryFrame * | sf, | ||
const bayes::CParticleFilter::TParticleFilterOptions & | PF_options | ||
) |
The PF algorithm implementation for "optimal sampling" approximated with scan matching (Stachniss method)
Definition at line 830 of file CHMTSLAM_LSLAM_RBPF_2DLASER.cpp.
References mrpt::slam::CICP::TConfigParams::ALFA, mrpt::slam::CMetricMapsAlignmentAlgorithm::Align(), ASSERT_, mrpt::maps::CMetricMap::clear(), mrpt::poses::CPose3D::composeFrom(), mrpt::poses::CPosePDFGaussian::copyFrom(), mrpt::bayes::CProbabilityParticle< T >::d, DEG2RAD, mrpt::slam::CICP::TConfigParams::doRANSAC, mrpt::poses::CPose3DPDFGaussian::drawSingleSample(), mrpt::maps::CPointsMap::insertionOptions, mrpt::bayes::CProbabilityParticle< T >::log_w, mrpt::slam::CICP::TConfigParams::maxIterations, mrpt::maps::CPointsMap::TInsertionOptions::minDistBetweenLaserPoints, MRPT_END, MRPT_START, mrpt::poses::CPoseOrPoint< DERIVEDCLASS >::norm(), mrpt::slam::CICP::TConfigParams::onlyClosestCorrespondences, mrpt::slam::CICP::options, mrpt::slam::CICP::TConfigParams::smallestThresholdDist, mrpt::math::square(), mrpt::slam::CICP::TConfigParams::thresholdAng, mrpt::slam::CICP::TConfigParams::thresholdDist, THROW_EXCEPTION, and mrpt::poses::CPose3D::yaw().
|
overrideprotectedvirtual |
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori.
in | The input binary stream where the object data must read from. |
version | The version of the object stored in the stream: use this version number in your code to know how to read the incoming data. |
std::exception | On any error, see CStream::ReadBuffer |
Implements mrpt::utils::CSerializable.
Definition at line 933 of file CLocalMetricHypothesis.cpp.
References MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION.
void CLocalMetricHypothesis::rebuildMetricMaps | ( | ) |
Rebuild the metric maps of all particles from the observations and their estimated poses.
Definition at line 614 of file CLocalMetricHypothesis.cpp.
References ASSERT_.
Referenced by mrpt::hmtslam::CHMTSLAM::perform_TLC().
void CLocalMetricHypothesis::removeAreaFromLMH | ( | const CHMHMapNode::TNodeID | areaID | ) |
Removes a given area from the LMH:
The weights of all particles are changed to remove the effects of the removed metric observations.
This method internally calls updateAreaFromLMH
Definition at line 651 of file CLocalMetricHypothesis.cpp.
References ASSERT_, mrpt::utils::list_searchable< T >::find(), mrpt::utils::list_searchable< T >::insert(), MRPT_CHECK_NORMAL_NUMBER, MRPT_END, and MRPT_START.
void CLocalMetricHypothesis::updateAreaFromLMH | ( | const CHMHMapNode::TNodeID | areaID, |
bool | eraseSFsFromLMH = false |
||
) |
The corresponding node in the HMT map is updated with the robot poses & SFs in the LMH: the poses are referenced to the area's reference poseID, such as that reference is at the origin.
If eraseSFsFromLMH=true, the sensoryframes are moved rather than copied to the area, and removed from the LMH.
Definition at line 790 of file CLocalMetricHypothesis.cpp.
References ASSERT_, mrpt::maps::CMetricMap::clear(), mrpt::poses::CPose3DPDFParticles::copyFrom(), mrpt::utils::list_searchable< T >::insert(), mrpt::poses::CPose3DPDFParticles::inverse(), mrpt::bayes::CParticleFilterData< T >::m_particles, mrpt::obs::CSensoryFrame::moveFrom(), NODE_ANNOTATION_METRIC_MAPS, NODE_ANNOTATION_POSES_GRAPH, NODE_ANNOTATION_REF_POSEID, mrpt::hmtslam::TPoseInfo::pdf, mrpt::hmtslam::TPoseInfo::sf, and mrpt::poses::CPose3DPDFParticles::size().
Referenced by mrpt::hmtslam::CHMTSLAM::generateLogFiles(), mrpt::hmtslam::CHMTSLAM::perform_TLC(), and mrpt::hmtslam::CHMTSLAM::TBI_main_method().
|
inlinevirtualinherited |
Introduces a pure virtual method responsible for writing to a mxArray
Matlab object, typically a MATLAB struct
whose contents are documented in each derived class.
mxArray
(caller is responsible of memory freeing) or nullptr is class does not support conversion to MATLAB. Definition at line 89 of file CSerializable.h.
|
overrideprotectedvirtual |
Introduces a pure virtual method responsible for writing to a CStream.
This can not be used directly be users, instead use "stream << object;" for writing it to a stream.
out | The output binary stream where object must be dumped. |
getVersion | If nullptr, the object must be dumped. If not, only the version of the object dump must be returned in this pointer. This enables the versioning of objects dumping and backward compatibility with previously stored data. |
std::exception | On any error, see CStream::WriteBuffer |
Implements mrpt::utils::CSerializable.
Definition at line 959 of file CLocalMetricHypothesis.cpp.
|
friend |
Definition at line 77 of file CLocalMetricHypothesis.h.
|
staticprotected |
Definition at line 79 of file CLocalMetricHypothesis.h.
|
static |
Definition at line 79 of file CLocalMetricHypothesis.h.
mrpt::obs::CActionRobotMovement2D mrpt::hmtslam::CLocalMetricHypothesis::m_accumRobotMovement |
Used in CLSLAM_RBPF_2DLASER.
Definition at line 138 of file CLocalMetricHypothesis.h.
bool mrpt::hmtslam::CLocalMetricHypothesis::m_accumRobotMovementIsValid |
Used in CLSLAM_RBPF_2DLASER.
Definition at line 140 of file CLocalMetricHypothesis.h.
TNodeIDList mrpt::hmtslam::CLocalMetricHypothesis::m_areasPendingTBI |
The list of area IDs waiting to be processed by the TBI (topological bayesian inference) engines to search for potential loop-closures.
Set in CHMTSLAM::LSLAM_process_message_from_AA, read in
Definition at line 127 of file CLocalMetricHypothesis.h.
TPoseID mrpt::hmtslam::CLocalMetricHypothesis::m_currentRobotPose |
The current robot pose (its global unique ID) for this hypothesis.
Definition at line 110 of file CLocalMetricHypothesis.h.
Referenced by mrpt::hmtslam::CHMTSLAM::initializeEmptyMap(), and mrpt::hmtslam::CLSLAM_RBPF_2DLASER::processOneLMH().
THypothesisID mrpt::hmtslam::CLocalMetricHypothesis::m_ID |
The unique ID of the hypothesis (Used for accessing mrpt::slam::CHierarchicalMHMap).
Definition at line 106 of file CLocalMetricHypothesis.h.
Referenced by mrpt::hmtslam::CHMTSLAM::areaAbstraction(), mrpt::hmtslam::CHMTSLAM::generateLogFiles(), mrpt::hmtslam::CHMTSLAM::initializeEmptyMap(), mrpt::hmtslam::CHMTSLAM::perform_TLC(), mrpt::hmtslam::CLSLAM_RBPF_2DLASER::processOneLMH(), and mrpt::hmtslam::CHMTSLAM::TBI_main_method().
double mrpt::hmtslam::CLocalMetricHypothesis::m_log_w |
Log-weight of this hypothesis.
Definition at line 130 of file CLocalMetricHypothesis.h.
Referenced by mrpt::hmtslam::CHMTSLAM::generateLogFiles(), and mrpt::hmtslam::CHMTSLAM::initializeEmptyMap().
std::vector<std::map<TPoseID, double> > mrpt::hmtslam::CLocalMetricHypothesis::m_log_w_metric_history |
The historic log-weights of the metric observations inserted in this LMH, for each particle.
Definition at line 133 of file CLocalMetricHypothesis.h.
|
protected |
Auxiliary variable used in the "pfAuxiliaryPFOptimal" algorithm.
Definition at line 297 of file CLocalMetricHypothesis.h.
Referenced by particlesEvaluator_AuxPFOptimal().
|
protected |
Auxiliary variable used in the "pfAuxiliaryPFOptimal" algorithm.
Definition at line 306 of file CLocalMetricHypothesis.h.
Referenced by particlesEvaluator_AuxPFOptimal().
|
protected |
Auxiliary variable used in the "pfAuxiliaryPFOptimal" algorithm.
Definition at line 303 of file CLocalMetricHypothesis.h.
Referenced by particlesEvaluator_AuxPFOptimal().
|
protected |
Auxiliary variable used in the "pfAuxiliaryPFOptimal" algorithm.
Definition at line 300 of file CLocalMetricHypothesis.h.
Referenced by particlesEvaluator_AuxPFOptimal().
TNodeIDSet mrpt::hmtslam::CLocalMetricHypothesis::m_neighbors |
The list of all areas sourronding the current one (this includes the current area itself).
Definition at line 116 of file CLocalMetricHypothesis.h.
Referenced by mrpt::hmtslam::CHMTSLAM::generateLogFiles(), mrpt::hmtslam::CHMTSLAM::initializeEmptyMap(), mrpt::hmtslam::CHMTSLAM::perform_TLC(), and mrpt::hmtslam::CHMTSLAM::TBI_main_method().
std::map<TPoseID, CHMHMapNode::TNodeID> mrpt::hmtslam::CLocalMetricHypothesis::m_nodeIDmemberships |
The hybrid map node membership for each robot pose.
Definition at line 118 of file CLocalMetricHypothesis.h.
Referenced by mrpt::hmtslam::CHMTSLAM::perform_TLC(), and mrpt::hmtslam::CLSLAM_RBPF_2DLASER::processOneLMH().
mrpt::utils::safe_ptr<CHMTSLAM> mrpt::hmtslam::CLocalMetricHypothesis::m_parent |
For quick access to our parent object.
Definition at line 108 of file CLocalMetricHypothesis.h.
Referenced by mrpt::hmtslam::CHMTSLAM::areaAbstraction(), mrpt::hmtslam::CHMTSLAM::initializeEmptyMap(), prediction_and_update(), and mrpt::hmtslam::CHMTSLAM::TBI_main_method().
|
protected |
Auxiliary variable used in the "pfAuxiliaryPFOptimal" algorithm.
Definition at line 293 of file CLocalMetricHypothesis.h.
Referenced by particlesEvaluator_AuxPFOptimal().
CLSLAMParticleDataParticles mrpt::hmtslam::CLocalMetricHypothesis::m_poseParticles |
TPoseIDList mrpt::hmtslam::CLocalMetricHypothesis::m_posesPendingAddPartitioner |
The list of poseIDs waiting to be added to the graph partitioner, what happens in the LSLAM thread main loop.
Definition at line 123 of file CLocalMetricHypothesis.h.
Referenced by mrpt::hmtslam::CHMTSLAM::perform_TLC(), and mrpt::hmtslam::CLSLAM_RBPF_2DLASER::processOneLMH().
struct mrpt::hmtslam::CLocalMetricHypothesis::TRobotPosesPartitioning mrpt::hmtslam::CLocalMetricHypothesis::m_robotPosesGraph |
std::map<TPoseID, mrpt::obs::CSensoryFrame> mrpt::hmtslam::CLocalMetricHypothesis::m_SFs |
The SF gathered at each robot pose.
Definition at line 120 of file CLocalMetricHypothesis.h.
Referenced by mrpt::hmtslam::CHMTSLAM::areaAbstraction(), mrpt::hmtslam::CHMTSLAM::perform_TLC(), and mrpt::hmtslam::CLSLAM_RBPF_2DLASER::processOneLMH().
|
staticprotected |
Definition at line 79 of file CLocalMetricHypothesis.h.
mrpt::hmtslam::CLocalMetricHypothesis::threadLocks |
Definition at line 103 of file CLocalMetricHypothesis.h.
Referenced by mrpt::hmtslam::CHMTSLAM::generateLogFiles().
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 |