Main MRPT website > C++ reference for MRPT 1.5.6
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 24 of file CHeightGridMap2D_Base.h.

#include <mrpt/maps/CHeightGridMap2D_Base.h>

Inheritance diagram for mrpt::maps::CHeightGridMap2D_Base:
Inheritance graph

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=NULL)
 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 ( )

Definition at line 27 of file CHeightGridMap2D_Base.cpp.

CHeightGridMap2D_Base::~CHeightGridMap2D_Base ( )
virtual

Definition at line 31 of file CHeightGridMap2D_Base.cpp.

Member Function Documentation

virtual double mrpt::maps::CHeightGridMap2D_Base::dem_get_resolution ( ) const
pure virtual
virtual size_t mrpt::maps::CHeightGridMap2D_Base::dem_get_size_x ( ) const
pure virtual
virtual size_t mrpt::maps::CHeightGridMap2D_Base::dem_get_size_y ( ) const
pure virtual
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.

Referenced by intersectLine3D().

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.

Referenced by getMinMaxHeight().

bool CHeightGridMap2D_Base::dem_internal_insertObservation ( const mrpt::obs::CObservation obs,
const mrpt::poses::CPose3D robotPose = NULL 
)
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.

Referenced by dem_internal_insertObservation().

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 35 of file CHeightGridMap2D_Base.cpp.

References dem_get_size_x(), dem_get_size_y(), dem_get_z_by_cell(), mrpt::mrpt::utils::keep_max(), and mrpt::mrpt::utils::keep_min().

Referenced by mrpt::maps::CHeightGridMap2D::getAs3DObject(), and intersectLine3D().

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.

Referenced by dem_internal_insertObservation().

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 66 of file CHeightGridMap2D_Base.cpp.

References dem_get_resolution(), dem_get_z(), getMinMaxHeight(), mrpt::math::TObject3D::getPoint(), mrpt::math::intersect(), min, MRPT_END, MRPT_START, mrpt::math::TPoint3D::norm(), mrpt::math::TObject3D, mrpt::math::TPoint3D::x, and mrpt::math::TPoint3D::y.




Page generated by Doxygen 1.8.6 for MRPT 1.5.6 Git: 4c65e84 Tue Apr 24 08:18:17 2018 +0200 at mar abr 24 08:26:17 CEST 2018