Main MRPT website > C++ reference for MRPT 1.9.9
CHeightGridMap2D_Base.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-2018, 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 
10 #ifndef CHeightGridMap2D_Base_H
11 #define CHeightGridMap2D_Base_H
12 
13 #include <mrpt/obs/CObservation.h>
15 
16 namespace mrpt
17 {
18 namespace maps
19 {
20 /** Virtual base class for Digital Elevation Model (DEM) maps. See derived
21  * classes for details.
22  * This class implements those operations which are especific to DEMs.
23  * \ingroup mrpt_maps_grp */
25 {
26  public:
28  virtual ~CHeightGridMap2D_Base();
29 
30  /** @name Specific API for Digital Elevation Model (DEM) maps
31  @{ */
32  /** Gets the intersection between a 3D line and a Height Grid map (taking
33  * into account the different heights of each individual cell) */
34  bool intersectLine3D(
36 
37  /** Computes the minimum and maximum height in the grid.
38  * \return False if there is no observed cell yet. */
39  bool getMinMaxHeight(float& z_min, float& z_max) const;
40 
41  /** Extra params for insertIndividualPoint() */
43  {
44  /** (Default:0.0) If !=0, use this value as the uncertainty (standard
45  * deviation) for the point "z" coordinate, instead of the map-wise
46  * default value. */
47  double pt_z_std;
48  /** (default: true) run any required operation to ensure the map
49  * reflects the changes caused by this point. Otherwise, calling
50  * dem_update_map() is required. */
52 
54  };
55  /** Update the DEM with one new point.
56  * \sa mrpt::maps::CMetricMap::insertObservation() for inserting
57  * higher-level objects like 2D/3D LIDAR scans
58  * \return true if updated OK, false if (x,y) is out of bounds */
59  virtual bool insertIndividualPoint(
60  const double x, const double y, const double z,
62 
63  virtual double dem_get_resolution() const = 0;
64  virtual size_t dem_get_size_x() const = 0;
65  virtual size_t dem_get_size_y() const = 0;
66  /** Get cell 'z' by (cx,cy) cell indices. \return false if out of bounds or
67  * un-observed cell. */
68  virtual bool dem_get_z_by_cell(
69  const size_t cx, const size_t cy, double& z_out) const = 0;
70  /** Get cell 'z' (x,y) by metric coordinates. \return false if out of bounds
71  * or un-observed cell. */
72  virtual bool dem_get_z(
73  const double x, const double y, double& z_out) const = 0;
74  /** Ensure that all observations are reflected in the map estimate */
75  virtual void dem_update_map() = 0;
76  /** @} */
77 
78  /** Internal method called by internal_insertObservation() */
80  const mrpt::obs::CObservation* obs,
81  const mrpt::poses::CPose3D* robotPose = nullptr);
82 };
83 } // End of namespace
84 } // End of namespace
85 #endif
mrpt::maps::CHeightGridMap2D_Base::~CHeightGridMap2D_Base
virtual ~CHeightGridMap2D_Base()
Definition: CHeightGridMap2D_Base.cpp:27
mrpt::maps::CHeightGridMap2D_Base::dem_get_size_x
virtual size_t dem_get_size_x() const =0
mrpt::maps::CHeightGridMap2D_Base::dem_update_map
virtual void dem_update_map()=0
Ensure that all observations are reflected in the map estimate.
mrpt::maps::CHeightGridMap2D_Base::TPointInsertParams
Extra params for insertIndividualPoint()
Definition: CHeightGridMap2D_Base.h:42
mrpt::maps::CHeightGridMap2D_Base
Virtual base class for Digital Elevation Model (DEM) maps.
Definition: CHeightGridMap2D_Base.h:24
obj
GLsizei GLsizei GLuint * obj
Definition: glext.h:4070
mrpt::math::TObject3D
Standard object for storing any 3D lightweight object.
Definition: lightweight_geom_data.h:1809
mrpt::maps::CHeightGridMap2D_Base::TPointInsertParams::update_map_after_insertion
bool update_map_after_insertion
(default: true) run any required operation to ensure the map reflects the changes caused by this poin...
Definition: CHeightGridMap2D_Base.h:51
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
mrpt::maps::CHeightGridMap2D_Base::CHeightGridMap2D_Base
CHeightGridMap2D_Base()
Definition: CHeightGridMap2D_Base.cpp:26
lightweight_geom_data.h
mrpt::maps::CHeightGridMap2D_Base::dem_get_resolution
virtual double dem_get_resolution() const =0
mrpt::maps::CHeightGridMap2D_Base::dem_get_size_y
virtual size_t dem_get_size_y() const =0
mrpt::maps::CHeightGridMap2D_Base::insertIndividualPoint
virtual bool insertIndividualPoint(const double x, const double y, const double z, const TPointInsertParams &params=TPointInsertParams())=0
Update the DEM with one new point.
mrpt::poses::CPose3D
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:88
mrpt::maps::CHeightGridMap2D_Base::TPointInsertParams::TPointInsertParams
TPointInsertParams()
Definition: CHeightGridMap2D_Base.cpp:21
mrpt::maps::CHeightGridMap2D_Base::getMinMaxHeight
bool getMinMaxHeight(float &z_min, float &z_max) const
Computes the minimum and maximum height in the grid.
Definition: CHeightGridMap2D_Base.cpp:28
mrpt::maps::CHeightGridMap2D_Base::TPointInsertParams::pt_z_std
double pt_z_std
(Default:0.0) If !=0, use this value as the uncertainty (standard deviation) for the point "z" coordi...
Definition: CHeightGridMap2D_Base.h:47
mrpt::maps::CHeightGridMap2D_Base::dem_internal_insertObservation
bool dem_internal_insertObservation(const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D *robotPose=nullptr)
Internal method called by internal_insertObservation()
Definition: CHeightGridMap2D_Base.cpp:128
mrpt::maps::CHeightGridMap2D_Base::dem_get_z_by_cell
virtual bool dem_get_z_by_cell(const size_t cx, const size_t cy, double &z_out) const =0
Get cell 'z' by (cx,cy) cell indices.
CObservation.h
mrpt::obs::CObservation
Declares a class that represents any robot's observation.
Definition: CObservation.h:43
z
GLdouble GLdouble z
Definition: glext.h:3872
mrpt::math::TLine3D
3D line, represented by a base point and a director vector.
Definition: lightweight_geom_data.h:1244
mrpt::maps::CHeightGridMap2D_Base::dem_get_z
virtual bool dem_get_z(const double x, const double y, double &z_out) const =0
Get cell 'z' (x,y) by metric coordinates.
mrpt::maps::CHeightGridMap2D_Base::intersectLine3D
bool intersectLine3D(const mrpt::math::TLine3D &r1, mrpt::math::TObject3D &obj) const
Gets the intersection between a 3D line and a Height Grid map (taking into account the different heig...
Definition: CHeightGridMap2D_Base.cpp:57
y
GLenum GLint GLint y
Definition: glext.h:3538
x
GLenum GLint x
Definition: glext.h:3538
params
GLenum const GLfloat * params
Definition: glext.h:3534



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST