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-2017, 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
virtual bool dem_get_z(const double x, const double y, double &z_out) const =0
Get cell &#39;z&#39; (x,y) by metric coordinates.
Extra params for insertIndividualPoint()
double pt_z_std
(Default:0.0) If !=0, use this value as the uncertainty (standard deviation) for the point "z" coordi...
virtual bool insertIndividualPoint(const double x, const double y, const double z, const TPointInsertParams &params=TPointInsertParams())=0
Update the DEM with one new point.
GLdouble GLdouble z
Definition: glext.h:3872
virtual bool dem_get_z_by_cell(const size_t cx, const size_t cy, double &z_out) const =0
Get cell &#39;z&#39; by (cx,cy) cell indices.
Standard object for storing any 3D lightweight object.
GLsizei GLsizei GLuint * obj
Definition: glext.h:4070
virtual void dem_update_map()=0
Ensure that all observations are reflected in the map estimate.
bool dem_internal_insertObservation(const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D *robotPose=nullptr)
Internal method called by internal_insertObservation()
bool update_map_after_insertion
(default: true) run any required operation to ensure the map reflects the changes caused by this poin...
virtual size_t dem_get_size_x() const =0
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:88
Declares a class that represents any robot&#39;s observation.
Definition: CObservation.h:41
Virtual base class for Digital Elevation Model (DEM) maps.
GLenum GLint GLint y
Definition: glext.h:3538
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...
GLenum GLint x
Definition: glext.h:3538
bool getMinMaxHeight(float &z_min, float &z_max) const
Computes the minimum and maximum height in the grid.
virtual double dem_get_resolution() const =0
GLenum const GLfloat * params
Definition: glext.h:3534
virtual size_t dem_get_size_y() const =0
3D line, represented by a base point and a director vector.



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019