MRPT  2.0.2
CEllipsoidInverseDepth3D.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
12 
13 namespace mrpt::opengl
14 {
15 /** An especial "ellipsoid" in 3D computed as the uncertainty iso-surfaces of a
16  * (inv_range,yaw,pitch) variable.
17  * The parameter space of this ellipsoid comprises these variables (in this
18  * order):
19  * - inv_range: The inverse distance from the sensor to the feature.
20  * - yaw: Angle for the rotation around +Z ("azimuth").
21  * - pitch: Angle for the rotation around +Y ("elevation"). Positive means
22  * pointing below the XY plane.
23  *
24  * This parameterization is based on the paper:
25  * - Civera, J. and Davison, A.J. and Montiel, J., "Inverse depth
26  * parametrization for monocular SLAM", T-RO, 2008.
27  *
28  * This class expects you to provide a mean vector of length 3 and a 3x3
29  * covariance matrix, set with \a setCovMatrixAndMean().
30  *
31  * Please read the documentation of
32  * CGeneralizedEllipsoidTemplate::setQuantiles() for learning
33  * the mathematical details about setting the desired confidence interval.
34  *
35  * <div align="center">
36  * <table border="0" cellspan="4" cellspacing="4" style="border-width: 1px;
37  * border-style: solid;">
38  * <tr> <td> mrpt::opengl::CEllipsoidInverseDepth3D </td> <td> \image html
39  * preview_CEllipsoidInverseDepth3D.png </td> </tr>
40  * </table>
41  * </div>
42  *
43  *
44  * \ingroup mrpt_opengl_grp
45  */
47  virtual public CRenderizable
48 {
51 
52  public:
53  /** The maximum range to be used as a correction when a point of the
54  * ellipsoid falls in the negative ranges (default: 1e6) */
55  void setUnderflowMaxRange(const float maxRange)
56  {
57  m_underflowMaxRange = maxRange;
58  }
59  float getUnderflowMaxRange() const { return m_underflowMaxRange; }
60 
61  protected:
62  /** To be implemented by derived classes: maps, using some arbitrary space
63  * transformation, a list of points
64  * defining an ellipsoid in parameter space into their corresponding
65  * points in 2D/3D space.
66  */
68  const std::vector<BASE::array_parameter_t>& in_pts,
69  std::vector<BASE::array_point_t>& out_pts) const override;
70 
71  private:
72  float m_underflowMaxRange = 1e6f;
73 
74  public:
75  /** Constructor
76  */
77  CEllipsoidInverseDepth3D() = default;
78  /** Private, virtual destructor: only can be deleted from smart pointers */
79  ~CEllipsoidInverseDepth3D() override = default;
80 };
81 
82 } // namespace mrpt::opengl
void transformFromParameterSpace(const std::vector< BASE::array_parameter_t > &in_pts, std::vector< BASE::array_point_t > &out_pts) const override
To be implemented by derived classes: maps, using some arbitrary space transformation, a list of points defining an ellipsoid in parameter space into their corresponding points in 2D/3D space.
The base class of 3D objects that can be directly rendered through OpenGL.
Definition: CRenderizable.h:48
An especial "ellipsoid" in 3D computed as the uncertainty iso-surfaces of a (inv_range,yaw,pitch) variable.
~CEllipsoidInverseDepth3D() override=default
Private, virtual destructor: only can be deleted from smart pointers.
CEllipsoidInverseDepth3D()=default
Constructor.
A class that generalizes the concept of an ellipsoid to arbitrary parameterizations of uncertainty sh...
The namespace for 3D scene representation and rendering.
Definition: CGlCanvasBase.h:13
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
void setUnderflowMaxRange(const float maxRange)
The maximum range to be used as a correction when a point of the ellipsoid falls in the negative rang...



Page generated by Doxygen 1.8.14 for MRPT 2.0.2 Git: 9b4fd2465 Mon May 4 16:59:08 2020 +0200 at lun may 4 17:26:07 CEST 2020