Main MRPT website
>
C++ reference
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
mrpt
opengl
CEllipsoidInverseDepth3D.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 opengl_CEllipsoidInverseDepth3D_H
29
#define opengl_CEllipsoidInverseDepth3D_H
30
31
#include <
mrpt/opengl/CGeneralizedEllipsoidTemplate.h
>
32
33
namespace
mrpt
34
{
35
namespace
opengl
36
{
37
// This must be added to any CSerializable derived class:
38
DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE
(
CEllipsoidInverseDepth3D
,
CRenderizableDisplayList
,
OPENGL_IMPEXP
)
39
40
/** An especial "ellipsoid" in 3D computed as the uncertainty iso-surfaces of a (inv_range,yaw,pitch) variable.
41
* The parameter space of this ellipsoid comprises these variables (in this order):
42
* - inv_range: The inverse distance from the sensor to the feature.
43
* - yaw: Angle for the rotation around +Z ("azimuth").
44
* - pitch: Angle for the rotation around +Y ("elevation"). Positive means pointing below the XY plane.
45
*
46
* This parameterization is based on the paper:
47
* - Civera, J. and Davison, A.J. and Montiel, J., "Inverse depth parametrization for monocular SLAM", T-RO, 2008.
48
*
49
* This class expects you to provide a mean vector of length 3 and a 3x3 covariance matrix, set with \a setCovMatrixAndMean().
50
*
51
* Please read the documentation of CGeneralizedEllipsoidTemplate::setQuantiles() for learning
52
* the mathematical details about setting the desired confidence interval.
53
*
54
* <div align="center">
55
* <table border="0" cellspan="4" cellspacing="4" style="border-width: 1px; border-style: solid;">
56
* <tr> <td> mrpt::opengl::CEllipsoidInverseDepth3D </td> <td> \image html preview_CEllipsoidInverseDepth3D.png </td> </tr>
57
* </table>
58
* </div>
59
*
60
*
61
* \ingroup mrpt_opengl_grp
62
*/
63
class
OPENGL_IMPEXP
CEllipsoidInverseDepth3D
: public
CGeneralizedEllipsoidTemplate
<3>
64
{
65
typedef
CGeneralizedEllipsoidTemplate<3>
BASE
;
66
DEFINE_SERIALIZABLE
(
CEllipsoidInverseDepth3D
)
67
68
public:
69
/** The maximum range to be used as a correction when a point of the ellipsoid falls in the negative ranges (default: 1e6) */
70
void
setUnderflowMaxRange(const
double
maxRange) { m_underflowMaxRange = maxRange; }
71
double
getUnderflowMaxRange
()
const
{
return
m_underflowMaxRange; }
72
73
protected
:
74
/** To be implemented by derived classes: maps, using some arbitrary space transformation, a list of points
75
* defining an ellipsoid in parameter space into their corresponding points in 2D/3D space.
76
*/
77
virtual
void
transformFromParameterSpace(
78
const
std::vector<BASE::array_parameter_t> &in_pts,
79
std::vector<BASE::array_point_t> & out_pts)
const
;
80
private
:
81
double
m_underflowMaxRange
;
82
83
/** Constructor
84
*/
85
CEllipsoidInverseDepth3D
() : m_underflowMaxRange(1e6)
86
{
87
}
88
/** Private, virtual destructor: only can be deleted from smart pointers */
89
virtual
~CEllipsoidInverseDepth3D
() { }
90
};
91
92
}
// end namespace
93
94
}
// End of namespace
95
96
#endif
Page generated by
Doxygen 1.8.3
for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013