MRPT  2.0.2
List of all members | Classes | Public Member Functions
mrpt::maps::CHeightGridMap2D_Base Class Referenceabstract

Detailed Description

Virtual base class for Digital Elevation Model (DEM) maps.

See derived classes for details. This class implements those operations which are especific to DEMs.

Definition at line 22 of file CHeightGridMap2D_Base.h.

#include <mrpt/maps/CHeightGridMap2D_Base.h>

Inheritance diagram for mrpt::maps::CHeightGridMap2D_Base:

Classes

struct  TPointInsertParams
 Extra params for insertIndividualPoint() More...
 

Public Member Functions

 CHeightGridMap2D_Base ()
 
virtual ~CHeightGridMap2D_Base ()
 
bool dem_internal_insertObservation (const mrpt::obs::CObservation &obs, const mrpt::poses::CPose3D *robotPose=nullptr)
 Internal method called by internal_insertObservation() More...
 
Specific API for Digital Elevation Model (DEM) maps
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 heights of each individual cell) More...
 
bool getMinMaxHeight (float &z_min, float &z_max) const
 Computes the minimum and maximum height in the grid. More...
 
virtual bool insertIndividualPoint (const double x, const double y, const double z, const TPointInsertParams &params=TPointInsertParams())=0
 Update the DEM with one new point. More...
 
virtual double dem_get_resolution () const =0
 
virtual size_t dem_get_size_x () const =0
 
virtual size_t dem_get_size_y () const =0
 
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. More...
 
virtual bool dem_get_z (const double x, const double y, double &z_out) const =0
 Get cell 'z' (x,y) by metric coordinates. More...
 
virtual void dem_update_map ()=0
 Ensure that all observations are reflected in the map estimate. More...
 

Constructor & Destructor Documentation

◆ CHeightGridMap2D_Base()

CHeightGridMap2D_Base::CHeightGridMap2D_Base ( )
default

◆ ~CHeightGridMap2D_Base()

CHeightGridMap2D_Base::~CHeightGridMap2D_Base ( )
virtualdefault

Member Function Documentation

◆ dem_get_resolution()

virtual double mrpt::maps::CHeightGridMap2D_Base::dem_get_resolution ( ) const
pure virtual

◆ dem_get_size_x()

virtual size_t mrpt::maps::CHeightGridMap2D_Base::dem_get_size_x ( ) const
pure virtual

◆ dem_get_size_y()

virtual size_t mrpt::maps::CHeightGridMap2D_Base::dem_get_size_y ( ) const
pure virtual

◆ dem_get_z()

virtual bool mrpt::maps::CHeightGridMap2D_Base::dem_get_z ( const double  x,
const double  y,
double &  z_out 
) const
pure virtual

Get cell 'z' (x,y) by metric coordinates.

Returns
false if out of bounds or un-observed cell.

Implemented in mrpt::maps::CHeightGridMap2D, and mrpt::maps::CHeightGridMap2D_MRF.

◆ dem_get_z_by_cell()

virtual bool mrpt::maps::CHeightGridMap2D_Base::dem_get_z_by_cell ( const size_t  cx,
const size_t  cy,
double &  z_out 
) const
pure virtual

Get cell 'z' by (cx,cy) cell indices.

Returns
false if out of bounds or un-observed cell.

Implemented in mrpt::maps::CHeightGridMap2D, and mrpt::maps::CHeightGridMap2D_MRF.

◆ dem_internal_insertObservation()

bool CHeightGridMap2D_Base::dem_internal_insertObservation ( const mrpt::obs::CObservation obs,
const mrpt::poses::CPose3D robotPose = nullptr 
)

Internal method called by internal_insertObservation()

Definition at line 128 of file CHeightGridMap2D_Base.cpp.

References mrpt::maps::CPointsMap::changeCoordinatesReference(), mrpt::maps::CPointsMap::empty(), mrpt::maps::CPointsMap::getPoint(), IS_CLASS, mrpt::maps::CPointsMap::loadFromVelodyneScan(), MRPT_END, MRPT_START, mrpt::maps::CPointsMap::size(), and mrpt::maps::CHeightGridMap2D_Base::TPointInsertParams::update_map_after_insertion.

Referenced by mrpt::maps::CHeightGridMap2D::internal_insertObservation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dem_update_map()

virtual void mrpt::maps::CHeightGridMap2D_Base::dem_update_map ( )
pure virtual

Ensure that all observations are reflected in the map estimate.

Implemented in mrpt::maps::CHeightGridMap2D, and mrpt::maps::CHeightGridMap2D_MRF.

◆ getMinMaxHeight()

bool CHeightGridMap2D_Base::getMinMaxHeight ( float &  z_min,
float &  z_max 
) const

Computes the minimum and maximum height in the grid.

Returns
False if there is no observed cell yet.

Definition at line 28 of file CHeightGridMap2D_Base.cpp.

References mrpt::d2f().

Referenced by mrpt::maps::CHeightGridMap2D::getAs3DObject().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insertIndividualPoint()

virtual bool mrpt::maps::CHeightGridMap2D_Base::insertIndividualPoint ( const double  x,
const double  y,
const double  z,
const TPointInsertParams params = TPointInsertParams() 
)
pure virtual

Update the DEM with one new point.

See also
mrpt::maps::CMetricMap::insertObservation() for inserting higher-level objects like 2D/3D LIDAR scans
Returns
true if updated OK, false if (x,y) is out of bounds

Implemented in mrpt::maps::CHeightGridMap2D, and mrpt::maps::CHeightGridMap2D_MRF.

◆ intersectLine3D()

bool CHeightGridMap2D_Base::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 heights of each individual cell)

Definition at line 57 of file CHeightGridMap2D_Base.cpp.

References mrpt::math::TObject3D::getPoint(), mrpt::math::intersect(), MRPT_END, MRPT_START, mrpt::math::TPoint3D_< T >::norm(), mrpt::round(), mrpt::math::TPoint3D_data< T >::x, mrpt::math::TPoint3D_data< T >::y, and mrpt::math::TPoint3D_data< T >::z.

Here is the call graph for this function:



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