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::maps
17 {
18 /** Virtual base class for Digital Elevation Model (DEM) maps. See derived
19  * classes for details.
20  * This class implements those operations which are especific to DEMs.
21  * \ingroup mrpt_maps_grp */
23 {
24  public:
26  virtual ~CHeightGridMap2D_Base();
27 
28  /** @name Specific API for Digital Elevation Model (DEM) maps
29  @{ */
30  /** Gets the intersection between a 3D line and a Height Grid map (taking
31  * into account the different heights of each individual cell) */
32  bool intersectLine3D(
34 
35  /** Computes the minimum and maximum height in the grid.
36  * \return False if there is no observed cell yet. */
37  bool getMinMaxHeight(float& z_min, float& z_max) const;
38 
39  /** Extra params for insertIndividualPoint() */
41  {
42  /** (Default:0.0) If !=0, use this value as the uncertainty (standard
43  * deviation) for the point "z" coordinate, instead of the map-wise
44  * default value. */
45  double pt_z_std;
46  /** (default: true) run any required operation to ensure the map
47  * reflects the changes caused by this point. Otherwise, calling
48  * dem_update_map() is required. */
50 
52  };
53  /** Update the DEM with one new point.
54  * \sa mrpt::maps::CMetricMap::insertObservation() for inserting
55  * higher-level objects like 2D/3D LIDAR scans
56  * \return true if updated OK, false if (x,y) is out of bounds */
57  virtual bool insertIndividualPoint(
58  const double x, const double y, const double z,
60 
61  virtual double dem_get_resolution() const = 0;
62  virtual size_t dem_get_size_x() const = 0;
63  virtual size_t dem_get_size_y() const = 0;
64  /** Get cell 'z' by (cx,cy) cell indices. \return false if out of bounds or
65  * un-observed cell. */
66  virtual bool dem_get_z_by_cell(
67  const size_t cx, const size_t cy, double& z_out) const = 0;
68  /** Get cell 'z' (x,y) by metric coordinates. \return false if out of bounds
69  * or un-observed cell. */
70  virtual bool dem_get_z(
71  const double x, const double y, double& z_out) const = 0;
72  /** Ensure that all observations are reflected in the map estimate */
73  virtual void dem_update_map() = 0;
74  /** @} */
75 
76  /** Internal method called by internal_insertObservation() */
78  const mrpt::obs::CObservation* obs,
79  const mrpt::poses::CPose3D* robotPose = nullptr);
80 };
81 }
82 #endif
83 
84 
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
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:86
Declares a class that represents any robot&#39;s observation.
Definition: CObservation.h:43
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: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020