A three-dimensional probabilistic occupancy grid, implemented as an octo-tree with the "octomap" C++ library.
This base class represents a 3D map where each voxel may contain an "occupancy" property, RGBD data, etc. depending on the derived class.
As with any other mrpt::slam::CMetricMap, you can obtain a 3D representation of the map calling getAs3DObject() or getAsOctoMapVoxels()
To use octomap's iterators to go through the voxels, use COctoMap::getOctomap()
The octomap library was presented in:
Definition at line 46 of file COctoMapBase.h.
#include <mrpt/slam/COctoMapBase.h>

Classes | |
| struct | TInsertionOptions |
| With this struct options are provided to the observation insertion process. More... | |
| struct | TLikelihoodOptions |
| Options used when evaluating "computeObservationLikelihood". More... | |
| struct | TRenderingOptions |
| Options for the conversion of a mrpt::slam::COctoMap into a mrpt::opengl::COctoMapVoxels. More... | |
Public Types | |
| typedef COctoMapBase< OCTREE, OCTREE_NODE > | myself_t |
| The type of this MRPT class. More... | |
| typedef OCTREE | octree_t |
| The type of the octree class in the "octomap" library. More... | |
| typedef OCTREE_NODE | octree_node_t |
| The type of nodes in the octree, in the "octomap" library. More... | |
Public Member Functions | |
| COctoMapBase (const double resolution=0.10) | |
| Constructor, defines the resolution of the octomap (length of each voxel side) More... | |
| virtual | ~COctoMapBase () |
| OCTREE & | getOctomap () |
| Get a reference to the internal octomap object. More... | |
| virtual bool | isEmpty () const |
| Returns true if the map is empty/no observation has been inserted. More... | |
| virtual double | computeObservationLikelihood (const CObservation *obs, const CPose3D &takenFrom) |
| Computes the log-likelihood of a given observation given an arbitrary robot 3D pose. More... | |
| virtual void | saveMetricMapRepresentationToFile (const std::string &filNamePrefix) const |
| 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 |
| Returns a 3D object representing the map. More... | |
| virtual void | getAsOctoMapVoxels (mrpt::opengl::COctoMapVoxels &gl_obj) const =0 |
| Builds a renderizable representation of the octomap as a mrpt::opengl::COctoMapVoxels object. More... | |
| bool | isPointWithinOctoMap (const float x, const float y, const float z) const |
| Check whether the given point lies within the volume covered by the octomap (that is, whether it is "mapped") More... | |
| bool | getPointOccupancy (const float x, const float y, const float z, double &prob_occupancy) const |
| Get the occupancy probability [0,1] of a point. More... | |
| void | updateVoxel (const double x, const double y, const double z, bool occupied) |
| Manually updates the occupancy of the voxel at (x,y,z) as being occupied (true) or free (false), using the log-odds parameters in insertionOptions. More... | |
| void | insertPointCloud (const CPointsMap &ptMap, const float sensor_x, const float sensor_y, const float sensor_z) |
| Update the octomap with a 2D or 3D scan, given directly as a point cloud and the 3D location of the sensor (the origin of the rays) in this map's frame of reference. More... | |
| void | insertRay (const float end_x, const float end_y, const float end_z, const float sensor_x, const float sensor_y, const float sensor_z) |
| Just like insertPointCloud but with a single ray. More... | |
| bool | castRay (const mrpt::math::TPoint3D &origin, const mrpt::math::TPoint3D &direction, mrpt::math::TPoint3D &end, bool ignoreUnknownCells=false, double maxRange=-1.0) const |
| Performs raycasting in 3d, similar to computeRay(). More... | |
| void | clear () |
| Erase all the contents of the map. 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... | |
| 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... | |
| virtual void | determineMatching2D (const CMetricMap *otherMap, const CPose2D &otherMapPose, 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 CMetricMap *otherMap, const CPose3D &otherMapPose, 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 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 | 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 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 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... | |
Direct access to octomap library methods | |
| double | getResolution () const |
| unsigned int | getTreeDepth () const |
| size_t | size () const |
| size_t | memoryUsage () const |
| size_t | memoryUsageNode () const |
| size_t | memoryFullGrid () const |
| double | volume () const |
| void | getMetricSize (double &x, double &y, double &z) |
| Size of OcTree (all known space) in meters for x, y and z dimension. More... | |
| void | getMetricSize (double &x, double &y, double &z) const |
| Size of OcTree (all known space) in meters for x, y and z dimension. More... | |
| void | getMetricMin (double &x, double &y, double &z) |
| minimum value of the bounding box of all known space in x, y, z More... | |
| void | getMetricMin (double &x, double &y, double &z) const |
| minimum value of the bounding box of all known space in x, y, z More... | |
| void | getMetricMax (double &x, double &y, double &z) |
| maximum value of the bounding box of all known space in x, y, z More... | |
| void | getMetricMax (double &x, double &y, double &z) const |
| maximum value of the bounding box of all known space in x, y, z More... | |
| size_t | calcNumNodes () const |
| Traverses the tree to calculate the total number of nodes. More... | |
| size_t | getNumLeafNodes () const |
| Traverses the tree to calculate the total number of leaf nodes. More... | |
Public Attributes | |
| TInsertionOptions | insertionOptions |
| The options used when inserting observations in the map. More... | |
| TLikelihoodOptions | likelihoodOptions |
| TRenderingOptions | renderingOptions |
| 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 | internal_clear () |
| Internal method called by clear() More... | |
| bool | internal_build_PointCloud_for_observation (const CObservation *obs, const CPose3D *robotPose, octomap::point3d &point3d_sensorPt, octomap::Pointcloud &ptr_scan) const |
| Builds the list of 3D points in global coordinates for a generic observation. 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... | |
Protected Attributes | |
| OCTREE | m_octomap |
| The actual octo-map object. More... | |
RTTI stuff | |
| virtual const mrpt::utils::TRuntimeClassId * | GetRuntimeClass () const |
| Returns information about the class of an object in runtime. More... | |
| static const mrpt::utils::TRuntimeClassId | classCMetricMap |
| static const mrpt::utils::TRuntimeClassId * | _GetBaseClass () |
| typedef COctoMapBase<OCTREE,OCTREE_NODE> mrpt::slam::COctoMapBase< OCTREE, OCTREE_NODE >::myself_t |
The type of this MRPT class.
Definition at line 49 of file COctoMapBase.h.
| typedef OCTREE_NODE mrpt::slam::COctoMapBase< OCTREE, OCTREE_NODE >::octree_node_t |
The type of nodes in the octree, in the "octomap" library.
Definition at line 51 of file COctoMapBase.h.
| typedef OCTREE mrpt::slam::COctoMapBase< OCTREE, OCTREE_NODE >::octree_t |
The type of the octree class in the "octomap" library.
Definition at line 50 of file COctoMapBase.h.
|
inline |
Constructor, defines the resolution of the octomap (length of each voxel side)
Definition at line 55 of file COctoMapBase.h.
|
inlinevirtual |
Definition at line 56 of file COctoMapBase.h.
|
staticprotectedinherited |
|
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::slam::CLandmarksMap, and mrpt::slam::CMultiMetricMap.
Definition at line 284 of file CMetricMap.h.
|
inline |
Traverses the tree to calculate the total number of nodes.
Definition at line 299 of file COctoMapBase.h.
|
inlinevirtualinherited |
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).
| obs | The observation. |
Reimplemented in mrpt::slam::COccupancyGridMap2D, and mrpt::slam::CMultiMetricMap.
Definition at line 169 of file CMetricMap.h.
References MRPT_UNUSED_PARAM.
|
inherited |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
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).
| sf | The observations. |
| bool mrpt::slam::COctoMapBase< OCTREE, OCTREE_NODE >::castRay | ( | const mrpt::math::TPoint3D & | origin, |
| const mrpt::math::TPoint3D & | direction, | ||
| mrpt::math::TPoint3D & | end, | ||
| bool | ignoreUnknownCells = false, |
||
| double | maxRange = -1.0 |
||
| ) | const |
Performs raycasting in 3d, similar to computeRay().
A ray is cast from origin with a given direction, the first occupied cell is returned (as center coordinate). If the starting coordinate is already occupied in the tree, this coordinate will be returned as a hit.
| origin | starting coordinate of ray |
| direction | A vector pointing in the direction of the raycast. Does not need to be normalized. |
| end | returns the center of the cell that was hit by the ray, if successful |
| ignoreUnknownCells | whether unknown cells are ignored. If false (default), the raycast aborts when an unkown cell is hit. |
| maxRange | Maximum range after which the raycast is aborted (<= 0: no limit, default) |
Definition at line 217 of file COctoMapBase_impl.h.
References octomath::Vector3::x(), mrpt::math::TPoint3D::x, octomath::Vector3::y(), mrpt::math::TPoint3D::y, octomath::Vector3::z(), and mrpt::math::TPoint3D::z.
|
inherited |
Erase all the contents of the map.
Referenced by mrpt::slam::CReflectivityGridMap2D::clear(), mrpt::slam::CHeightGridMap2D::clear(), and mrpt::slam::CRandomFieldGridMap2D::clear().
|
inlineinherited |
|
virtualinherited |
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.
| 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. |
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.
|
inherited |
Computes the log-likelihood of a given observation given an arbitrary robot 2D pose.
| takenFrom | The robot's pose the observation is supposed to be taken from. |
| obs | The observation. |
|
virtual |
Computes the log-likelihood of a given observation given an arbitrary robot 3D pose.
| takenFrom | The robot's pose the observation is supposed to be taken from. |
| obs | The observation. |
Implements mrpt::slam::CMetricMap.
Definition at line 163 of file COctoMapBase_impl.h.
References octomap::Pointcloud::getPoint(), and octomap::Pointcloud::size().
|
inherited |
Returns the sum of the log-likelihoods of each individual observation within a mrpt::slam::CSensoryFrame.
| takenFrom | The robot's pose the observation is supposed to be taken from. |
| sf | The set of observations in a CSensoryFrame. |
|
virtualinherited |
Computes the matching between this and another 2D point map, which includes finding:
The algorithm is:
This method is the most time critical one into ICP-like algorithms.
| 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. |
Reimplemented in mrpt::slam::COccupancyGridMap2D, mrpt::slam::CPointsMap, mrpt::slam::CBeaconMap, and mrpt::slam::CMultiMetricMap.
|
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:
| 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. |
Reimplemented in mrpt::slam::CPointsMap.
|
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::gui::CDisplayWindow3D, mrpt::hmtslam::CLocalMetricHypothesis, mrpt::hmtslam::THypothesisIDSet, 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::detectors::CDetectable2D, mrpt::hmtslam::CLSLAMParticleData, mrpt::slam::CReflectivityGridMap2D, mrpt::opengl::COpenGLScene, mrpt::opengl::CPointCloudColoured, mrpt::pbmap::PbMap, mrpt::opengl::CFrustum, mrpt::utils::CMHPropertiesValuesList, mrpt::opengl::CEllipsoidInverseDepth3D, mrpt::hmtslam::CHMHMapNode, mrpt::slam::CBeacon, mrpt::slam::CObservationStereoImages, mrpt::opengl::CVectorField2D, mrpt::opengl::CAngularObservationMesh, mrpt::slam::CObservationStereoImagesFeatures, mrpt::opengl::CEllipsoid, mrpt::opengl::CEllipsoidInverseDepth2D, mrpt::opengl::CText3D, mrpt::poses::CPose3DQuat, mrpt::poses::CPose3DRotVec, mrpt::slam::CGasConcentrationGridMap2D, mrpt::opengl::CAssimpModel, mrpt::slam::CLandmark, mrpt::poses::CPose3DQuatPDFGaussianInf, mrpt::opengl::CMeshFast, mrpt::poses::CPose3DQuatPDFGaussian, mrpt::hmtslam::CRobotPosesGraph, mrpt::opengl::CEllipsoidRangeBearing2D, mrpt::opengl::CMesh, mrpt::poses::CPose3DPDFGaussianInf, mrpt::gui::CDisplayWindowPlots, mrpt::slam::COctoMap, mrpt::slam::CWirelessPowerGridMap2D, 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::poses::CPose3DPDFSOG, mrpt::poses::CPosePDFGaussianInf, mrpt::slam::CActionRobotMovement2D, mrpt::slam::CObservationBatteryState, mrpt::slam::CSimpleMap, mrpt::opengl::CGridPlaneXY, mrpt::opengl::CGridPlaneXZ, mrpt::opengl::CArrow, mrpt::opengl::CAxis, mrpt::opengl::CDisk, mrpt::opengl::CSphere, mrpt::slam::CIncrementalMapPartitioner, mrpt::poses::CPoint3D, mrpt::poses::CPosePDFGaussian, mrpt::utils::CStringList, mrpt::slam::CWeightedPointsMap, mrpt::slam::CObservationWindSensor, 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::math::CMatrixD, 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::slam::CObservationVisualLandmarks, 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::C3DSScene, mrpt::opengl::CGeneralizedCylinder, mrpt::reactivenav::CLogFileRecord_VFF, mrpt::math::CMatrixB, 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.
|
inlineinherited |
|
inlinevirtual |
Returns a 3D object representing the map.
Implements mrpt::slam::CMetricMap.
Definition at line 210 of file COctoMapBase.h.
|
pure virtual |
Builds a renderizable representation of the octomap as a mrpt::opengl::COctoMapVoxels object.
Implemented in mrpt::slam::CColouredOctoMap, and mrpt::slam::COctoMap.
Referenced by mrpt::slam::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >::getAs3DObject().
|
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::slam::CPointsMap, mrpt::slam::CMultiMetricMap, and mrpt::slam::CSimplePointsMap.
Definition at line 297 of file CMetricMap.h.
|
inlinevirtualinherited |
Reimplemented in mrpt::slam::CPointsMap, mrpt::slam::CMultiMetricMap, and mrpt::slam::CSimplePointsMap.
Definition at line 298 of file CMetricMap.h.
|
inline |
maximum value of the bounding box of all known space in x, y, z
Definition at line 294 of file COctoMapBase.h.
|
inline |
maximum value of the bounding box of all known space in x, y, z
Definition at line 296 of file COctoMapBase.h.
|
inline |
minimum value of the bounding box of all known space in x, y, z
Definition at line 290 of file COctoMapBase.h.
|
inline |
minimum value of the bounding box of all known space in x, y, z
Definition at line 292 of file COctoMapBase.h.
|
inline |
Size of OcTree (all known space) in meters for x, y and z dimension.
Definition at line 286 of file COctoMapBase.h.
|
inline |
Size of OcTree (all known space) in meters for x, y and z dimension.
Definition at line 288 of file COctoMapBase.h.
|
inline |
Traverses the tree to calculate the total number of leaf nodes.
Definition at line 302 of file COctoMapBase.h.
|
inline |
Get a reference to the internal octomap object.
Example:
Definition at line 67 of file COctoMapBase.h.
| bool mrpt::slam::COctoMapBase< OCTREE, OCTREE_NODE >::getPointOccupancy | ( | const float | x, |
| const float | y, | ||
| const float | z, | ||
| double & | prob_occupancy | ||
| ) | const |
Get the occupancy probability [0,1] of a point.
Definition at line 189 of file COctoMapBase_impl.h.
|
inline |
Definition at line 274 of file COctoMapBase.h.
|
virtualinherited |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::utils::CSerializable.
Reimplemented in mrpt::slam::CRandomFieldGridMap2D, mrpt::slam::COccupancyGridMap2D, mrpt::slam::CHeightGridMap2D, mrpt::slam::CMultiMetricMap, mrpt::slam::CPointsMap, mrpt::slam::CLandmarksMap, mrpt::slam::CBeaconMap, mrpt::slam::CReflectivityGridMap2D, mrpt::slam::CGasConcentrationGridMap2D, mrpt::slam::COctoMap, mrpt::slam::CWirelessPowerGridMap2D, mrpt::slam::CColouredOctoMap, mrpt::slam::CColouredPointsMap, mrpt::slam::CSimplePointsMap, and mrpt::slam::CWeightedPointsMap.
|
inline |
Definition at line 275 of file COctoMapBase.h.
|
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.
|
inherited |
Insert the observation information into this map.
This method must be implemented in derived classes.
| obs | The observation |
| robotPose | The 3D pose of the robot mobile base in the map reference system, or NULL (default) if you want to use the origin. |
|
inherited |
A wrapper for smart pointers, just calls the non-smart pointer version.
| void mrpt::slam::COctoMapBase< OCTREE, OCTREE_NODE >::insertPointCloud | ( | const CPointsMap & | ptMap, |
| const float | sensor_x, | ||
| const float | sensor_y, | ||
| const float | sensor_z | ||
| ) |
Update the octomap with a 2D or 3D scan, given directly as a point cloud and the 3D location of the sensor (the origin of the rays) in this map's frame of reference.
Insertion parameters can be found in insertionOptions.
Definition at line 204 of file COctoMapBase_impl.h.
References mrpt::slam::CPointsMap::getPointsBuffer(), MRPT_END, and MRPT_START.
|
inline |
Just like insertPointCloud but with a single ray.
Definition at line 246 of file COctoMapBase.h.
|
protected |
Builds the list of 3D points in global coordinates for a generic observation.
Used for both, insertObservation() and computeLikelihood().
| [out] | point3d_sensorPt | Is a pointer to a "point3D". |
| [out] | ptr_scan | Is in fact a pointer to "octomap::Pointcloud". Not declared as such to avoid headers dependencies in user code. |
Definition at line 21 of file COctoMapBase_impl.h.
References mrpt::slam::CObservation2DRangeScan::buildAuxPointsMap(), octomap::Pointcloud::clear(), mrpt::poses::CPose3D::composeFrom(), mrpt::poses::CPose3D::composePoint(), mrpt::poses::CPose3D::getHomogeneousMatrix(), mrpt::slam::CObservation3DRangeScan::hasPoints3D, IS_CLASS, mrpt::slam::CObservation3DRangeScan::load(), mrpt::slam::CObservation3DRangeScan::points3D_x, mrpt::slam::CObservation3DRangeScan::points3D_y, mrpt::slam::CObservation3DRangeScan::points3D_z, octomap::Pointcloud::push_back(), octomap::Pointcloud::reserve(), mrpt::slam::CObservation2DRangeScan::sensorPose, mrpt::slam::CObservation3DRangeScan::sensorPose, mrpt::slam::CPointsMap::size(), mrpt::poses::UNINITIALIZED_POSE, mrpt::poses::CPoseOrPoint< DERIVEDCLASS >::x(), mrpt::math::TPoint3Df::x, mrpt::poses::CPoseOrPoint< DERIVEDCLASS >::y(), mrpt::math::TPoint3Df::y, and mrpt::math::TPoint3Df::z.
|
inlineprotectedvirtual |
Internal method called by clear()
Implements mrpt::slam::CMetricMap.
Definition at line 308 of file COctoMapBase.h.
|
virtual |
Returns true if the map is empty/no observation has been inserted.
Implements mrpt::slam::CMetricMap.
Definition at line 130 of file COctoMapBase_impl.h.
|
inline |
Check whether the given point lies within the volume covered by the octomap (that is, whether it is "mapped")
Definition at line 223 of file COctoMapBase.h.
|
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.
| std::exception | Some internal steps in invoked methods can raise exceptions on invalid parameters, etc... |
|
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.
| std::exception | Some internal steps in invoked methods can raise exceptions on invalid parameters, etc... |
Definition at line 131 of file CMetricMap.h.
|
inline |
Definition at line 283 of file COctoMapBase.h.
|
inline |
Definition at line 279 of file COctoMapBase.h.
|
inline |
Definition at line 281 of file COctoMapBase.h.
|
protectedinherited |
Called when you want this object to emit an event to all the observers currently subscribed to this object.
|
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.
| 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. |
| std::exception | On any error, see CStream::ReadBuffer |
Implemented in mrpt::reactivenav::CLogFileRecord_ND, mrpt::utils::CSimpleDatabase, mrpt::slam::CObservationIMU, mrpt::slam::CObservation3DRangeScan, mrpt::utils::CImage, mrpt::detectors::CDetectable3D, mrpt::hmtslam::CLocalMetricHypothesis, mrpt::hmtslam::THypothesisIDSet, 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::detectors::CDetectable2D, mrpt::hmtslam::CLSLAMParticleData, mrpt::slam::CReflectivityGridMap2D, mrpt::opengl::COpenGLScene, mrpt::opengl::CPointCloudColoured, mrpt::pbmap::PbMap, mrpt::opengl::CFrustum, mrpt::utils::CMHPropertiesValuesList, mrpt::opengl::CEllipsoidInverseDepth3D, mrpt::hmtslam::CHMHMapNode, mrpt::slam::CBeacon, mrpt::slam::CObservationStereoImages, mrpt::opengl::CVectorField2D, mrpt::opengl::CAngularObservationMesh, mrpt::slam::CObservationStereoImagesFeatures, mrpt::opengl::CEllipsoid, mrpt::opengl::CEllipsoidInverseDepth2D, mrpt::opengl::CText3D, mrpt::poses::CPose3DQuat, mrpt::poses::CPose3DRotVec, mrpt::slam::CGasConcentrationGridMap2D, mrpt::opengl::CAssimpModel, mrpt::slam::CLandmark, mrpt::poses::CPose3DQuatPDFGaussianInf, mrpt::opengl::CMeshFast, mrpt::poses::CPose3DQuatPDFGaussian, mrpt::hmtslam::CRobotPosesGraph, mrpt::opengl::CEllipsoidRangeBearing2D, mrpt::opengl::CMesh, mrpt::poses::CPose3DPDFGaussianInf, mrpt::slam::COctoMap, mrpt::slam::CWirelessPowerGridMap2D, 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::poses::CPose3DPDFSOG, mrpt::poses::CPosePDFGaussianInf, mrpt::slam::CActionRobotMovement2D, mrpt::slam::CObservationBatteryState, mrpt::slam::CSimpleMap, mrpt::opengl::CGridPlaneXY, mrpt::opengl::CGridPlaneXZ, mrpt::opengl::CArrow, mrpt::opengl::CAxis, mrpt::opengl::CDisk, mrpt::opengl::CSphere, mrpt::slam::CIncrementalMapPartitioner, mrpt::poses::CPoint3D, mrpt::poses::CPosePDFGaussian, mrpt::utils::CStringList, mrpt::slam::CWeightedPointsMap, mrpt::slam::CObservationWindSensor, mrpt::opengl::CCamera, mrpt::poses::CPosePDFGrid, mrpt::slam::CObservationOdometry, mrpt::opengl::CSetOfObjects, mrpt::opengl::CSetOfTexturedTriangles, mrpt::reactivenav::CLogFileRecord, mrpt::math::CMatrix, mrpt::math::CMatrixD, 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::slam::CObservationVisualLandmarks, 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::C3DSScene, mrpt::opengl::CGeneralizedCylinder, mrpt::reactivenav::CLogFileRecord_VFF, mrpt::math::CMatrixB, 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 |
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).
Implements mrpt::slam::CMetricMap.
Definition at line 136 of file COctoMapBase_impl.h.
References mrpt::opengl::CSetOfObjects::Create(), mrpt::opengl::COpenGLScene::insert(), MRPT_END, and MRPT_START.
|
inline |
Definition at line 277 of file COctoMapBase.h.
|
virtualinherited |
Returns the square distance from the 2D point (x0,y0) to the closest correspondence in the map.
Reimplemented in mrpt::slam::CPointsMap.
|
inline |
Manually updates the occupancy of the voxel at (x,y,z) as being occupied (true) or free (false), using the log-odds parameters in insertionOptions.
Definition at line 234 of file COctoMapBase.h.
|
inline |
Definition at line 284 of file COctoMapBase.h.
|
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.
| 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. |
| std::exception | On any error, see CStream::WriteBuffer |
Implemented in mrpt::reactivenav::CLogFileRecord_ND, mrpt::utils::CSimpleDatabase, mrpt::slam::CObservationIMU, mrpt::slam::CObservation3DRangeScan, mrpt::utils::CImage, mrpt::detectors::CDetectable3D, mrpt::hmtslam::CLocalMetricHypothesis, mrpt::hmtslam::THypothesisIDSet, 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::detectors::CDetectable2D, mrpt::hmtslam::CLSLAMParticleData, mrpt::slam::CReflectivityGridMap2D, mrpt::opengl::COpenGLScene, mrpt::opengl::CPointCloudColoured, mrpt::pbmap::PbMap, mrpt::opengl::CFrustum, mrpt::utils::CMHPropertiesValuesList, mrpt::opengl::CEllipsoidInverseDepth3D, mrpt::hmtslam::CHMHMapNode, mrpt::slam::CBeacon, mrpt::slam::CObservationStereoImages, mrpt::opengl::CVectorField2D, mrpt::opengl::CAngularObservationMesh, mrpt::slam::CObservationStereoImagesFeatures, mrpt::opengl::CEllipsoid, mrpt::opengl::CEllipsoidInverseDepth2D, mrpt::opengl::CText3D, mrpt::poses::CPose3DQuat, mrpt::poses::CPose3DRotVec, mrpt::slam::CGasConcentrationGridMap2D, mrpt::opengl::CAssimpModel, mrpt::slam::CLandmark, mrpt::poses::CPose3DQuatPDFGaussianInf, mrpt::opengl::CMeshFast, mrpt::poses::CPose3DQuatPDFGaussian, mrpt::hmtslam::CRobotPosesGraph, mrpt::opengl::CEllipsoidRangeBearing2D, mrpt::opengl::CMesh, mrpt::poses::CPose3DPDFGaussianInf, mrpt::slam::COctoMap, mrpt::slam::CWirelessPowerGridMap2D, 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::poses::CPose3DPDFSOG, mrpt::poses::CPosePDFGaussianInf, mrpt::slam::CActionRobotMovement2D, mrpt::slam::CObservationBatteryState, mrpt::slam::CSimpleMap, mrpt::opengl::CGridPlaneXY, mrpt::opengl::CGridPlaneXZ, mrpt::opengl::CArrow, mrpt::opengl::CAxis, mrpt::opengl::CDisk, mrpt::opengl::CSphere, mrpt::slam::CIncrementalMapPartitioner, mrpt::poses::CPoint3D, mrpt::poses::CPosePDFGaussian, mrpt::utils::CStringList, mrpt::slam::CWeightedPointsMap, mrpt::slam::CObservationWindSensor, mrpt::opengl::CCamera, mrpt::poses::CPosePDFGrid, mrpt::slam::CObservationOdometry, mrpt::opengl::CSetOfObjects, mrpt::opengl::CSetOfTexturedTriangles, mrpt::reactivenav::CLogFileRecord, mrpt::math::CMatrix, mrpt::math::CMatrixD, 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::slam::CObservationVisualLandmarks, 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::C3DSScene, mrpt::opengl::CGeneralizedCylinder, mrpt::reactivenav::CLogFileRecord_VFF, mrpt::math::CMatrixB, 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.
|
staticinherited |
Definition at line 88 of file CMetricMap.h.
|
staticinherited |
|
staticinherited |
Definition at line 38 of file CSerializable.h.
| TInsertionOptions mrpt::slam::COctoMapBase< OCTREE, OCTREE_NODE >::insertionOptions |
The options used when inserting observations in the map.
Definition at line 144 of file COctoMapBase.h.
| TLikelihoodOptions mrpt::slam::COctoMapBase< OCTREE, OCTREE_NODE >::likelihoodOptions |
Definition at line 170 of file COctoMapBase.h.
|
inherited |
When set to true (default=false), calling "getAs3DObject" will have no effects.
Definition at line 279 of file CMetricMap.h.
|
protected |
The actual octo-map object.
Definition at line 317 of file COctoMapBase.h.
Referenced by mrpt::slam::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >::calcNumNodes(), mrpt::slam::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >::getMetricMax(), mrpt::slam::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >::getMetricMin(), mrpt::slam::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >::getMetricSize(), mrpt::slam::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >::getNumLeafNodes(), mrpt::slam::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >::getOctomap(), mrpt::slam::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >::getResolution(), mrpt::slam::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >::getTreeDepth(), mrpt::slam::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >::insertRay(), mrpt::slam::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >::internal_clear(), mrpt::slam::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >::isPointWithinOctoMap(), mrpt::slam::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >::memoryFullGrid(), mrpt::slam::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >::memoryUsage(), mrpt::slam::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >::memoryUsageNode(), mrpt::slam::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >::size(), mrpt::slam::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >::updateVoxel(), and mrpt::slam::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >::volume().
| TRenderingOptions mrpt::slam::COctoMapBase< OCTREE, OCTREE_NODE >::renderingOptions |
Definition at line 205 of file COctoMapBase.h.
| Page generated by Doxygen 1.8.8 for MRPT 1.2.2 SVN:Unversioned directory at Tue Oct 14 02:14:08 UTC 2014 |