Main MRPT website
>
C++ reference
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
mrpt
hmtslam
CTopLCDetectorBase.h
Go to the documentation of this file.
1
/* +---------------------------------------------------------------------------+
2
| The Mobile Robot Programming Toolkit (MRPT) C++ library |
3
| |
4
| http://www.mrpt.org/ |
5
| |
6
| Copyright (C) 2005-2012 University of Malaga |
7
| |
8
| This software was written by the Machine Perception and Intelligent |
9
| Robotics Lab, University of Malaga (Spain). |
10
| Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> |
11
| |
12
| This file is part of the MRPT project. |
13
| |
14
| MRPT is free software: you can redistribute it and/or modify |
15
| it under the terms of the GNU General Public License as published by |
16
| the Free Software Foundation, either version 3 of the License, or |
17
| (at your option) any later version. |
18
| |
19
| MRPT is distributed in the hope that it will be useful, |
20
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
21
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22
| GNU General Public License for more details. |
23
| |
24
| You should have received a copy of the GNU General Public License |
25
| along with MRPT. If not, see <http://www.gnu.org/licenses/>. |
26
| |
27
+---------------------------------------------------------------------------+ */
28
#ifndef _CTopLCDetectorBase_H
29
#define _CTopLCDetectorBase_H
30
31
#include <
mrpt/hmtslam/HMT_SLAM_common.h
>
32
33
#include <
mrpt/poses/CPose3DPDF.h
>
34
#include <
mrpt/slam/CSensoryFrame.h
>
35
36
37
namespace
mrpt
38
{
39
namespace
hmtslam
40
{
41
using namespace
mrpt::slam;
42
43
/** The virtual base class for Topological Loop-closure Detectors; used in HMT-SLAM
44
* \sa mrpt::slam::CHMTSLAM
45
* \ingroup mrpt_hmtslam_grp
46
*/
47
class
HMTSLAM_IMPEXP
CTopLCDetectorBase
48
{
49
protected
:
50
CHMTSLAM
*
m_hmtslam
;
51
52
/** Instances can be generated through a class factory only */
53
CTopLCDetectorBase
(
CHMTSLAM
*htmslam_obj ) : m_hmtslam(htmslam_obj) { }
54
55
public
:
56
/** A class factory, to be implemented in derived classes. */
57
//static CTopLCDetectorBase* createNewInstance();
58
59
/** Destructor */
60
virtual
~CTopLCDetectorBase
() { }
61
62
/** Reset the internal state of the TLCD, if any.
63
* 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.
64
*/
65
virtual
void
reset
() {
66
// By default, do nothing.
67
}
68
69
/** This method must compute the topological observation model.
70
* \param out_log_lik The output, a log-likelihood.
71
* \return NULL (an empty smart pointer), or a PDF of the estimated translation between the two areas (can be a multi-modal PDF).
72
*/
73
virtual
CPose3DPDFPtr
computeTopologicalObservationModel(
74
const
THypothesisID
&hypID,
75
const
CHMHMapNodePtr
¤tArea,
76
const
CHMHMapNodePtr
&refArea,
77
double
&out_log_lik
78
) = 0;
79
80
/** If implemented, this method provides the evaluation of an additional term to be added to the SSO between each pair of observations.
81
* \param out_SSO The output, in the range [0,1].
82
* \return true if computed SSO is meaningful. The default virtual method returns false.
83
*/
84
virtual
bool
computeSSOBetweenObservations(
85
const
THypothesisID
&hypID,
86
const
TPoseID
&poseID1,
87
const
TPoseID
&poseID2,
88
double
&out_SSO
89
)
90
{
91
return
false
;
92
}
93
94
/** Hook method for being warned about the insertion of a new poses into the maps.
95
* This should be independent of hypothesis IDs.
96
*/
97
virtual
void
OnNewPose(
98
const
TPoseID
&poseID,
99
const
CSensoryFrame
*SF )
100
{ }
101
102
};
// end class
103
104
typedef
stlplus::smart_ptr<CTopLCDetectorBase>
CTopLCDetectorBasePtr
;
105
106
}
// end namespace
107
}
// end namespace
108
#endif
Page generated by
Doxygen 1.8.3
for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013