Main MRPT website > C++ reference for MRPT 1.3.2
List of all members | Classes | Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Types
mrpt::maps::CRandomFieldGridMap2D Class Referenceabstract

Detailed Description

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 gas grid-map, depending on the value of "TMapRepresentation maptype" passed in the constructor.

The following papers describe the mapping alternatives implemented here:

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

See also
mrpt::maps::CGasConcentrationGridMap2D, mrpt::maps::CWirelessPowerGridMap2D, mrpt::maps::CMetricMap, mrpt::utils::CDynamicGrid, The application icp-slam, mrpt::maps::CMultiMetricMap

Definition at line 110 of file maps/CRandomFieldGridMap2D.h.

#include <mrpt/maps/CRandomFieldGridMap2D.h>

Inheritance diagram for mrpt::maps::CRandomFieldGridMap2D:
Inheritance graph

Classes

struct  TInsertionOptionsCommon
 Parameters common to any derived class. More...
 
struct  TobservationGMRF
 

Public Types

enum  TMapRepresentation {
  mrKernelDM = 0, mrAchim = 0, mrKalmanFilter, mrKalmanApproximate,
  mrKernelDMV, mrGMRF_G, mrGMRF_SD, mrGMRF_L
}
 The type of map representation to be used, see CRandomFieldGridMap2D for a discussion. More...
 

Public Member Functions

void clear ()
 Calls the base CMetricMap::clear Declared here to avoid ambiguity between the two clear() in both base classes. More...
 
float cell2float (const TRandomFieldCell &c) const
 
 CRandomFieldGridMap2D (TMapRepresentation mapType=mrAchim, float x_min=-2, float x_max=2, float y_min=-2, float y_max=2, float resolution=0.1)
 Constructor. More...
 
virtual ~CRandomFieldGridMap2D ()
 Destructor. More...
 
virtual bool isEmpty () const
 Returns true if the map is empty/no observation has been inserted (in this class it always return false, unless redefined otherwise in base classes) More...
 
virtual void saveAsBitmapFile (const std::string &filName) const
 Save the current map as a graphical file (BMP,PNG,...). More...
 
virtual void getAsBitmapFile (mrpt::utils::CImage &out_img) const
 Returns an image just as described in saveAsBitmapFile. More...
 
virtual void resize (float new_x_min, float new_x_max, float new_y_min, float new_y_max, const TRandomFieldCell &defaultValueNewCells, float additionalMarginMeters=1.0f)
 Changes the size of the grid, maintaining previous contents. More...
 
float compute3DMatchingRatio (const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::CPose3D &otherMapPose, float maxDistForCorr=0.10f, float maxMahaDistForCorr=2.0f) const
 See docs in base class: in this class this always returns 0. More...
 
virtual void saveMetricMapRepresentationToFile (const std::string &filNamePrefix) const
 The implementation in this class just calls all the corresponding method of the contained metric maps. More...
 
virtual void saveAsMatlab3DGraph (const std::string &filName) const
 Save a matlab ".m" file which represents as 3D surfaces the mean and a given confidence level for the concentration of each cell. More...
 
void getAsMatlab3DGraphScript (std::string &out_script) const
 Return a large text block with a MATLAB script to plot the contents of this map. More...
 
virtual void getAs3DObject (mrpt::opengl::CSetOfObjectsPtr &outObj) const
 Returns a 3D object representing the map (mean). More...
 
virtual void getAs3DObject (mrpt::opengl::CSetOfObjectsPtr &meanObj, mrpt::opengl::CSetOfObjectsPtr &varObj) const
 Returns two 3D objects representing the mean and variance maps. More...
 
TMapRepresentation getMapType ()
 Return the type of the random-field grid map, according to parameters passed on construction. More...
 
void insertIndividualReading (const float sensorReading, const mrpt::math::TPoint2D &point)
 Direct update of the map with a reading in a given position of the map, using the appropriate method according to mapType passed in the constructor. More...
 
virtual void predictMeasurement (const double &x, const double &y, double &out_predict_response, double &out_predict_response_variance)
 Returns the prediction of the measurement at some (x,y) coordinates, and its certainty (in the form of the expected variance). More...
 
void getMeanAndCov (mrpt::math::CVectorDouble &out_means, mrpt::math::CMatrixDouble &out_cov) const
 Return the mean and covariance vector of the full Kalman filter estimate (works for all KF-based methods). More...
 
void getMeanAndSTD (mrpt::math::CVectorDouble &out_means, mrpt::math::CVectorDouble &out_STD) const
 Return the mean and STD vectors of the full Kalman filter estimate (works for all KF-based methods). More...
 
void setMeanAndSTD (mrpt::math::CVectorDouble &out_means, mrpt::math::CVectorDouble &out_STD)
 Load the mean and STD vectors of the full Kalman filter estimate (works for all KF-based methods). More...
 
void loadFromProbabilisticPosesAndObservations (const mrpt::maps::CSimpleMap &Map)
 Load the map contents from a CSimpleMap object, erasing all previous content of the map. More...
 
void loadFromSimpleMap (const mrpt::maps::CSimpleMap &Map)
 Load the map contents from a CSimpleMap object, erasing all previous content of the map. More...
 
bool insertObservation (const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D *robotPose=NULL)
 Insert the observation information into this map. More...
 
bool insertObservationPtr (const mrpt::obs::CObservationPtr &obs, const mrpt::poses::CPose3D *robotPose=NULL)
 A wrapper for smart pointers, just calls the non-smart pointer version. More...
 
double computeObservationLikelihood (const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D &takenFrom)
 Computes the log-likelihood of a given observation given an arbitrary robot 3D pose. More...
 
double computeObservationLikelihood (const mrpt::obs::CObservation *obs, const mrpt::poses::CPose2D &takenFrom)
 
virtual bool canComputeObservationLikelihood (const mrpt::obs::CObservation *obs)
 Returns true if this map is able to compute a sensible likelihood function for this observation (i.e. More...
 
bool canComputeObservationLikelihood (const mrpt::obs::CObservationPtr &obs)
 
double computeObservationsLikelihood (const mrpt::obs::CSensoryFrame &sf, const mrpt::poses::CPose2D &takenFrom)
 Returns the sum of the log-likelihoods of each individual observation within a mrpt::obs::CSensoryFrame. More...
 
bool canComputeObservationsLikelihood (const mrpt::obs::CSensoryFrame &sf)
 Returns true if this map is able to compute a sensible likelihood function for this observation (i.e. More...
 
virtual void determineMatching2D (const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::CPose2D &otherMapPose, mrpt::utils::TMatchingPairList &correspondences, const TMatchingParams &params, TMatchingExtraResults &extraResults) const
 Computes the matching between this and another 2D point map, which includes finding: More...
 
virtual void determineMatching3D (const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::CPose3D &otherMapPose, mrpt::utils::TMatchingPairList &correspondences, const TMatchingParams &params, TMatchingExtraResults &extraResults) const
 Computes the matchings between this and another 3D points map - method used in 3D-ICP. More...
 
virtual void auxParticleFilterCleanUp ()
 This method is called at the end of each "prediction-update-map insertion" cycle within "mrpt::slam::CMetricMapBuilderRBPF::processActionObservation". More...
 
virtual float squareDistanceToClosestCorrespondence (float x0, float y0) const
 Returns the square distance from the 2D point (x0,y0) to the closest correspondence in the map. More...
 
virtual const mrpt::maps::CSimplePointsMapgetAsSimplePointsMap () const
 If the map is a simple points map or it's a multi-metric map that contains EXACTLY one simple points map, return it. More...
 
virtual mrpt::maps::CSimplePointsMapgetAsSimplePointsMap ()
 
virtual mxArraywriteToMatlab () const
 Introduces a pure virtual method responsible for writing to a mxArray Matlab object, typically a MATLAB struct whose contents are documented in each derived class. More...
 
virtual CObject * duplicate () const =0
 Returns a copy of the object, indepently of its class. More...
 
mrpt::utils::CObjectPtr duplicateGetSmartPtr () const
 Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer). More...
 
CObject * clone () const
 Cloning interface for smart pointers. More...
 
void setSize (const float x_min, const float x_max, const float y_min, const float y_max, const float resolution, const TRandomFieldCell *fill_value=NULL)
 Changes the size of the grid, ERASING all previous contents. More...
 
void fill (const TRandomFieldCell &value)
 Fills all the cells with the same value. More...
 
virtual void resize (float new_x_min, float new_x_max, float new_y_min, float new_y_max, const TRandomFieldCell &defaultValueNewCells, float additionalMarginMeters=2.0f)
 Changes the size of the grid, maintaining previous contents. More...
 
TRandomFieldCellcellByPos (float x, float y)
 Returns a pointer to the contents of a cell given by its coordinates, or NULL if it is out of the map extensions. More...
 
const TRandomFieldCellcellByPos (float x, float y) const
 Returns a pointer to the contents of a cell given by its coordinates, or NULL if it is out of the map extensions. More...
 
TRandomFieldCellcellByIndex (unsigned int cx, unsigned int cy)
 Returns a pointer to the contents of a cell given by its cell indexes, or NULL if it is out of the map extensions. More...
 
const TRandomFieldCellcellByIndex (unsigned int cx, unsigned int cy) const
 Returns a pointer to the contents of a cell given by its cell indexes, or NULL if it is out of the map extensions. More...
 
size_t getSizeX () const
 Returns the horizontal size of grid map in cells count. More...
 
size_t getSizeY () const
 Returns the vertical size of grid map in cells count. More...
 
float getXMin () const
 Returns the "x" coordinate of left side of grid map. More...
 
float getXMax () const
 Returns the "x" coordinate of right side of grid map. More...
 
float getYMin () const
 Returns the "y" coordinate of top side of grid map. More...
 
float getYMax () const
 Returns the "y" coordinate of bottom side of grid map. More...
 
float getResolution () const
 Returns the resolution of the grid map. More...
 
int x2idx (float x) const
 Transform a coordinate values into cell indexes. More...
 
int x2idx (float x, float x_min) const
 Transform a coordinate value into a cell index, using a diferent "x_min" value. More...
 
int y2idx (float y) const
 
int y2idx (float y, float y_min) const
 
int xy2idx (float x, float y) const
 
void idx2cxcy (const int &idx, int &cx, int &cy) const
 Transform a global (linear) cell index value into its corresponding (x,y) cell indexes. More...
 
float idx2x (int cx) const
 Transform a cell index into a coordinate value. More...
 
float idx2y (int cy) const
 
void getAsMatrix (MAT &m) const
 Get the entire grid as a matrix. More...
 
virtual float cell2float (const TRandomFieldCell &c) const
 The user must implement this in order to provide "saveToTextFile" a way to convert each cell into a numeric value. More...
 
bool saveToTextFile (const std::string &fileName) const
 Saves a float representation of the grid (via "cell2float()") to a text file. More...
 

Public Attributes

TMapGenericParams genericMapParams
 Common params to all maps. More...
 

Static Public Attributes

static const mrpt::utils::TRuntimeClassId classCObject
 
RTTI stuff
static const mrpt::utils::TRuntimeClassId classCMetricMap
 
RTTI stuff
static const mrpt::utils::TRuntimeClassId classCSerializable
 

Protected Member Functions

virtual CRandomFieldGridMap2D::TInsertionOptionsCommongetCommonInsertOptions ()=0
 Get the part of the options common to all CRandomFieldGridMap2D classes. More...
 
void insertObservation_KernelDM_DMV (float normReading, const mrpt::math::TPoint2D &point, bool is_DMV)
 The implementation of "insertObservation" for Achim Lilienthal's map models DM & DM+V. More...
 
void insertObservation_KF (float normReading, const mrpt::math::TPoint2D &point)
 The implementation of "insertObservation" for the (whole) Kalman Filter map model. More...
 
void insertObservation_KF2 (float normReading, const mrpt::math::TPoint2D &point)
 The implementation of "insertObservation" for the Efficient Kalman Filter map model. More...
 
void insertObservation_GMRF (float normReading, const mrpt::math::TPoint2D &point)
 The implementation of "insertObservation" for the Gaussian Markov Random Field map model. More...
 
void updateMapEstimation_GMRF ()
 solves the minimum quadratic system to determine the new concentration of each cell More...
 
double computeConfidenceCellValue_DM_DMV (const TRandomFieldCell *cell) const
 Computes the confidence of the cell concentration (alpha) More...
 
double computeMeanCellValue_DM_DMV (const TRandomFieldCell *cell) const
 Computes the average cell concentration, or the overall average value if it has never been observed. More...
 
double computeVarCellValue_DM_DMV (const TRandomFieldCell *cell) const
 Computes the estimated variance of the cell concentration, or the overall average variance if it has never been observed. More...
 
void recoverMeanAndCov () const
 In the KF2 implementation, takes the auxiliary matrices and from them update the cells' mean and std values. More...
 
virtual void internal_clear ()
 Erase all the contents of the map. More...
 
bool exist_relation_between2cells (const mrpt::maps::COccupancyGridMap2D *m_Ocgridmap, size_t cxo_min, size_t cxo_max, size_t cyo_min, size_t cyo_max, const size_t seed_cxo, const size_t seed_cyo, const size_t objective_cxo, const size_t objective_cyo)
 Check if two cells of the gridmap (m_map) are connected, based on the provided occupancy gridmap. More...
 
virtual void writeToStream (mrpt::utils::CStream &out, int *getVersion) const =0
 Introduces a pure virtual method responsible for writing to a CStream. More...
 
virtual void readFromStream (mrpt::utils::CStream &in, int version)=0
 Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori. More...
 
void publishEvent (const mrptEvent &e) const
 Called when you want this object to emit an event to all the observers currently subscribed to this object. More...
 
bool hasSubscribers () const
 Can be called by a derived class before preparing an event for publishing with publishEvent to determine if there is no one subscribed, so it can save the wasted time preparing an event that will be not read. More...
 
std::vector< TRandomFieldCell > & m_map_castaway_const () const
 Used only from logically const method that really need to modify the object. More...
 

Protected Attributes

TInsertionOptionsCommonm_insertOptions_common
 Common options to all random-field grid maps: pointer that is set to the derived-class instance of "insertOptions" upon construction of this class. More...
 
TMapRepresentation m_mapType
 The map representation type of this map, as passed in the constructor. More...
 
mrpt::math::CMatrixD m_cov
 The whole covariance matrix, used for the Kalman Filter map representation. More...
 
mrpt::math::CMatrixD m_stackedCov
 The compressed band diagonal matrix for the KF2 implementation. More...
 
bool m_hasToRecoverMeanAndCov
 Only for the KF2 implementation. More...
 
std::vector< TRandomFieldCellm_map
 The cells. More...
 
float m_x_min
 
float m_x_max
 
float m_y_min
 
float m_y_max
 
float m_resolution
 
size_t m_size_x
 
size_t m_size_y
 
Auxiliary vars for DM & DM+V methods
float m_DM_lastCutOff
 
std::vector< float > m_DM_gaussWindow
 
double m_average_normreadings_mean
 
double m_average_normreadings_var
 
size_t m_average_normreadings_count
 
Auxiliary vars for GMRF method
Eigen::VectorXd g
 
size_t nPriorFactors
 
size_t nObsFactors
 
size_t nFactors
 
std::multimap< size_t, size_t > cell_interconnections
 
std::vector< float > gauss_val
 
std::vector< std::vector< TobservationGMRF > > activeObs
 

Private Types

typedef utils::CDynamicGrid< TRandomFieldCellBASE
 

RTTI stuff

static const mrpt::utils::TRuntimeClassId classCRandomFieldGridMap2D
 
class mrpt::utils::CStream
 
static const mrpt::utils::TRuntimeClassId_GetBaseClass ()
 
virtual const mrpt::utils::TRuntimeClassIdGetRuntimeClass () const
 Returns information about the class of an object in runtime. More...
 

Member Typedef Documentation

Definition at line 112 of file maps/CRandomFieldGridMap2D.h.

Member Enumeration Documentation

The type of map representation to be used, see CRandomFieldGridMap2D for a discussion.

Enumerator
mrKernelDM 
mrAchim 

Another alias for "mrKernelDM", for backwards compatibility.

mrKalmanFilter 
mrKalmanApproximate 
mrKernelDMV 
mrGMRF_G 
mrGMRF_SD 
mrGMRF_L 

Definition at line 131 of file maps/CRandomFieldGridMap2D.h.

Constructor & Destructor Documentation

mrpt::maps::CRandomFieldGridMap2D::CRandomFieldGridMap2D ( TMapRepresentation  mapType = mrAchim,
float  x_min = -2,
float  x_max = 2,
float  y_min = -2,
float  y_max = 2,
float  resolution = 0.1 
)

Constructor.

virtual mrpt::maps::CRandomFieldGridMap2D::~CRandomFieldGridMap2D ( )
virtual

Destructor.

Member Function Documentation

static const mrpt::utils::TRuntimeClassId* mrpt::maps::CRandomFieldGridMap2D::_GetBaseClass ( )
staticprotected
virtual void mrpt::maps::CMetricMap::auxParticleFilterCleanUp ( )
inlinevirtualinherited

This method is called at the end of each "prediction-update-map insertion" cycle within "mrpt::slam::CMetricMapBuilderRBPF::processActionObservation".

This method should normally do nothing, but in some cases can be used to free auxiliary cached variables.

Reimplemented in mrpt::maps::CLandmarksMap, and mrpt::maps::CMultiMetricMap.

Definition at line 240 of file maps/CMetricMap.h.

virtual bool mrpt::maps::CMetricMap::canComputeObservationLikelihood ( const mrpt::obs::CObservation obs)
virtualinherited

Returns true if this map is able to compute a sensible likelihood function for this observation (i.e.

an occupancy grid map cannot with an image).

Parameters
obsThe observation.
See also
computeObservationLikelihood, genericMapParams.enableObservationLikelihood
bool mrpt::maps::CMetricMap::canComputeObservationLikelihood ( const mrpt::obs::CObservationPtr &  obs)
inherited

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

bool mrpt::maps::CMetricMap::canComputeObservationsLikelihood ( const mrpt::obs::CSensoryFrame sf)
inherited

Returns true if this map is able to compute a sensible likelihood function for this observation (i.e.

an occupancy grid map cannot with an image).

Parameters
sfThe observations.
See also
canComputeObservationLikelihood
float mrpt::maps::CRandomFieldGridMap2D::cell2float ( const TRandomFieldCell c) const
inline
virtual float mrpt::utils::CDynamicGrid< TRandomFieldCell >::cell2float ( const TRandomFieldCell &  c) const
inlinevirtualinherited

The user must implement this in order to provide "saveToTextFile" a way to convert each cell into a numeric value.

Definition at line 308 of file CDynamicGrid.h.

References MRPT_UNUSED_PARAM.

TRandomFieldCell * mrpt::utils::CDynamicGrid< TRandomFieldCell >::cellByIndex ( unsigned int  cx,
unsigned int  cy 
)
inlineinherited

Returns a pointer to the contents of a cell given by its cell indexes, or NULL if it is out of the map extensions.

Definition at line 215 of file CDynamicGrid.h.

const TRandomFieldCell * mrpt::utils::CDynamicGrid< TRandomFieldCell >::cellByIndex ( unsigned int  cx,
unsigned int  cy 
) const
inlineinherited

Returns a pointer to the contents of a cell given by its cell indexes, or NULL if it is out of the map extensions.

Definition at line 224 of file CDynamicGrid.h.

TRandomFieldCell * mrpt::utils::CDynamicGrid< TRandomFieldCell >::cellByPos ( float  x,
float  y 
)
inlineinherited

Returns a pointer to the contents of a cell given by its coordinates, or NULL if it is out of the map extensions.

Definition at line 189 of file CDynamicGrid.h.

const TRandomFieldCell * mrpt::utils::CDynamicGrid< TRandomFieldCell >::cellByPos ( float  x,
float  y 
) const
inlineinherited

Returns a pointer to the contents of a cell given by its coordinates, or NULL if it is out of the map extensions.

Definition at line 202 of file CDynamicGrid.h.

void mrpt::maps::CRandomFieldGridMap2D::clear ( void  )
inline

Calls the base CMetricMap::clear Declared here to avoid ambiguity between the two clear() in both base classes.

Definition at line 121 of file maps/CRandomFieldGridMap2D.h.

References mrpt::maps::CMetricMap::clear().

CObject* mrpt::utils::CObject::clone ( ) const
inlineinherited

Cloning interface for smart pointers.

Definition at line 139 of file CObject.h.

float mrpt::maps::CRandomFieldGridMap2D::compute3DMatchingRatio ( const mrpt::maps::CMetricMap otherMap,
const mrpt::poses::CPose3D otherMapPose,
float  maxDistForCorr = 0.10f,
float  maxMahaDistForCorr = 2.0f 
) const
virtual

See docs in base class: in this class this always returns 0.

Reimplemented from mrpt::maps::CMetricMap.

double mrpt::maps::CRandomFieldGridMap2D::computeConfidenceCellValue_DM_DMV ( const TRandomFieldCell cell) const
protected

Computes the confidence of the cell concentration (alpha)

double mrpt::maps::CRandomFieldGridMap2D::computeMeanCellValue_DM_DMV ( const TRandomFieldCell cell) const
protected

Computes the average cell concentration, or the overall average value if it has never been observed.

double mrpt::maps::CMetricMap::computeObservationLikelihood ( const mrpt::obs::CObservation obs,
const mrpt::poses::CPose3D takenFrom 
)
inherited

Computes the log-likelihood of a given observation given an arbitrary robot 3D pose.

Parameters
takenFromThe robot's pose the observation is supposed to be taken from.
obsThe observation.
Returns
This method returns a log-likelihood.
See also
Used in particle filter algorithms, see: CMultiMetricMapPDF::update
double mrpt::maps::CMetricMap::computeObservationLikelihood ( const mrpt::obs::CObservation obs,
const mrpt::poses::CPose2D takenFrom 
)
inherited

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

double mrpt::maps::CMetricMap::computeObservationsLikelihood ( const mrpt::obs::CSensoryFrame sf,
const mrpt::poses::CPose2D takenFrom 
)
inherited

Returns the sum of the log-likelihoods of each individual observation within a mrpt::obs::CSensoryFrame.

Parameters
takenFromThe robot's pose the observation is supposed to be taken from.
sfThe set of observations in a CSensoryFrame.
Returns
This method returns a log-likelihood.
See also
canComputeObservationsLikelihood
double mrpt::maps::CRandomFieldGridMap2D::computeVarCellValue_DM_DMV ( const TRandomFieldCell cell) const
protected

Computes the estimated variance of the cell concentration, or the overall average variance if it has never been observed.

virtual void mrpt::maps::CMetricMap::determineMatching2D ( const mrpt::maps::CMetricMap otherMap,
const mrpt::poses::CPose2D otherMapPose,
mrpt::utils::TMatchingPairList correspondences,
const TMatchingParams params,
TMatchingExtraResults extraResults 
) const
virtualinherited

Computes the matching between this and another 2D point map, which includes finding:

  • The set of points pairs in each map
  • The mean squared distance between corresponding pairs.

The algorithm is:

  • For each point in "otherMap":
    • Transform the point according to otherMapPose
    • Search with a KD-TREE the closest correspondences in "this" map.
    • Add to the set of candidate matchings, if it passes all the thresholds in params.

This method is the most time critical one into ICP-like algorithms.

Parameters
otherMap[IN] The other map to compute the matching with.
otherMapPose[IN] The pose of the other map as seen from "this".
params[IN] Parameters for the determination of pairings.
correspondences[OUT] The detected matchings pairs.
extraResults[OUT] Other results.
See also
compute3DMatchingRatio

Reimplemented in mrpt::maps::COccupancyGridMap2D, mrpt::maps::CPointsMap, mrpt::maps::CMultiMetricMap, and mrpt::maps::CBeaconMap.

virtual void mrpt::maps::CMetricMap::determineMatching3D ( const mrpt::maps::CMetricMap otherMap,
const mrpt::poses::CPose3D otherMapPose,
mrpt::utils::TMatchingPairList correspondences,
const TMatchingParams params,
TMatchingExtraResults extraResults 
) const
virtualinherited

Computes the matchings between this and another 3D points map - method used in 3D-ICP.

This method finds the set of point pairs in each map.

The method is the most time critical one into ICP-like algorithms.

The algorithm is:

  • For each point in "otherMap":
    • Transform the point according to otherMapPose
    • Search with a KD-TREE the closest correspondences in "this" map.
    • Add to the set of candidate matchings, if it passes all the thresholds in params.
Parameters
otherMap[IN] The other map to compute the matching with.
otherMapPose[IN] The pose of the other map as seen from "this".
params[IN] Parameters for the determination of pairings.
correspondences[OUT] The detected matchings pairs.
extraResults[OUT] Other results.
See also
compute3DMatchingRatio

Reimplemented in mrpt::maps::CPointsMap.

virtual CObject* mrpt::utils::CObject::duplicate ( ) const
pure virtualinherited

Returns a copy of the object, indepently of its class.

Implemented in mrpt::nav::CLogFileRecord_ND, mrpt::utils::CSimpleDatabase, mrpt::maps::CMultiMetricMap, mrpt::obs::CObservation3DRangeScan, mrpt::utils::CImage, mrpt::detectors::CDetectable3D, mrpt::gui::CDisplayWindow3D, mrpt::hmtslam::THypothesisIDSet, mrpt::hmtslam::CLocalMetricHypothesis, mrpt::obs::CObservationIMU, mrpt::poses::CPose3D, mrpt::maps::CMultiMetricMapPDF, mrpt::maps::CHeightGridMap2D, mrpt::maps::COccupancyGridMap2D, mrpt::obs::CObservationRGBD360, mrpt::hmtslam::CHMTSLAM, mrpt::maps::CLandmarksMap, mrpt::opengl::COctoMapVoxels, mrpt::poses::CPointPDFParticles, mrpt::opengl::COpenGLViewport, mrpt::maps::TMapGenericParams, mrpt::vision::CFeature, mrpt::kinematics::CKinematicChain, mrpt::poses::CPose3DInterpolator, mrpt::opengl::CPlanarLaserScan, mrpt::obs::CObservation2DRangeScan, mrpt::obs::CRawlog, mrpt::obs::CSensoryFrame, mrpt::opengl::CPointCloud, mrpt::detectors::CDetectable2D, mrpt::opengl::COpenGLScene, mrpt::opengl::CPointCloudColoured, mrpt::pbmap::Plane, mrpt::opengl::CFrustum, mrpt::maps::CBeaconMap, mrpt::pbmap::PbMap, mrpt::utils::CMHPropertiesValuesList, mrpt::maps::CReflectivityGridMap2D, mrpt::opengl::CEllipsoidInverseDepth3D, mrpt::hmtslam::CLSLAMParticleData, mrpt::opengl::CEllipsoid, mrpt::opengl::CEllipsoidInverseDepth2D, mrpt::opengl::CText3D, mrpt::opengl::CVectorField3D, mrpt::poses::CPose3DQuat, mrpt::poses::CPose3DRotVec, mrpt::hmtslam::CHMHMapNode, mrpt::obs::CObservationStereoImages, mrpt::opengl::CAssimpModel, mrpt::poses::CPose3DQuatPDFGaussianInf, mrpt::maps::CBeacon, mrpt::opengl::CMeshFast, mrpt::poses::CPose3DQuatPDFGaussian, mrpt::opengl::CEllipsoidRangeBearing2D, mrpt::opengl::CMesh, mrpt::poses::CPose3DPDFGaussianInf, mrpt::opengl::CAngularObservationMesh, mrpt::obs::CObservationStereoImagesFeatures, mrpt::opengl::CText, mrpt::poses::CPose2D, mrpt::poses::CPose3DPDFGaussian, mrpt::hmtslam::CRobotPosesGraph, mrpt::maps::CRBPFParticleData, mrpt::poses::CPoint2D, mrpt::poses::CPose3DPDFParticles, mrpt::poses::CPosePDFParticles, mrpt::poses::CPosePDFSOG, mrpt::maps::CGasConcentrationGridMap2D, mrpt::poses::CPointPDFSOG, mrpt::maps::COctoMap, mrpt::obs::CObservationImage, mrpt::opengl::CBox, mrpt::opengl::CVectorField2D, mrpt::poses::CPose3DPDFSOG, mrpt::poses::CPosePDFGaussianInf, mrpt::gui::CDisplayWindowPlots, mrpt::hmtslam::CHierarchicalMHMap, mrpt::hmtslam::CHMHMapArc, mrpt::maps::CWirelessPowerGridMap2D, mrpt::maps::CSimpleMap, mrpt::obs::CObservationBatteryState, mrpt::opengl::CGridPlaneXY, mrpt::opengl::CGridPlaneXZ, mrpt::maps::CLandmark, mrpt::maps::CSimplePointsMap, mrpt::opengl::CArrow, mrpt::opengl::CAxis, mrpt::opengl::CDisk, mrpt::opengl::CSetOfLines, mrpt::opengl::CSphere, mrpt::slam::CIncrementalMapPartitioner, mrpt::poses::CPoint3D, mrpt::poses::CPosePDFGaussian, mrpt::utils::CStringList, mrpt::maps::CColouredOctoMap, mrpt::maps::CColouredPointsMap, mrpt::maps::CWeightedPointsMap, mrpt::obs::CObservationWindSensor, mrpt::opengl::CCamera, mrpt::opengl::CPolyhedron, mrpt::obs::CObservationOdometry, mrpt::opengl::CSetOfObjects, mrpt::math::CMatrix, mrpt::math::CMatrixD, mrpt::poses::CPosePDFGrid, mrpt::utils::CMemoryChunk, mrpt::utils::TCamera, mrpt::obs::CActionCollection, mrpt::obs::CObservationRange, mrpt::obs::CObservationRawDAQ, mrpt::obs::CObservationSkeleton, mrpt::math::CSplineInterpolator1D, mrpt::utils::CPropertiesValuesList, mrpt::utils::CSimpleDatabaseTable, mrpt::gui::CDisplayWindow, mrpt::nav::CLogFileRecord_VFF, mrpt::nav::CLogFileRecord, mrpt::obs::CActionRobotMovement2D, mrpt::obs::CObservationBearingRange, mrpt::obs::CObservationGasSensors, mrpt::obs::CObservationWirelessPower, mrpt::obs::CObservationVisualLandmarks, mrpt::poses::CPoses2DSequence, mrpt::poses::CPoses3DSequence, mrpt::obs::CActionRobotMovement3D, mrpt::obs::CObservation6DFeatures, mrpt::obs::CObservationBeaconRanges, mrpt::obs::CObservationComment, mrpt::obs::CObservationGPS, mrpt::obs::CObservationRFID, mrpt::opengl::CCylinder, mrpt::opengl::CSetOfTriangles, mrpt::poses::TSimple3DPoint, mrpt::obs::CObservationReflectivity, mrpt::opengl::C3DSScene, mrpt::opengl::CSetOfTexturedTriangles, mrpt::math::CMatrixB, mrpt::poses::CPointPDFGaussian, mrpt::obs::CObservationCANBusJ1939, mrpt::opengl::CGeneralizedCylinder, mrpt::opengl::CSimpleLine, mrpt::opengl::CTexturedPlane, mrpt::math::CPolygon, mrpt::utils::CTypeSelector, mrpt::poses::CPoint2DPDFGaussian, mrpt::utils::TStereoCamera, and mrpt::opengl::COpenGLStandardObject.

mrpt::utils::CObjectPtr mrpt::utils::CObject::duplicateGetSmartPtr ( ) const
inlineinherited

Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer).

Definition at line 136 of file CObject.h.

bool mrpt::maps::CRandomFieldGridMap2D::exist_relation_between2cells ( const mrpt::maps::COccupancyGridMap2D m_Ocgridmap,
size_t  cxo_min,
size_t  cxo_max,
size_t  cyo_min,
size_t  cyo_max,
const size_t  seed_cxo,
const size_t  seed_cyo,
const size_t  objective_cxo,
const size_t  objective_cyo 
)
protected

Check if two cells of the gridmap (m_map) are connected, based on the provided occupancy gridmap.

void mrpt::utils::CDynamicGrid< TRandomFieldCell >::fill ( const TRandomFieldCell &  value)
inlineinherited

Fills all the cells with the same value.

Definition at line 107 of file CDynamicGrid.h.

virtual void mrpt::maps::CRandomFieldGridMap2D::getAs3DObject ( mrpt::opengl::CSetOfObjectsPtr &  outObj) const
virtual

Returns a 3D object representing the map (mean).

Implements mrpt::maps::CMetricMap.

Reimplemented in mrpt::maps::CGasConcentrationGridMap2D, and mrpt::maps::CWirelessPowerGridMap2D.

virtual void mrpt::maps::CRandomFieldGridMap2D::getAs3DObject ( mrpt::opengl::CSetOfObjectsPtr &  meanObj,
mrpt::opengl::CSetOfObjectsPtr &  varObj 
) const
virtual

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

Reimplemented in mrpt::maps::CGasConcentrationGridMap2D.

virtual void mrpt::maps::CRandomFieldGridMap2D::getAsBitmapFile ( mrpt::utils::CImage out_img) const
virtual

Returns an image just as described in saveAsBitmapFile.

Reimplemented in mrpt::maps::CGasConcentrationGridMap2D, and mrpt::maps::CWirelessPowerGridMap2D.

void mrpt::maps::CRandomFieldGridMap2D::getAsMatlab3DGraphScript ( std::string &  out_script) const

Return a large text block with a MATLAB script to plot the contents of this map.

See also
saveAsMatlab3DGraph This method can only be called in a KF map model.
void mrpt::utils::CDynamicGrid< TRandomFieldCell >::getAsMatrix ( MAT &  m) const
inlineinherited

Get the entire grid as a matrix.

Template Parameters
MATThe type of the matrix, typically a mrpt::math::CMatrixDouble.
Parameters
[out]mThe output matrix; will be set automatically to the correct size. Entry (cy,cx) in the matrix contains the grid cell with indices (cx,cy).
Note
This method will compile only for cell types that can be converted to the type of the matrix elements (e.g. double).

Definition at line 297 of file CDynamicGrid.h.

virtual const mrpt::maps::CSimplePointsMap* mrpt::maps::CMetricMap::getAsSimplePointsMap ( ) const
inlinevirtualinherited

If the map is a simple points map or it's a multi-metric map that contains EXACTLY one simple points map, return it.

Otherwise, return NULL

Reimplemented in mrpt::maps::CPointsMap, mrpt::maps::CMultiMetricMap, and mrpt::maps::CSimplePointsMap.

Definition at line 248 of file maps/CMetricMap.h.

virtual mrpt::maps::CSimplePointsMap* mrpt::maps::CMetricMap::getAsSimplePointsMap ( )
inlinevirtualinherited
virtual CRandomFieldGridMap2D::TInsertionOptionsCommon* mrpt::maps::CRandomFieldGridMap2D::getCommonInsertOptions ( )
protectedpure virtual

Get the part of the options common to all CRandomFieldGridMap2D classes.

Implemented in mrpt::maps::CGasConcentrationGridMap2D, and mrpt::maps::CWirelessPowerGridMap2D.

TMapRepresentation mrpt::maps::CRandomFieldGridMap2D::getMapType ( )

Return the type of the random-field grid map, according to parameters passed on construction.

void mrpt::maps::CRandomFieldGridMap2D::getMeanAndCov ( mrpt::math::CVectorDouble out_means,
mrpt::math::CMatrixDouble out_cov 
) const

Return the mean and covariance vector of the full Kalman filter estimate (works for all KF-based methods).

void mrpt::maps::CRandomFieldGridMap2D::getMeanAndSTD ( mrpt::math::CVectorDouble out_means,
mrpt::math::CVectorDouble out_STD 
) const

Return the mean and STD vectors of the full Kalman filter estimate (works for all KF-based methods).

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::getResolution ( ) const
inlineinherited

Returns the resolution of the grid map.

Definition at line 257 of file CDynamicGrid.h.

virtual const mrpt::utils::TRuntimeClassId* mrpt::maps::CRandomFieldGridMap2D::GetRuntimeClass ( ) const
virtual

Returns information about the class of an object in runtime.

Reimplemented from mrpt::maps::CMetricMap.

Reimplemented in mrpt::maps::CGasConcentrationGridMap2D, and mrpt::maps::CWirelessPowerGridMap2D.

size_t mrpt::utils::CDynamicGrid< TRandomFieldCell >::getSizeX ( ) const
inlineinherited

Returns the horizontal size of grid map in cells count.

Definition at line 233 of file CDynamicGrid.h.

size_t mrpt::utils::CDynamicGrid< TRandomFieldCell >::getSizeY ( ) const
inlineinherited

Returns the vertical size of grid map in cells count.

Definition at line 237 of file CDynamicGrid.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::getXMax ( ) const
inlineinherited

Returns the "x" coordinate of right side of grid map.

Definition at line 245 of file CDynamicGrid.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::getXMin ( ) const
inlineinherited

Returns the "x" coordinate of left side of grid map.

Definition at line 241 of file CDynamicGrid.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::getYMax ( ) const
inlineinherited

Returns the "y" coordinate of bottom side of grid map.

Definition at line 253 of file CDynamicGrid.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::getYMin ( ) const
inlineinherited

Returns the "y" coordinate of top side of grid map.

Definition at line 249 of file CDynamicGrid.h.

bool mrpt::utils::CObservable::hasSubscribers ( ) const
inlineprotectedinherited

Can be called by a derived class before preparing an event for publishing with publishEvent to determine if there is no one subscribed, so it can save the wasted time preparing an event that will be not read.

Definition at line 52 of file CObservable.h.

void mrpt::utils::CDynamicGrid< TRandomFieldCell >::idx2cxcy ( const int &  idx,
int &  cx,
int &  cy 
) const
inlineinherited

Transform a global (linear) cell index value into its corresponding (x,y) cell indexes.

Definition at line 266 of file CDynamicGrid.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::idx2x ( int  cx) const
inlineinherited

Transform a cell index into a coordinate value.

Definition at line 274 of file CDynamicGrid.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::idx2y ( int  cy) const
inlineinherited

Definition at line 275 of file CDynamicGrid.h.

void mrpt::maps::CRandomFieldGridMap2D::insertIndividualReading ( const float  sensorReading,
const mrpt::math::TPoint2D point 
)

Direct update of the map with a reading in a given position of the map, using the appropriate method according to mapType passed in the constructor.

This is a direct way to update the map, an alternative to the generic insertObservation() method which works with mrpt::obs::CObservation objects.

bool mrpt::maps::CMetricMap::insertObservation ( const mrpt::obs::CObservation obs,
const mrpt::poses::CPose3D robotPose = NULL 
)
inherited

Insert the observation information into this map.

This method must be implemented in derived classes.

Parameters
obsThe observation
robotPoseThe 3D pose of the robot mobile base in the map reference system, or NULL (default) if you want to use the origin.
See also
CObservation::insertObservationInto
void mrpt::maps::CRandomFieldGridMap2D::insertObservation_GMRF ( float  normReading,
const mrpt::math::TPoint2D point 
)
protected

The implementation of "insertObservation" for the Gaussian Markov Random Field map model.

Parameters
normReadingIs a [0,1] normalized concentration reading.
pointIs the sensor location on the map
void mrpt::maps::CRandomFieldGridMap2D::insertObservation_KernelDM_DMV ( float  normReading,
const mrpt::math::TPoint2D point,
bool  is_DMV 
)
protected

The implementation of "insertObservation" for Achim Lilienthal's map models DM & DM+V.

Parameters
normReadingIs a [0,1] normalized concentration reading.
pointIs the sensor location on the map
is_DMV= false -> map type is Kernel DM; true -> map type is DM+V
void mrpt::maps::CRandomFieldGridMap2D::insertObservation_KF ( float  normReading,
const mrpt::math::TPoint2D point 
)
protected

The implementation of "insertObservation" for the (whole) Kalman Filter map model.

Parameters
normReadingIs a [0,1] normalized concentration reading.
pointIs the sensor location on the map
void mrpt::maps::CRandomFieldGridMap2D::insertObservation_KF2 ( float  normReading,
const mrpt::math::TPoint2D point 
)
protected

The implementation of "insertObservation" for the Efficient Kalman Filter map model.

Parameters
normReadingIs a [0,1] normalized concentration reading.
pointIs the sensor location on the map
bool mrpt::maps::CMetricMap::insertObservationPtr ( const mrpt::obs::CObservationPtr &  obs,
const mrpt::poses::CPose3D robotPose = NULL 
)
inherited

A wrapper for smart pointers, just calls the non-smart pointer version.

virtual void mrpt::maps::CRandomFieldGridMap2D::internal_clear ( )
protectedvirtual

Erase all the contents of the map.

Implements mrpt::maps::CMetricMap.

Reimplemented in mrpt::maps::CGasConcentrationGridMap2D, and mrpt::maps::CWirelessPowerGridMap2D.

virtual bool mrpt::maps::CRandomFieldGridMap2D::isEmpty ( ) const
virtual

Returns true if the map is empty/no observation has been inserted (in this class it always return false, unless redefined otherwise in base classes)

Implements mrpt::maps::CMetricMap.

void mrpt::maps::CMetricMap::loadFromProbabilisticPosesAndObservations ( const mrpt::maps::CSimpleMap Map)
inherited

Load the map contents from a CSimpleMap object, erasing all previous content of the map.

This is automaticed invoking "insertObservation" for each observation at the mean 3D robot pose as given by the "poses::CPosePDF" in the CSimpleMap object.

See also
insertObservation, CSimpleMap
Exceptions
std::exceptionSome internal steps in invoked methods can raise exceptions on invalid parameters, etc...
void mrpt::maps::CMetricMap::loadFromSimpleMap ( const mrpt::maps::CSimpleMap Map)
inlineinherited

Load the map contents from a CSimpleMap object, erasing all previous content of the map.

This is automaticed invoking "insertObservation" for each observation at the mean 3D robot pose as given by the "poses::CPosePDF" in the CSimpleMap object.

See also
insertObservation, CSimpleMap
Exceptions
std::exceptionSome internal steps in invoked methods can raise exceptions on invalid parameters, etc...

Definition at line 103 of file maps/CMetricMap.h.

std::vector<TRandomFieldCell >& mrpt::utils::CDynamicGrid< TRandomFieldCell >::m_map_castaway_const ( ) const
inlineprotectedinherited

Used only from logically const method that really need to modify the object.

Definition at line 47 of file CDynamicGrid.h.

virtual void mrpt::maps::CRandomFieldGridMap2D::predictMeasurement ( const double &  x,
const double &  y,
double &  out_predict_response,
double &  out_predict_response_variance 
)
virtual

Returns the prediction of the measurement at some (x,y) coordinates, and its certainty (in the form of the expected variance).

This methods is implemented differently for the different gas map types.

void mrpt::utils::CObservable::publishEvent ( const mrptEvent e) const
protectedinherited

Called when you want this object to emit an event to all the observers currently subscribed to this object.

virtual void mrpt::utils::CSerializable::readFromStream ( mrpt::utils::CStream in,
int  version 
)
protectedpure virtualinherited

Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori.

Parameters
inThe input binary stream where the object data must read from.
versionThe version of the object stored in the stream: use this version number in your code to know how to read the incoming data.
Exceptions
std::exceptionOn any error, see CStream::ReadBuffer
See also
CStream

Implemented in mrpt::nav::CLogFileRecord_ND, mrpt::utils::CSimpleDatabase, mrpt::maps::CMultiMetricMap, mrpt::obs::CObservation3DRangeScan, mrpt::utils::CImage, mrpt::detectors::CDetectable3D, mrpt::hmtslam::THypothesisIDSet, mrpt::hmtslam::CLocalMetricHypothesis, mrpt::obs::CObservationIMU, mrpt::poses::CPose3D, mrpt::maps::CMultiMetricMapPDF, mrpt::maps::CHeightGridMap2D, mrpt::maps::COccupancyGridMap2D, mrpt::obs::CObservationRGBD360, mrpt::hmtslam::CHMTSLAM, mrpt::maps::CLandmarksMap, mrpt::opengl::COctoMapVoxels, mrpt::poses::CPointPDFParticles, mrpt::opengl::COpenGLViewport, mrpt::maps::TMapGenericParams, mrpt::vision::CFeature, mrpt::kinematics::CKinematicChain, mrpt::poses::CPose3DInterpolator, mrpt::opengl::CPlanarLaserScan, mrpt::obs::CObservation2DRangeScan, mrpt::obs::CRawlog, mrpt::obs::CSensoryFrame, mrpt::opengl::CPointCloud, mrpt::detectors::CDetectable2D, mrpt::opengl::COpenGLScene, mrpt::opengl::CPointCloudColoured, mrpt::pbmap::Plane, mrpt::opengl::CFrustum, mrpt::maps::CBeaconMap, mrpt::pbmap::PbMap, mrpt::utils::CMHPropertiesValuesList, mrpt::maps::CReflectivityGridMap2D, mrpt::opengl::CEllipsoidInverseDepth3D, mrpt::hmtslam::CLSLAMParticleData, mrpt::opengl::CEllipsoid, mrpt::opengl::CEllipsoidInverseDepth2D, mrpt::opengl::CText3D, mrpt::opengl::CVectorField3D, mrpt::poses::CPose3DQuat, mrpt::poses::CPose3DRotVec, mrpt::hmtslam::CHMHMapNode, mrpt::obs::CObservationStereoImages, mrpt::opengl::CAssimpModel, mrpt::poses::CPose3DQuatPDFGaussianInf, mrpt::maps::CBeacon, mrpt::opengl::CMeshFast, mrpt::poses::CPose3DQuatPDFGaussian, mrpt::opengl::CEllipsoidRangeBearing2D, mrpt::opengl::CMesh, mrpt::poses::CPose3DPDFGaussianInf, mrpt::opengl::CAngularObservationMesh, mrpt::obs::CObservationStereoImagesFeatures, mrpt::opengl::CText, mrpt::poses::CPose2D, mrpt::poses::CPose3DPDFGaussian, mrpt::hmtslam::CRobotPosesGraph, mrpt::maps::CRBPFParticleData, mrpt::poses::CPoint2D, mrpt::poses::CPose3DPDFParticles, mrpt::poses::CPosePDFParticles, mrpt::poses::CPosePDFSOG, mrpt::maps::CGasConcentrationGridMap2D, mrpt::poses::CPointPDFSOG, mrpt::maps::COctoMap, mrpt::obs::CObservationImage, mrpt::opengl::CBox, mrpt::opengl::CVectorField2D, mrpt::poses::CPose3DPDFSOG, mrpt::poses::CPosePDFGaussianInf, mrpt::hmtslam::CHierarchicalMHMap, mrpt::hmtslam::CHMHMapArc, mrpt::maps::CWirelessPowerGridMap2D, mrpt::maps::CSimpleMap, mrpt::obs::CObservationBatteryState, mrpt::opengl::CGridPlaneXY, mrpt::opengl::CGridPlaneXZ, mrpt::maps::CLandmark, mrpt::maps::CSimplePointsMap, mrpt::opengl::CArrow, mrpt::opengl::CAxis, mrpt::opengl::CDisk, mrpt::opengl::CSetOfLines, mrpt::opengl::CSphere, mrpt::slam::CIncrementalMapPartitioner, mrpt::poses::CPoint3D, mrpt::poses::CPosePDFGaussian, mrpt::utils::CStringList, mrpt::maps::CColouredOctoMap, mrpt::maps::CColouredPointsMap, mrpt::maps::CWeightedPointsMap, mrpt::obs::CObservationWindSensor, mrpt::opengl::CCamera, mrpt::opengl::CPolyhedron, mrpt::obs::CObservationOdometry, mrpt::opengl::CSetOfObjects, mrpt::math::CMatrix, mrpt::math::CMatrixD, mrpt::poses::CPosePDFGrid, mrpt::utils::CMemoryChunk, mrpt::utils::TCamera, mrpt::obs::CActionCollection, mrpt::obs::CObservationRange, mrpt::obs::CObservationRawDAQ, mrpt::obs::CObservationSkeleton, mrpt::math::CSplineInterpolator1D, mrpt::utils::CPropertiesValuesList, mrpt::utils::CSimpleDatabaseTable, mrpt::nav::CLogFileRecord_VFF, mrpt::nav::CLogFileRecord, mrpt::obs::CActionRobotMovement2D, mrpt::obs::CObservationBearingRange, mrpt::obs::CObservationGasSensors, mrpt::obs::CObservationWirelessPower, mrpt::obs::CObservationVisualLandmarks, mrpt::poses::CPoses2DSequence, mrpt::poses::CPoses3DSequence, mrpt::obs::CActionRobotMovement3D, mrpt::obs::CObservation6DFeatures, mrpt::obs::CObservationBeaconRanges, mrpt::obs::CObservationComment, mrpt::obs::CObservationGPS, mrpt::obs::CObservationRFID, mrpt::opengl::CCylinder, mrpt::opengl::CSetOfTriangles, mrpt::poses::TSimple3DPoint, mrpt::obs::CObservationReflectivity, mrpt::opengl::C3DSScene, mrpt::opengl::CSetOfTexturedTriangles, mrpt::math::CMatrixB, mrpt::poses::CPointPDFGaussian, mrpt::obs::CObservationCANBusJ1939, mrpt::opengl::CGeneralizedCylinder, mrpt::opengl::CSimpleLine, mrpt::opengl::CTexturedPlane, mrpt::math::CPolygon, mrpt::utils::CTypeSelector, mrpt::poses::CPoint2DPDFGaussian, mrpt::utils::TStereoCamera, and mrpt::opengl::COpenGLStandardObject.

Referenced by mrpt::maps::COctoMapBase< OCTREE, OCTREE_NODE >::TRenderingOptions::TRenderingOptions(), and mrpt::maps::COctoMapBase< OCTREE, OCTREE_NODE >::TLikelihoodOptions::~TLikelihoodOptions().

void mrpt::maps::CRandomFieldGridMap2D::recoverMeanAndCov ( ) const
protected

In the KF2 implementation, takes the auxiliary matrices and from them update the cells' mean and std values.

See also
m_hasToRecoverMeanAndCov
virtual void mrpt::utils::CDynamicGrid< TRandomFieldCell >::resize ( float  new_x_min,
float  new_x_max,
float  new_y_min,
float  new_y_max,
const TRandomFieldCell &  defaultValueNewCells,
float  additionalMarginMeters = 2.0f 
)
inlinevirtualinherited

Changes the size of the grid, maintaining previous contents.

See also
setSize

Definition at line 115 of file CDynamicGrid.h.

References mrpt::utils::round().

virtual void mrpt::maps::CRandomFieldGridMap2D::resize ( float  new_x_min,
float  new_x_max,
float  new_y_min,
float  new_y_max,
const TRandomFieldCell defaultValueNewCells,
float  additionalMarginMeters = 1.0f 
)
virtual

Changes the size of the grid, maintaining previous contents.

See also
setSize
virtual void mrpt::maps::CRandomFieldGridMap2D::saveAsBitmapFile ( const std::string &  filName) const
virtual

Save the current map as a graphical file (BMP,PNG,...).

The file format will be derived from the file extension (see CImage::saveToFile ) It depends on the map representation model: mrAchim: Each pixel is the ratio $ \sum{\frac{wR}{w}} $ mrKalmanFilter: Each pixel is the mean value of the Gaussian that represents each cell.

See also
getAsBitmapFile()
virtual void mrpt::maps::CRandomFieldGridMap2D::saveAsMatlab3DGraph ( const std::string &  filName) const
virtual

Save a matlab ".m" file which represents as 3D surfaces the mean and a given confidence level for the concentration of each cell.

This method can only be called in a KF map model.

See also
getAsMatlab3DGraphScript

Reimplemented in mrpt::maps::CGasConcentrationGridMap2D, and mrpt::maps::CWirelessPowerGridMap2D.

virtual void mrpt::maps::CRandomFieldGridMap2D::saveMetricMapRepresentationToFile ( const std::string &  filNamePrefix) const
virtual

The implementation in this class just calls all the corresponding method of the contained metric maps.

Implements mrpt::maps::CMetricMap.

Reimplemented in mrpt::maps::CGasConcentrationGridMap2D, and mrpt::maps::CWirelessPowerGridMap2D.

bool mrpt::utils::CDynamicGrid< TRandomFieldCell >::saveToTextFile ( const std::string &  fileName) const
inlineinherited

Saves a float representation of the grid (via "cell2float()") to a text file.

Returns
false on error

Definition at line 314 of file CDynamicGrid.h.

void mrpt::maps::CRandomFieldGridMap2D::setMeanAndSTD ( mrpt::math::CVectorDouble out_means,
mrpt::math::CVectorDouble out_STD 
)

Load the mean and STD vectors of the full Kalman filter estimate (works for all KF-based methods).

void mrpt::utils::CDynamicGrid< TRandomFieldCell >::setSize ( const float  x_min,
const float  x_max,
const float  y_min,
const float  y_max,
const float  resolution,
const TRandomFieldCell *  fill_value = NULL 
)
inlineinherited

Changes the size of the grid, ERASING all previous contents.

If fill_value is left as NULL, the contents of cells may be undefined (some will remain with their old values, the new ones will have the default cell value, but the location of old values may change wrt their old places). If fill_value is not NULL, it is assured that all cells will have a copy of that value after resizing.

See also
resize, fill

Definition at line 75 of file CDynamicGrid.h.

References mrpt::utils::round().

virtual float mrpt::maps::CMetricMap::squareDistanceToClosestCorrespondence ( float  x0,
float  y0 
) const
virtualinherited

Returns the square distance from the 2D point (x0,y0) to the closest correspondence in the map.

Reimplemented in mrpt::maps::CPointsMap.

void mrpt::maps::CRandomFieldGridMap2D::updateMapEstimation_GMRF ( )
protected

solves the minimum quadratic system to determine the new concentration of each cell

virtual mxArray* mrpt::utils::CSerializable::writeToMatlab ( ) const
inlinevirtualinherited

Introduces a pure virtual method responsible for writing to a mxArray Matlab object, typically a MATLAB struct whose contents are documented in each derived class.

Returns
A new mxArray (caller is responsible of memory freeing) or NULL is class does not support conversion to MATLAB.

Definition at line 79 of file CSerializable.h.

References BASE_IMPEXP, mrpt::utils::CSerializablePtr, DEFINE_MRPT_OBJECT_POST, mrpt::utils::ObjectToOctetVector(), mrpt::utils::ObjectToRawString(), mrpt::utils::ObjectToString(), mrpt::utils::OctetVectorToObject(), mrpt::utils::RawStringToObject(), and mrpt::utils::StringToObject().

virtual void mrpt::utils::CSerializable::writeToStream ( mrpt::utils::CStream out,
int *  getVersion 
) const
protectedpure virtualinherited

Introduces a pure virtual method responsible for writing to a CStream.

This can not be used directly be users, instead use "stream << object;" for writing it to a stream.

Parameters
outThe output binary stream where object must be dumped.
getVersionIf NULL, the object must be dumped. If not, only the version of the object dump must be returned in this pointer. This enables the versioning of objects dumping and backward compatibility with previously stored data.
Exceptions
std::exceptionOn any error, see CStream::WriteBuffer
See also
CStream

Implemented in mrpt::nav::CLogFileRecord_ND, mrpt::utils::CSimpleDatabase, mrpt::maps::CMultiMetricMap, mrpt::obs::CObservation3DRangeScan, mrpt::utils::CImage, mrpt::detectors::CDetectable3D, mrpt::hmtslam::THypothesisIDSet, mrpt::hmtslam::CLocalMetricHypothesis, mrpt::obs::CObservationIMU, mrpt::poses::CPose3D, mrpt::maps::CMultiMetricMapPDF, mrpt::maps::CHeightGridMap2D, mrpt::maps::COccupancyGridMap2D, mrpt::obs::CObservationRGBD360, mrpt::hmtslam::CHMTSLAM, mrpt::maps::CLandmarksMap, mrpt::opengl::COctoMapVoxels, mrpt::poses::CPointPDFParticles, mrpt::opengl::COpenGLViewport, mrpt::maps::TMapGenericParams, mrpt::vision::CFeature, mrpt::kinematics::CKinematicChain, mrpt::poses::CPose3DInterpolator, mrpt::opengl::CPlanarLaserScan, mrpt::obs::CObservation2DRangeScan, mrpt::obs::CRawlog, mrpt::obs::CSensoryFrame, mrpt::opengl::CPointCloud, mrpt::detectors::CDetectable2D, mrpt::opengl::COpenGLScene, mrpt::opengl::CPointCloudColoured, mrpt::pbmap::Plane, mrpt::opengl::CFrustum, mrpt::maps::CBeaconMap, mrpt::pbmap::PbMap, mrpt::utils::CMHPropertiesValuesList, mrpt::maps::CReflectivityGridMap2D, mrpt::opengl::CEllipsoidInverseDepth3D, mrpt::hmtslam::CLSLAMParticleData, mrpt::opengl::CEllipsoid, mrpt::opengl::CEllipsoidInverseDepth2D, mrpt::opengl::CText3D, mrpt::opengl::CVectorField3D, mrpt::poses::CPose3DQuat, mrpt::poses::CPose3DRotVec, mrpt::hmtslam::CHMHMapNode, mrpt::obs::CObservationStereoImages, mrpt::opengl::CAssimpModel, mrpt::poses::CPose3DQuatPDFGaussianInf, mrpt::maps::CBeacon, mrpt::opengl::CMeshFast, mrpt::poses::CPose3DQuatPDFGaussian, mrpt::opengl::CEllipsoidRangeBearing2D, mrpt::opengl::CMesh, mrpt::poses::CPose3DPDFGaussianInf, mrpt::opengl::CAngularObservationMesh, mrpt::obs::CObservationStereoImagesFeatures, mrpt::opengl::CText, mrpt::poses::CPose2D, mrpt::poses::CPose3DPDFGaussian, mrpt::hmtslam::CRobotPosesGraph, mrpt::maps::CRBPFParticleData, mrpt::poses::CPoint2D, mrpt::poses::CPose3DPDFParticles, mrpt::poses::CPosePDFParticles, mrpt::poses::CPosePDFSOG, mrpt::maps::CGasConcentrationGridMap2D, mrpt::poses::CPointPDFSOG, mrpt::maps::COctoMap, mrpt::obs::CObservationImage, mrpt::opengl::CBox, mrpt::opengl::CVectorField2D, mrpt::poses::CPose3DPDFSOG, mrpt::poses::CPosePDFGaussianInf, mrpt::hmtslam::CHierarchicalMHMap, mrpt::hmtslam::CHMHMapArc, mrpt::maps::CWirelessPowerGridMap2D, mrpt::maps::CSimpleMap, mrpt::obs::CObservationBatteryState, mrpt::opengl::CGridPlaneXY, mrpt::opengl::CGridPlaneXZ, mrpt::maps::CLandmark, mrpt::maps::CSimplePointsMap, mrpt::opengl::CArrow, mrpt::opengl::CAxis, mrpt::opengl::CDisk, mrpt::opengl::CSetOfLines, mrpt::opengl::CSphere, mrpt::slam::CIncrementalMapPartitioner, mrpt::poses::CPoint3D, mrpt::poses::CPosePDFGaussian, mrpt::utils::CStringList, mrpt::maps::CColouredOctoMap, mrpt::maps::CColouredPointsMap, mrpt::maps::CWeightedPointsMap, mrpt::obs::CObservationWindSensor, mrpt::opengl::CCamera, mrpt::opengl::CPolyhedron, mrpt::obs::CObservationOdometry, mrpt::opengl::CSetOfObjects, mrpt::math::CMatrix, mrpt::math::CMatrixD, mrpt::poses::CPosePDFGrid, mrpt::utils::CMemoryChunk, mrpt::utils::TCamera, mrpt::obs::CActionCollection, mrpt::obs::CObservationRange, mrpt::obs::CObservationRawDAQ, mrpt::obs::CObservationSkeleton, mrpt::math::CSplineInterpolator1D, mrpt::utils::CPropertiesValuesList, mrpt::utils::CSimpleDatabaseTable, mrpt::nav::CLogFileRecord_VFF, mrpt::nav::CLogFileRecord, mrpt::obs::CActionRobotMovement2D, mrpt::obs::CObservationBearingRange, mrpt::obs::CObservationGasSensors, mrpt::obs::CObservationWirelessPower, mrpt::obs::CObservationVisualLandmarks, mrpt::poses::CPoses2DSequence, mrpt::poses::CPoses3DSequence, mrpt::obs::CActionRobotMovement3D, mrpt::obs::CObservation6DFeatures, mrpt::obs::CObservationBeaconRanges, mrpt::obs::CObservationComment, mrpt::obs::CObservationGPS, mrpt::obs::CObservationRFID, mrpt::opengl::CCylinder, mrpt::opengl::CSetOfTriangles, mrpt::poses::TSimple3DPoint, mrpt::obs::CObservationReflectivity, mrpt::opengl::C3DSScene, mrpt::opengl::CSetOfTexturedTriangles, mrpt::math::CMatrixB, mrpt::poses::CPointPDFGaussian, mrpt::obs::CObservationCANBusJ1939, mrpt::opengl::CGeneralizedCylinder, mrpt::opengl::CSimpleLine, mrpt::opengl::CTexturedPlane, mrpt::math::CPolygon, mrpt::utils::CTypeSelector, mrpt::poses::CPoint2DPDFGaussian, mrpt::utils::TStereoCamera, and mrpt::opengl::COpenGLStandardObject.

Referenced by mrpt::maps::COctoMapBase< OCTREE, OCTREE_NODE >::TRenderingOptions::TRenderingOptions(), and mrpt::maps::COctoMapBase< OCTREE, OCTREE_NODE >::TLikelihoodOptions::~TLikelihoodOptions().

int mrpt::utils::CDynamicGrid< TRandomFieldCell >::x2idx ( float  x) const
inlineinherited

Transform a coordinate values into cell indexes.

Definition at line 261 of file CDynamicGrid.h.

int mrpt::utils::CDynamicGrid< TRandomFieldCell >::x2idx ( float  x,
float  x_min 
) const
inlineinherited

Transform a coordinate value into a cell index, using a diferent "x_min" value.

Definition at line 279 of file CDynamicGrid.h.

References MRPT_UNUSED_PARAM.

int mrpt::utils::CDynamicGrid< TRandomFieldCell >::xy2idx ( float  x,
float  y 
) const
inlineinherited

Definition at line 263 of file CDynamicGrid.h.

int mrpt::utils::CDynamicGrid< TRandomFieldCell >::y2idx ( float  y) const
inlineinherited

Definition at line 262 of file CDynamicGrid.h.

int mrpt::utils::CDynamicGrid< TRandomFieldCell >::y2idx ( float  y,
float  y_min 
) const
inlineinherited

Definition at line 284 of file CDynamicGrid.h.

References MRPT_UNUSED_PARAM.

Friends And Related Function Documentation

friend class mrpt::utils::CStream
friend

Definition at line 115 of file maps/CRandomFieldGridMap2D.h.

Member Data Documentation

std::vector<std::vector<TobservationGMRF> > mrpt::maps::CRandomFieldGridMap2D::activeObs
protected

Definition at line 347 of file maps/CRandomFieldGridMap2D.h.

std::multimap<size_t,size_t> mrpt::maps::CRandomFieldGridMap2D::cell_interconnections
protected

Definition at line 336 of file maps/CRandomFieldGridMap2D.h.

const mrpt::utils::TRuntimeClassId mrpt::maps::CMetricMap::classCMetricMap
staticinherited

Definition at line 55 of file maps/CMetricMap.h.

const mrpt::utils::TRuntimeClassId mrpt::utils::CObject::classCObject
staticinherited

Definition at line 124 of file CObject.h.

const mrpt::utils::TRuntimeClassId mrpt::maps::CRandomFieldGridMap2D::classCRandomFieldGridMap2D
static

Definition at line 115 of file maps/CRandomFieldGridMap2D.h.

const mrpt::utils::TRuntimeClassId mrpt::utils::CSerializable::classCSerializable
staticinherited

Definition at line 42 of file CSerializable.h.

Eigen::VectorXd mrpt::maps::CRandomFieldGridMap2D::g
protected

Definition at line 332 of file maps/CRandomFieldGridMap2D.h.

std::vector<float> mrpt::maps::CRandomFieldGridMap2D::gauss_val
protected

Definition at line 338 of file maps/CRandomFieldGridMap2D.h.

TMapGenericParams mrpt::maps::CMetricMap::genericMapParams
inherited

Common params to all maps.

Definition at line 235 of file maps/CMetricMap.h.

size_t mrpt::maps::CRandomFieldGridMap2D::m_average_normreadings_count
protected

Definition at line 324 of file maps/CRandomFieldGridMap2D.h.

double mrpt::maps::CRandomFieldGridMap2D::m_average_normreadings_mean
protected

Definition at line 323 of file maps/CRandomFieldGridMap2D.h.

double mrpt::maps::CRandomFieldGridMap2D::m_average_normreadings_var
protected

Definition at line 323 of file maps/CRandomFieldGridMap2D.h.

mrpt::math::CMatrixD mrpt::maps::CRandomFieldGridMap2D::m_cov
protected

The whole covariance matrix, used for the Kalman Filter map representation.

Definition at line 310 of file maps/CRandomFieldGridMap2D.h.

std::vector<float> mrpt::maps::CRandomFieldGridMap2D::m_DM_gaussWindow
protected

Definition at line 322 of file maps/CRandomFieldGridMap2D.h.

float mrpt::maps::CRandomFieldGridMap2D::m_DM_lastCutOff
protected

Definition at line 321 of file maps/CRandomFieldGridMap2D.h.

bool mrpt::maps::CRandomFieldGridMap2D::m_hasToRecoverMeanAndCov
mutableprotected

Only for the KF2 implementation.

Definition at line 317 of file maps/CRandomFieldGridMap2D.h.

TInsertionOptionsCommon* mrpt::maps::CRandomFieldGridMap2D::m_insertOptions_common
protected

Common options to all random-field grid maps: pointer that is set to the derived-class instance of "insertOptions" upon construction of this class.

Definition at line 302 of file maps/CRandomFieldGridMap2D.h.

std::vector<TRandomFieldCell > mrpt::utils::CDynamicGrid< TRandomFieldCell >::m_map
protectedinherited

The cells.

Definition at line 44 of file CDynamicGrid.h.

TMapRepresentation mrpt::maps::CRandomFieldGridMap2D::m_mapType
protected

The map representation type of this map, as passed in the constructor.

Definition at line 308 of file maps/CRandomFieldGridMap2D.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::m_resolution
protectedinherited

Definition at line 50 of file CDynamicGrid.h.

size_t mrpt::utils::CDynamicGrid< TRandomFieldCell >::m_size_x
protectedinherited

Definition at line 51 of file CDynamicGrid.h.

size_t mrpt::utils::CDynamicGrid< TRandomFieldCell >::m_size_y
protectedinherited

Definition at line 51 of file CDynamicGrid.h.

mrpt::math::CMatrixD mrpt::maps::CRandomFieldGridMap2D::m_stackedCov
protected

The compressed band diagonal matrix for the KF2 implementation.

The format is a Nx(W^2+2W+1) matrix, one row per cell in the grid map with the cross-covariances between each cell and half of the window around it in the grid.

Definition at line 316 of file maps/CRandomFieldGridMap2D.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::m_x_max
protectedinherited

Definition at line 49 of file CDynamicGrid.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::m_x_min
protectedinherited

Definition at line 49 of file CDynamicGrid.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::m_y_max
protectedinherited

Definition at line 49 of file CDynamicGrid.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::m_y_min
protectedinherited

Definition at line 49 of file CDynamicGrid.h.

size_t mrpt::maps::CRandomFieldGridMap2D::nFactors
protected

Definition at line 335 of file maps/CRandomFieldGridMap2D.h.

size_t mrpt::maps::CRandomFieldGridMap2D::nObsFactors
protected

Definition at line 334 of file maps/CRandomFieldGridMap2D.h.

size_t mrpt::maps::CRandomFieldGridMap2D::nPriorFactors
protected

Definition at line 333 of file maps/CRandomFieldGridMap2D.h.




Page generated by Doxygen 1.8.11 for MRPT 1.3.2 SVN: at Wed May 25 02:34:21 UTC 2016