Main MRPT website > C++ reference for MRPT 1.4.0
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-2016, 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
16
17namespace 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:
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) */
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() */
62
63 };
64 } // End of namespace
65} // End of namespace
66#endif
Virtual base class for Digital Elevation Model (DEM) maps.
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
bool dem_internal_insertObservation(const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D *robotPose=NULL)
Internal method called by internal_insertObservation()
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 size_t dem_get_size_y() const =0
virtual size_t dem_get_size_x() const =0
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...
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.
virtual bool dem_get_z(const double x, const double y, double &z_out) const =0
Get cell 'z' (x,y) by metric coordinates.
virtual void dem_update_map()=0
Ensure that all observations are reflected in the map estimate.
Declares a class that represents any robot's observation.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:73
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
bool update_map_after_insertion
(default: true) run any required operation to ensure the map reflects the changes caused by this poin...
double pt_z_std
(Default:0.0) If !=0, use this value as the uncertainty (standard deviation) for the point "z" coordi...
3D line, represented by a base point and a director vector.
Standard object for storing any 3D lightweight object.



Page generated by Doxygen 1.9.5 for MRPT 1.4.0 SVN: at Sun Dec 25 21:25:12 UTC 2022