Main MRPT website > C++ reference
MRPT logo
List of all members | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Private Member Functions
mrpt::slam::CMetricMap Class Referenceabstract

Detailed Description

Declares a virtual base class for all metric maps storage classes.

In this class virtual methods are provided to allow the insertion of any type of "CObservation" objects into the metric map, thus updating the map (doesn't matter if it is a 2D/3D grid, a point map, etc.).

Observations don't include any information about the robot pose, just the raw observation and information about the sensor pose relative to the robot mobile base coordinates origin.

Note that all metric maps implement this mrpt::utils::CObservable interface, emitting the following events:

mrpt::slam::mrptEventMetricMapInsert: Upon insertion of an observation that effectively modifies the map (e.g. inserting an image into a grid map will NOT raise an event, inserting a laser scan will).

See Also
CObservation, CSensoryFrame, CMultiMetricMap

Definition at line 83 of file CMetricMap.h.

#include <mrpt/slam/CMetricMap.h>

Inheritance diagram for mrpt::slam::CMetricMap:
Inheritance graph
[legend]

Public Member Functions

void clear ()
 Erase all the contents of the map. More...
 
virtual bool isEmpty () const =0
 Returns true if the map is empty/no observation has been inserted. More...
 
void loadFromProbabilisticPosesAndObservations (const CSimpleMap &Map)
 Load the map contents from a CSimpleMap object, erasing all previous content of the map. More...
 
void loadFromSimpleMap (const CSimpleMap &Map)
 Load the map contents from a CSimpleMap object, erasing all previous content of the map. More...
 
bool insertObservation (const CObservation *obs, const CPose3D *robotPose=NULL)
 Insert the observation information into this map. More...
 
bool insertObservationPtr (const CObservationPtr &obs, const CPose3D *robotPose=NULL)
 A wrapper for smart pointers, just calls the non-smart pointer version. More...
 
virtual double computeObservationLikelihood (const CObservation *obs, const CPose3D &takenFrom)=0
 Computes the log-likelihood of a given observation given an arbitrary robot 3D pose. More...
 
double computeObservationLikelihood (const CObservation *obs, const CPose2D &takenFrom)
 Computes the log-likelihood of a given observation given an arbitrary robot 2D pose. More...
 
virtual bool canComputeObservationLikelihood (const CObservation *obs)
 Returns true if this map is able to compute a sensible likelihood function for this observation (i.e. More...
 
bool canComputeObservationLikelihood (const CObservationPtr &obs)
 
double computeObservationsLikelihood (const CSensoryFrame &sf, const CPose2D &takenFrom)
 Returns the sum of the log-likelihoods of each individual observation within a mrpt::slam::CSensoryFrame. More...
 
bool canComputeObservationsLikelihood (const CSensoryFrame &sf)
 Returns true if this map is able to compute a sensible likelihood function for this observation (i.e. More...
 
 CMetricMap ()
 Constructor. More...
 
virtual ~CMetricMap ()
 Destructor. More...
 
virtual void determineMatching2D (const CMetricMap *otherMap, const CPose2D &otherMapPose, 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 CMetricMap *otherMap, const CPose3D &otherMapPose, 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 float compute3DMatchingRatio (const CMetricMap *otherMap, const CPose3D &otherMapPose, float maxDistForCorr=0.10f, float maxMahaDistForCorr=2.0f) const
 Computes the ratio in [0,1] of correspondences between "this" and the "otherMap" map, whose 6D pose relative to "this" is "otherMapPose" In the case of a multi-metric map, this returns the average between the maps. More...
 
virtual void saveMetricMapRepresentationToFile (const std::string &filNamePrefix) const =0
 This virtual method saves the map to a file "filNamePrefix"+< some_file_extension >, as an image or in any other applicable way (Notice that other methods to save the map may be implemented in classes implementing this virtual interface). More...
 
virtual void getAs3DObject (mrpt::opengl::CSetOfObjectsPtr &outObj) const =0
 Returns a 3D object representing the map. 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 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 CSimplePointsMapgetAsSimplePointsMap ()
 
virtual CObjectduplicate () 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...
 
CObjectclone () const
 Cloning interface for smart pointers. More...
 

Public Attributes

bool m_disableSaveAs3DObject
 When set to true (default=false), calling "getAs3DObject" will have no effects. More...
 

Static Public Attributes

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

Protected Member Functions

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

Private Member Functions

virtual void internal_clear ()=0
 Internal method called by clear() More...
 
virtual void OnPostSuccesfulInsertObs (const CObservation *)
 Hook for each time a "internal_insertObservation" returns "true" This is called automatically from insertObservation() when internal_insertObservation returns true. More...
 
virtual bool internal_insertObservation (const CObservation *obs, const CPose3D *robotPose=NULL)=0
 Internal method called by insertObservation() More...
 

RTTI stuff

static const
mrpt::utils::TRuntimeClassId 
classCMetricMap
 
class mrpt::utils::CStream
 
static const
mrpt::utils::TRuntimeClassId
_GetBaseClass ()
 
virtual const
mrpt::utils::TRuntimeClassId
GetRuntimeClass () const
 Returns information about the class of an object in runtime. More...
 

Constructor & Destructor Documentation

mrpt::slam::CMetricMap::CMetricMap ( )

Constructor.

virtual mrpt::slam::CMetricMap::~CMetricMap ( )
virtual

Destructor.

Member Function Documentation

static const mrpt::utils::TRuntimeClassId* mrpt::slam::CMetricMap::_GetBaseClass ( )
staticprotected
virtual void mrpt::slam::CMetricMap::auxParticleFilterCleanUp ( )
inlinevirtual

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::slam::CLandmarksMap, and mrpt::slam::CMultiMetricMap.

Definition at line 299 of file CMetricMap.h.

virtual bool mrpt::slam::CMetricMap::canComputeObservationLikelihood ( const CObservation obs)
inlinevirtual

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

Reimplemented in mrpt::slam::COccupancyGridMap2D, and mrpt::slam::CMultiMetricMap.

Definition at line 169 of file CMetricMap.h.

bool mrpt::slam::CMetricMap::canComputeObservationLikelihood ( const CObservationPtr obs)

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

bool mrpt::slam::CMetricMap::canComputeObservationsLikelihood ( const CSensoryFrame sf)

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
void mrpt::slam::CMetricMap::clear ( )
CObject* mrpt::utils::CObject::clone ( ) const
inlineinherited

Cloning interface for smart pointers.

Definition at line 139 of file CObject.h.

virtual float mrpt::slam::CMetricMap::compute3DMatchingRatio ( const CMetricMap otherMap,
const CPose3D otherMapPose,
float  maxDistForCorr = 0.10f,
float  maxMahaDistForCorr = 2.0f 
) const
inlinevirtual

Computes the ratio in [0,1] of correspondences between "this" and the "otherMap" map, whose 6D pose relative to "this" is "otherMapPose" In the case of a multi-metric map, this returns the average between the maps.

This method always return 0 for grid maps.

Parameters
otherMap[IN] The other map to compute the matching with.
otherMapPose[IN] The 6D pose of the other map as seen from "this".
maxDistForCorr[IN] The minimum distance between 2 non-probabilistic map elements for counting them as a correspondence.
maxMahaDistForCorr[IN] The minimum Mahalanobis distance between 2 probabilistic map elements for counting them as a correspondence.
Returns
The matching ratio [0,1]
See Also
determineMatching2D

Reimplemented in mrpt::slam::COccupancyGridMap2D, mrpt::slam::CPointsMap, mrpt::slam::CRandomFieldGridMap2D, mrpt::slam::CMultiMetricMap, mrpt::slam::CLandmarksMap, mrpt::slam::CHeightGridMap2D, mrpt::slam::CBeaconMap, and mrpt::slam::CReflectivityGridMap2D.

Definition at line 269 of file CMetricMap.h.

References MRPT_END, MRPT_START, and THROW_EXCEPTION.

virtual double mrpt::slam::CMetricMap::computeObservationLikelihood ( const CObservation obs,
const CPose3D takenFrom 
)
pure virtual

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

Implemented in mrpt::slam::COccupancyGridMap2D, mrpt::slam::CPointsMap, mrpt::slam::CLandmarksMap, mrpt::slam::CBeaconMap, mrpt::slam::CMultiMetricMap, mrpt::slam::COctoMapBase< OCTREE, OCTREE_NODE >, mrpt::slam::COctoMapBase< octomap::ColorOcTree, octomap::ColorOcTreeNode >, mrpt::slam::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >, mrpt::slam::CHeightGridMap2D, mrpt::slam::CReflectivityGridMap2D, mrpt::slam::CGasConcentrationGridMap2D, and mrpt::slam::CWirelessPowerGridMap2D.

double mrpt::slam::CMetricMap::computeObservationLikelihood ( const CObservation obs,
const CPose2D takenFrom 
)

Computes the log-likelihood of a given observation given an arbitrary robot 2D 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::slam::CMetricMap::computeObservationsLikelihood ( const CSensoryFrame sf,
const CPose2D takenFrom 
)

Returns the sum of the log-likelihoods of each individual observation within a mrpt::slam::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
virtual void mrpt::slam::CMetricMap::determineMatching2D ( const CMetricMap otherMap,
const CPose2D otherMapPose,
TMatchingPairList correspondences,
const TMatchingParams params,
TMatchingExtraResults extraResults 
) const
inlinevirtual

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::slam::COccupancyGridMap2D, mrpt::slam::CPointsMap, mrpt::slam::CBeaconMap, and mrpt::slam::CMultiMetricMap.

Definition at line 217 of file CMetricMap.h.

References MRPT_END, MRPT_START, and THROW_EXCEPTION.

virtual void mrpt::slam::CMetricMap::determineMatching3D ( const CMetricMap otherMap,
const CPose3D otherMapPose,
TMatchingPairList correspondences,
const TMatchingParams params,
TMatchingExtraResults extraResults 
) const
inlinevirtual

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::slam::CPointsMap.

Definition at line 247 of file CMetricMap.h.

References MRPT_END, MRPT_START, and THROW_EXCEPTION.

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

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

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

virtual void mrpt::slam::CMetricMap::getAs3DObject ( mrpt::opengl::CSetOfObjectsPtr outObj) const
pure virtual
virtual const CSimplePointsMap* mrpt::slam::CMetricMap::getAsSimplePointsMap ( ) const
inlinevirtual

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::slam::CPointsMap, mrpt::slam::CMultiMetricMap, and mrpt::slam::CSimplePointsMap.

Definition at line 319 of file CMetricMap.h.

virtual CSimplePointsMap* mrpt::slam::CMetricMap::getAsSimplePointsMap ( )
inlinevirtual
virtual const mrpt::utils::TRuntimeClassId* mrpt::slam::CMetricMap::GetRuntimeClass ( ) const
virtual
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 53 of file CObservable.h.

bool mrpt::slam::CMetricMap::insertObservation ( const CObservation obs,
const CPose3D robotPose = NULL 
)

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
bool mrpt::slam::CMetricMap::insertObservationPtr ( const CObservationPtr obs,
const CPose3D robotPose = NULL 
)

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

virtual void mrpt::slam::CMetricMap::internal_clear ( )
privatepure virtual
virtual bool mrpt::slam::CMetricMap::internal_insertObservation ( const CObservation obs,
const CPose3D robotPose = NULL 
)
privatepure virtual
virtual bool mrpt::slam::CMetricMap::isEmpty ( ) const
pure virtual
void mrpt::slam::CMetricMap::loadFromProbabilisticPosesAndObservations ( const CSimpleMap Map)

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::slam::CMetricMap::loadFromSimpleMap ( const CSimpleMap Map)
inline

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 131 of file CMetricMap.h.

virtual void mrpt::slam::CMetricMap::OnPostSuccesfulInsertObs ( const CObservation )
inlineprivatevirtual

Hook for each time a "internal_insertObservation" returns "true" This is called automatically from insertObservation() when internal_insertObservation returns true.

Reimplemented in mrpt::slam::COccupancyGridMap2D.

Definition at line 97 of file CMetricMap.h.

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

virtual void mrpt::slam::CMetricMap::saveMetricMapRepresentationToFile ( const std::string &  filNamePrefix) const
pure virtual
virtual float mrpt::slam::CMetricMap::squareDistanceToClosestCorrespondence ( float  x0,
float  y0 
) const
inlinevirtual

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

Reimplemented in mrpt::slam::CPointsMap.

Definition at line 306 of file CMetricMap.h.

References MRPT_END, MRPT_START, and THROW_EXCEPTION.

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

Friends And Related Function Documentation

friend class mrpt::utils::CStream
friend

Definition at line 88 of file CMetricMap.h.

Member Data Documentation

const mrpt::utils::TRuntimeClassId mrpt::slam::CMetricMap::classCMetricMap
static

Definition at line 88 of file CMetricMap.h.

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

Definition at line 124 of file CObject.h.

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

Definition at line 38 of file CSerializable.h.

bool mrpt::slam::CMetricMap::m_disableSaveAs3DObject

When set to true (default=false), calling "getAs3DObject" will have no effects.

Definition at line 294 of file CMetricMap.h.




Page generated by Doxygen 1.8.6 for MRPT 1.2.0 SVN: at dom ago 20 02:20:21 CEST 2017 Hosted on:
SourceForge.net Logo