class mrpt::maps::CRandomFieldGridMap2D

CRandomFieldGridMap2D represents a 2D grid map where each cell is associated one real-valued property which is estimated by this map, either as a simple value or as a probility distribution (for each cell).

There are a number of methods available to build the MRF grid-map, depending on the value of TMapRepresentation maptype passed in the constructor.

The following papers describe the mapping alternatives implemented here:

  • mrKernelDM : A Gaussian kernel-based method. See:

    • “Building gas concentration gridmaps with a mobile robot”, Lilienthal, A. and Duckett, T., Robotics and Autonomous Systems, v.48, 2004.

  • mrKernelDMV : A kernel-based method. See:

    • “A Statistical Approach to Gas Distribution Modelling with Mobile Robots–The Kernel DM+ V Algorithm”, Lilienthal, A.J. and Reggente, M. and Trincavelli, M. and Blanco, J.L. and Gonzalez, J., IROS 2009.

  • mrKalmanFilter : A “brute-force” approach to estimate the entire map with a dense (linear) Kalman filter. Will be very slow for mid or large maps. It’s provided just for comparison purposes, not useful in practice.

  • mrKalmanApproximate : A compressed/sparse Kalman filter approach. See:

    • “A Kalman Filter Based Approach to Probabilistic Gas Distribution Mapping”, JL Blanco, JG Monroy, J Gonzalez-Jimenez, A Lilienthal, 28th Symposium On Applied Computing (SAC), 2013.

  • mrGMRF_SD : A Gaussian Markov Random Field (GMRF) estimator, with these constraints:

    • mrGMRF_SD : Each cell only connected to its 4 immediate neighbors (Up, down, left, right).

    • (Removed in MRPT 1.5.0: mrGMRF_G : Each cell connected to a square area of neighbors cells)

    • See papers:

      • “Time-variant gas distribution mapping with obstacle information”, Monroy, J. G., Blanco, J. L., & Gonzalez-Jimenez, J. Autonomous Robots, 40(1), 1-16, 2016.

Note that this class is virtual, since derived classes still have to implement:

  • mrpt::maps::CMetricMap::internal_computeObservationLikelihood()

  • mrpt::maps::CMetricMap::internal_insertObservation()

  • Serialization methods: writeToStream() and readFromStream()

[GMRF only] A custom connectivity pattern between cells can be defined by calling setCellsConnectivity().

See also:

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

#include <mrpt/maps/CRandomFieldGridMap2D.h>

class CRandomFieldGridMap2D:
    public mrpt::maps::CMetricMap,
    public mrpt::containers::CDynamicGrid,
    public mrpt::system::COutputLogger
{
public:
    // structs

    struct ConnectivityDescriptor;
    struct TInsertionOptionsCommon;
    struct TObservationGMRF;
    struct TPriorFactorGMRF;

    // construction

    CRandomFieldGridMap2D(
        TMapRepresentation mapType = mrKernelDM,
        double x_min = -2,
        double x_max = 2,
        double y_min = -2,
        double y_max = 2,
        double resolution = 0.1
        );

    //
methods

    virtual void getVisualizationInto(mrpt::opengl::CSetOfObjects& outObj) const;
    virtual void getAs3DObject(mrpt::opengl::CSetOfObjects& meanObj, mrpt::opengl::CSetOfObjects& varObj) const;
};

// direct descendants

class CGasConcentrationGridMap2D;
class CHeightGridMap2D_MRF;
class CWirelessPowerGridMap2D;

Inherited Members

public:
    // structs

    struct TMsg;

    //
methods

    virtual bool isEmpty() const = 0;
    virtual void saveMetricMapRepresentationToFile(const std::string& filNamePrefix) const = 0;
    virtual std::string asString() const = 0;
    virtual void getVisualizationInto(mrpt::opengl::CSetOfObjects& o) const = 0;

Construction

CRandomFieldGridMap2D(
    TMapRepresentation mapType = mrKernelDM,
    double x_min = -2,
    double x_max = 2,
    double y_min = -2,
    double y_max = 2,
    double resolution = 0.1
    )

Constructor.

Methods

virtual void getVisualizationInto(mrpt::opengl::CSetOfObjects& outObj) const

Returns a 3D object representing the map (mean)

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

Returns two 3D objects representing the mean and variance maps.