MRPT  2.0.2
CHeightGridMap2D_Base.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 
10 #pragma once
11 
12 #include <mrpt/math/TLine3D.h>
13 #include <mrpt/math/TObject3D.h>
14 #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(
33  const mrpt::math::TLine3D& r1, mrpt::math::TObject3D& obj) const;
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{0.0};
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,
59  const TPointInsertParams& params = TPointInsertParams()) = 0;
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 } // namespace mrpt::maps
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.
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.
mrpt::vision::TStereoCalibParams params
Standard object for storing any 3D lightweight object.
Definition: TObject3D.h:25
virtual void dem_update_map()=0
Ensure that all observations are reflected in the map estimate.
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:85
Declares a class that represents any robot&#39;s observation.
Definition: CObservation.h:43
Virtual base class for Digital Elevation Model (DEM) maps.
bool dem_internal_insertObservation(const mrpt::obs::CObservation &obs, const mrpt::poses::CPose3D *robotPose=nullptr)
Internal method called by internal_insertObservation()
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...
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
virtual size_t dem_get_size_y() const =0
3D line, represented by a base point and a director vector.
Definition: TLine3D.h:19



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