Main MRPT website > C++ reference for MRPT 1.4.0
CTopLCDetectorBase.h
Go to the documentation of this file.
1/* +---------------------------------------------------------------------------+
2 | Mobile Robot Programming Toolkit (MRPT) |
3 | http://www.mrpt.org/ |
4 | |
5 | Copyright (c) 2005-2016, Individual contributors, see AUTHORS file |
6 | See: http://www.mrpt.org/Authors - All rights reserved. |
7 | Released under BSD License. See details in http://www.mrpt.org/License |
8 +---------------------------------------------------------------------------+ */
9#ifndef _CTopLCDetectorBase_H
10#define _CTopLCDetectorBase_H
11
13
16
17
18namespace mrpt
19{
20 namespace hmtslam
21 {
22 /** The virtual base class for Topological Loop-closure Detectors; used in HMT-SLAM
23 * \sa mrpt::slam::CHMTSLAM
24 * \ingroup mrpt_hmtslam_grp
25 */
27 {
28 protected:
30
31 /** Instances can be generated through a class factory only */
32 CTopLCDetectorBase( CHMTSLAM *htmslam_obj ) : m_hmtslam(htmslam_obj) { }
33
34 public:
35 /** A class factory, to be implemented in derived classes. */
36 //static CTopLCDetectorBase* createNewInstance();
37
38 /** Destructor */
39 virtual ~CTopLCDetectorBase() { }
40
41 /** Reset the internal state of the TLCD, if any.
42 * This is needed since the objects are created while loading HMT-SLAM options, but the algorithm may be re-started after that at any time.
43 */
44 virtual void reset() {
45 // By default, do nothing.
46 }
47
48 /** This method must compute the topological observation model.
49 * \param out_log_lik The output, a log-likelihood.
50 * \return NULL (an empty smart pointer), or a PDF of the estimated translation between the two areas (can be a multi-modal PDF).
51 */
53 const THypothesisID &hypID,
54 const CHMHMapNodePtr &currentArea,
55 const CHMHMapNodePtr &refArea,
56 double &out_log_lik
57 ) = 0;
58
59 /** If implemented, this method provides the evaluation of an additional term to be added to the SSO between each pair of observations.
60 * \param out_SSO The output, in the range [0,1].
61 * \return true if computed SSO is meaningful. The default virtual method returns false.
62 */
64 const THypothesisID &hypID,
65 const TPoseID &poseID1,
66 const TPoseID &poseID2,
67 double &out_SSO
68 )
69 {
70 MRPT_UNUSED_PARAM(hypID); MRPT_UNUSED_PARAM(poseID1);
71 MRPT_UNUSED_PARAM(poseID2); MRPT_UNUSED_PARAM(out_SSO);
72 return false;
73 }
74
75 /** Hook method for being warned about the insertion of a new poses into the maps.
76 * This should be independent of hypothesis IDs.
77 */
78 virtual void OnNewPose(
79 const TPoseID &poseID,
80 const mrpt::obs::CSensoryFrame *SF )
81 {
83 }
84
85 }; // end class
86
88
89 } // end namespace
90} // end namespace
91#endif
An implementation of Hybrid Metric Topological SLAM (HMT-SLAM).
Definition: CHMTSLAM.h:60
The virtual base class for Topological Loop-closure Detectors; used in HMT-SLAM.
virtual mrpt::poses::CPose3DPDFPtr computeTopologicalObservationModel(const THypothesisID &hypID, const CHMHMapNodePtr &currentArea, const CHMHMapNodePtr &refArea, double &out_log_lik)=0
This method must compute the topological observation model.
CTopLCDetectorBase(CHMTSLAM *htmslam_obj)
Instances can be generated through a class factory only.
virtual void reset()
Reset the internal state of the TLCD, if any.
virtual void OnNewPose(const TPoseID &poseID, const mrpt::obs::CSensoryFrame *SF)
Hook method for being warned about the insertion of a new poses into the maps.
virtual ~CTopLCDetectorBase()
A class factory, to be implemented in derived classes.
virtual bool computeSSOBetweenObservations(const THypothesisID &hypID, const TPoseID &poseID1, const TPoseID &poseID2, double &out_SSO)
If implemented, this method provides the evaluation of an additional term to be added to the SSO betw...
Declares a class for storing a "sensory frame", a set of "observations" taken by the robot approximat...
#define HMTSLAM_IMPEXP
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
Definition: mrpt_macros.h:290
stlplus::smart_ptr< CTopLCDetectorBase > CTopLCDetectorBasePtr
int64_t THypothesisID
An integer number uniquely identifying each of the concurrent hypotheses for the robot topological pa...
uint64_t TPoseID
An integer number uniquely identifying each robot pose stored in HMT-SLAM.
struct BASE_IMPEXP CPose3DPDFPtr
Definition: CPose3DPDF.h:23
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.



Page generated by Doxygen 1.9.5 for MRPT 1.4.0 SVN: at Sun Nov 27 02:47:40 UTC 2022