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::obs::mrptEventMetricMapClear: Upon call of the ::clear() method.
mrpt::obs::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).
- Note
- All derived class must implement a static class factory
<metric_map_class>::MapDefinition() that builds a default TMetricMapInitializer [New in MRPT 1.3.0]
- See also
- CObservation, CSensoryFrame, CMultiMetricMap
Definition at line 50 of file maps/CMetricMap.h.
|
| 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 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...
|
| |
| | CMetricMap () |
| | Constructor. More...
|
| |
| virtual | ~CMetricMap () |
| | Destructor. More...
|
| |
| virtual void | determineMatching2D (const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::CPose2D &otherMapPose, mrpt::utils::TMatchingPairList &correspondences, const TMatchingParams ¶ms, 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 ¶ms, TMatchingExtraResults &extraResults) const |
| | Computes the matchings between this and another 3D points map - method used in 3D-ICP. More...
|
| |
| virtual float | compute3DMatchingRatio (const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::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 mrpt::maps::CSimplePointsMap * | getAsSimplePointsMap () 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::CSimplePointsMap * | getAsSimplePointsMap () |
| |
| 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...
|
| |
|
| 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...
|
| |
| virtual float mrpt::maps::CMetricMap::compute3DMatchingRatio |
( |
const mrpt::maps::CMetricMap * |
otherMap, |
|
|
const mrpt::poses::CPose3D & |
otherMapPose, |
|
|
float |
maxDistForCorr = 0.10f, |
|
|
float |
maxMahaDistForCorr = 2.0f |
|
) |
| const |
|
virtual |
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::maps::COccupancyGridMap2D, mrpt::maps::CPointsMap, mrpt::maps::CMultiMetricMap, mrpt::maps::CRandomFieldGridMap2D, mrpt::maps::CLandmarksMap, mrpt::maps::CHeightGridMap2D, mrpt::maps::CBeaconMap, and mrpt::maps::CReflectivityGridMap2D.
|
|
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
-
| in | The input binary stream where the object data must read from. |
| version | The version of the object stored in the stream: use this version number in your code to know how to read the incoming data. |
- Exceptions
-
- See also
- CStream
Implemented in mrpt::nav::CLogFileRecord_ND, mrpt::obs::CObservationIMU, mrpt::utils::CSimpleDatabase, mrpt::maps::CMultiMetricMap, mrpt::obs::CObservation3DRangeScan, mrpt::utils::CImage, mrpt::detectors::CDetectable3D, mrpt::hmtslam::THypothesisIDSet, mrpt::hmtslam::CLocalMetricHypothesis, 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::CRawlog, mrpt::obs::CSensoryFrame, mrpt::obs::CObservation2DRangeScan, 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::math::CSplineInterpolator1D, mrpt::utils::CPropertiesValuesList, mrpt::utils::CSimpleDatabaseTable, 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::CObservationBeaconRanges, mrpt::obs::CObservationComment, mrpt::obs::CObservationGPS, mrpt::obs::CObservationRFID, mrpt::opengl::CCylinder, mrpt::opengl::CSetOfTriangles, mrpt::poses::TSimple3DPoint, mrpt::nav::CLogFileRecord_VFF, mrpt::obs::CObservation6DFeatures, 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.
| 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
-
| out | The output binary stream where object must be dumped. |
| getVersion | If 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
-
- See also
- CStream
Implemented in mrpt::nav::CLogFileRecord_ND, mrpt::obs::CObservationIMU, mrpt::utils::CSimpleDatabase, mrpt::maps::CMultiMetricMap, mrpt::obs::CObservation3DRangeScan, mrpt::utils::CImage, mrpt::detectors::CDetectable3D, mrpt::hmtslam::THypothesisIDSet, mrpt::hmtslam::CLocalMetricHypothesis, 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::CRawlog, mrpt::obs::CSensoryFrame, mrpt::obs::CObservation2DRangeScan, 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::math::CSplineInterpolator1D, mrpt::utils::CPropertiesValuesList, mrpt::utils::CSimpleDatabaseTable, 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::CObservationBeaconRanges, mrpt::obs::CObservationComment, mrpt::obs::CObservationGPS, mrpt::obs::CObservationRFID, mrpt::opengl::CCylinder, mrpt::opengl::CSetOfTriangles, mrpt::poses::TSimple3DPoint, mrpt::nav::CLogFileRecord_VFF, mrpt::obs::CObservation6DFeatures, 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.