Class CHeightGridMap2D_MRF

Nested Relationships

Nested Types

Inheritance Relationships

Base Types

Class Documentation

class CHeightGridMap2D_MRF : public mrpt::maps::CRandomFieldGridMap2D, public mrpt::maps::CHeightGridMap2D_Base

CHeightGridMap2D_MRF represents digital-elevation-model over a 2D area, with uncertainty, based on a Markov-Random-Field (MRF) estimator.

There are a number of methods available to build the gas grid-map, depending on the value of “TMapRepresentation maptype” passed in the constructor (see base class mrpt::maps::CRandomFieldGridMap2D).

Update the map with insertIndividualReading() or insertObservation()

See also

mrpt::maps::CRandomFieldGridMap2D, mrpt::maps::CMetricMap, mrpt::containers::CDynamicGrid, The application icp-slam, mrpt::maps::CMultiMetricMap

Note

New in MRPT 1.4.0

Public Functions

CHeightGridMap2D_MRF(TMapRepresentation mapType = mrGMRF_SD, double x_min = -2, double x_max = 2, double y_min = -2, double y_max = 2, double resolution = 0.5, bool run_first_map_estimation_now = true)

Constructor

Parameters:

run_first_map_estimation_now – [in] Whether to call updateMapEstimation(). If false, make sure of calling that function before accessing map contents.

void getVisualizationInto(mrpt::viz::CSetOfObjects &outObj) const override

Returns a 3D object representing the map

virtual void getAs3DObject(mrpt::viz::CSetOfObjects &meanObj, mrpt::viz::CSetOfObjects &varObj) const override

Returns two 3D objects representing the mean and variance maps

virtual bool insertIndividualPoint(const double x, const double y, const double z, const CHeightGridMap2D_Base::TPointInsertParams &params = CHeightGridMap2D_Base::TPointInsertParams()) override

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 override
virtual size_t dem_get_size_x() const override
virtual size_t dem_get_size_y() const override
virtual bool dem_get_z_by_cell(size_t cx, size_t cy, double &z_out) const override

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 override

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

Returns:

false if out of bounds or un-observed cell.

virtual void dem_update_map() override

Ensure that all observations are reflected in the map estimate

inline virtual CRandomFieldGridMap2D::TInsertionOptionsCommon *getCommonInsertOptions() override

Get the part of the options common to all CRandomFieldGridMap2D classes

void internal_clear() override
bool internal_insertObservation(const mrpt::obs::CObservation &obs, const std::optional<const mrpt::poses::CPose3D> &robotPose) override
double internal_computeObservationLikelihood(const mrpt::obs::CObservation &obs, const mrpt::poses::CPose3D &takenFrom) const override

Public Members

mrpt::maps::CHeightGridMap2D_MRF::TInsertionOptions insertionOptions
bool run_map_estimation_at_ctor = {true}

Runs map estimation at start up (Default:true)

double min_x = {-2}

See CHeightGridMap2D_MRF::CHeightGridMap2D_MRF

double max_x = {2}
double min_y = {-2}
double max_y = {2}
double resolution = {0.10f}
mrpt::maps::CHeightGridMap2D_MRF::TMapRepresentation mapType = {mrGMRF_SD}

The kind of map representation (see CHeightGridMap2D_MRF::CHeightGridMap2D_MRF)

mrpt::maps::CHeightGridMap2D_MRF::TInsertionOptions insertionOpts

Observations insertion options

struct TInsertionOptions : public mrpt::config::CLoadableOptions, public mrpt::maps::CRandomFieldGridMap2D::TInsertionOptionsCommon

Parameters related with inserting observations into the map

Public Functions

TInsertionOptions()

Default values loader

void loadFromConfigFile(const mrpt::config::CConfigFileBase &source, const std::string &section) override
void dumpToTextStream(std::ostream &out) const override