Main MRPT website > C++ reference for MRPT 1.5.6
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 #include <mrpt/maps/link_pragmas.h>
16 
17 namespace mrpt
18 {
19  namespace maps
20  {
21  /** Virtual base class for Digital Elevation Model (DEM) maps. See derived 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 into account the different heights of each individual cell) */
33  bool intersectLine3D(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  double pt_z_std; //!< (Default:0.0) If !=0, use this value as the uncertainty (standard deviation) for the point "z" coordinate, instead of the map-wise default value.
43  bool update_map_after_insertion; //!< (default: true) run any required operation to ensure the map reflects the changes caused by this point. Otherwise, calling dem_update_map() is required.
44 
46  };
47  /** Update the DEM with one new point.
48  * \sa mrpt::maps::CMetricMap::insertObservation() for inserting higher-level objects like 2D/3D LIDAR scans
49  * \return true if updated OK, false if (x,y) is out of bounds */
50  virtual bool insertIndividualPoint(const double x,const double y,const double z, const TPointInsertParams & params = TPointInsertParams() ) = 0;
51 
52  virtual double dem_get_resolution() const = 0;
53  virtual size_t dem_get_size_x() const = 0;
54  virtual size_t dem_get_size_y() const = 0;
55  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. \return false if out of bounds or un-observed cell.
56  virtual bool dem_get_z(const double x, const double y, double &z_out) const = 0; //!< Get cell 'z' (x,y) by metric coordinates. \return false if out of bounds or un-observed cell.
57  virtual void dem_update_map() = 0; //!< Ensure that all observations are reflected in the map estimate
58  /** @} */
59 
60  /** Internal method called by internal_insertObservation() */
61  bool dem_internal_insertObservation(const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D *robotPose = NULL );
62 
63  };
64  } // End of namespace
65 } // End of namespace
66 #endif
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...
GLdouble GLdouble z
Definition: glext.h:3734
Standard object for storing any 3D lightweight object.
GLsizei GLsizei GLuint * obj
Definition: glext.h:3902
bool update_map_after_insertion
(default: true) run any required operation to ensure the map reflects the changes caused by this poin...
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:72
Declares a class that represents any robot&#39;s observation.
Virtual base class for Digital Elevation Model (DEM) maps.
GLenum GLint GLint y
Definition: glext.h:3516
GLenum GLint x
Definition: glext.h:3516
GLenum const GLfloat * params
Definition: glext.h:3514
3D line, represented by a base point and a director vector.



Page generated by Doxygen 1.8.14 for MRPT 1.5.6 Git: 4c65e8431 Tue Apr 24 08:18:17 2018 +0200 at lun oct 28 01:35:26 CET 2019