Main MRPT website > C++ reference
MRPT logo
CEllipsoidInverseDepth2D.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_CEllipsoidInverseDepth2D_H
29 #define opengl_CEllipsoidInverseDepth2D_H
30 
32 
33 namespace mrpt
34 {
35  namespace opengl
36  {
37  // This must be added to any CSerializable derived class:
39 
40  /** An especial "ellipsoid" in 3D computed as the uncertainty iso-surfaces of a (inv_range,yaw) 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  *
45  * This parameterization is a 2D version of that presented in the paper:
46  * - Civera, J. and Davison, A.J. and Montiel, J., "Inverse depth parametrization for monocular SLAM", T-RO, 2008.
47  *
48  * This class expects you to provide a mean vector of length 4 and a 4x4 covariance matrix, set with \a setCovMatrixAndMean().
49  *
50  * Please read the documentation of CGeneralizedEllipsoidTemplate::setQuantiles() for learning
51  * the mathematical details about setting the desired confidence interval.
52  *
53  * <div align="center">
54  * <table border="0" cellspan="4" cellspacing="4" style="border-width: 1px; border-style: solid;">
55  * <tr> <td> mrpt::opengl::CEllipsoidInverseDepth2D </td> <td> \image html preview_CEllipsoidInverseDepth2D.png </td> </tr>
56  * </table>
57  * </div>
58  *
59  * \ingroup mrpt_opengl_grp
60  */
62  {
65 
66  public:
67  /** The maximum range to be used as a correction when a point of the ellipsoid falls in the negative ranges (default: 1e6) */
68  void setUnderflowMaxRange(const double maxRange) { m_underflowMaxRange = maxRange; }
69  double getUnderflowMaxRange() const { return m_underflowMaxRange; }
70 
71 
72  protected:
73  /** To be implemented by derived classes: maps, using some arbitrary space transformation, a list of points
74  * defining an ellipsoid in parameter space into their corresponding points in 2D/3D space.
75  */
76  virtual void transformFromParameterSpace(
77  const std::vector<BASE::array_parameter_t> &in_pts,
78  std::vector<BASE::array_point_t> & out_pts) const;
79  private:
81 
82  /** Constructor
83  */
84  CEllipsoidInverseDepth2D() : m_underflowMaxRange(1e6)
85  {
86  }
87  /** Private, virtual destructor: only can be deleted from smart pointers */
89  };
90 
91  } // end namespace
92 
93 } // End of namespace
94 
95 #endif



Page generated by Doxygen 1.8.3 for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013