Class CHeightGridMap2D_Base

Nested Relationships

Nested Types

Inheritance Relationships

Derived Types

Class Documentation

class CHeightGridMap2D_Base

Virtual base class for Digital Elevation Model (DEM) maps. See derived classes for details. This class implements those operations which are especific to DEMs.

Subclassed by mrpt::maps::CHeightGridMap2D, mrpt::maps::CHeightGridMap2D_MRF

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)

bool 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.

virtual bool insertIndividualPoint(const double x, const double y, const double z, const TPointInsertParams &params = TPointInsertParams()) = 0

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

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(size_t cx, size_t cy, double &z_out) const = 0

Get cell ‘z’ by (cx,cy) cell indices.

Returns:

false if out of bounds or un-observed cell.

virtual bool dem_get_z(const double x, const double y, double &z_out) const = 0

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

Returns:

false if out of bounds or un-observed cell.

virtual void dem_update_map() = 0

Ensure that all observations are reflected in the map estimate

Public Functions

CHeightGridMap2D_Base()
virtual ~CHeightGridMap2D_Base()
bool dem_internal_insertObservation(const mrpt::obs::CObservation &obs, const std::optional<const mrpt::poses::CPose3D> &robotPose = std::nullopt)

Internal method called by internal_insertObservation()

struct TPointInsertParams

Extra params for insertIndividualPoint()

Public Functions

TPointInsertParams()

Public Members

double pt_z_std = {0.0}

(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.

bool update_map_after_insertion = {true}

(default: true) run any required operation to ensure the map reflects the changes caused by this point. Otherwise, calling dem_update_map() is required.