Class CGasConcentrationGridMap2D

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class CGasConcentrationGridMap2D : public mrpt::maps::CRandomFieldGridMap2D

CGasConcentrationGridMap2D represents a PDF of gas concentrations over a 2D area.

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

Public Functions

CGasConcentrationGridMap2D(TMapRepresentation mapType = mrAchim, float x_min = -2, float x_max = 2, float y_min = -2, float y_max = 2, float resolution = 0.1f)

Constructor

~CGasConcentrationGridMap2D() override

Destructor

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

void getWindAs3DObject(mrpt::viz::CSetOfObjects::Ptr &windObj) const

Returns the 3D object representing the wind grid information

virtual void increaseUncertainty(const double STD_increase_value)

Increase the kf_std of all cells from the m_map This mehod is usually called by the main_map to simulate loss of confidence in measurements when time passes

bool simulateAdvection(double STD_increase_value)

Implements the transition model of the gasConcentration map using the information of the wind maps

Public Members

mrpt::maps::CGasConcentrationGridMap2D::TInsertionOptions insertionOptions
TGaussianWindTable LUT

Protected Functions

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
bool build_Gaussian_Wind_Grid()

Builds a LookUp table with the values of the Gaussian Weights result of the wind advection for a specific std_windNoise_phi value.

bool save_Gaussian_Wind_Grid_To_File()
bool load_Gaussian_Wind_Grid_From_File()

Protected Attributes

mrpt::containers::CDynamicGrid<double> windGrid_module

Gridmaps of the wind Direction/Module

mrpt::containers::CDynamicGrid<double> windGrid_direction
mrpt::system::TTimeStamp timeLastSimulated

The timestamp of the last time the advection simulation was executed

float min_x = {-2}

See CGasConcentrationGridMap2D::CGasConcentrationGridMap2D

float max_x = {2}
float min_y = {-2}
float max_y = {2}
float resolution = {0.10f}
mrpt::maps::CGasConcentrationGridMap2D::TMapRepresentation mapType = {CGasConcentrationGridMap2D::mrKernelDM}

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

mrpt::maps::CGasConcentrationGridMap2D::TInsertionOptions insertionOpts

Observations insertion options

struct TGaussianCell

Public Members

int cx = 0
int cy = 0
float value = 0
struct TGaussianWindTable

Public Members

float resolution = 0
float std_phi = 0
float std_r = 0
float phi_inc = 0
unsigned int phi_count = 0
float r_inc = 0
float max_r = 0
unsigned int r_count = 0
std::vector<std::vector<std::vector<TGaussianCell>>> *table
struct TInsertionOptions : public mrpt::config::CLoadableOptions, public mrpt::maps::CRandomFieldGridMap2D::TInsertionOptionsCommon

Parameters related with inserting observations into the map:

For all mapping methods

std::string gasSensorLabel

The label of the CObservationGasSensor used to generate the map

uint16_t enose_id = {0}

id for the enose used to generate this map (must be < gasGrid_count)

uint16_t gasSensorType = {0x0000}

The sensor type for the gas concentration map (0x0000 ->mean of all installed sensors, 0x2600, 0x6810, …)

std::string windSensorLabel

The label of the WindSenor used to simulate advection

bool useWindInformation = {false}
float advectionFreq

to simulate Advection

Indicates if wind information must be used

float std_windNoise_phi = {0.2f}

to transform wind speed to distance)

Frequency for simulating advection (only used

float std_windNoise_mod = {0.2f}
float default_wind_direction = {0.0f}

The std to consider on wind information measurements

float default_wind_speed = {1.0f}

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