A cloud of points in 2D or 3D, which can be built from a sequence of laser scans.
This class only stores the coordinates (x,y,z) of each point.
See mrpt::slam::CPointsMap and derived classes for other point cloud classes.
#include <mrpt/slam/CSimplePointsMap.h>

Public Types | |
| typedef KDTreeCapable< Derived, num_t, metric_t > | self_t |
Public Member Functions | |
| CSimplePointsMap () | |
| Default constructor. | |
| virtual | ~CSimplePointsMap () |
| Destructor. | |
| 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. | |
| virtual CSimplePointsMap * | getAsSimplePointsMap () |
| 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. | |
| virtual float | squareDistanceToClosestCorrespondence (const float &x0, const float &y0) const |
| Returns the square distance from the 2D point (x0,y0) to the closest correspondence in the map. | |
| float | squareDistanceToClosestCorrespondenceT (const TPoint2D &p0) const |
| virtual void | addFrom (const CPointsMap &anotherMap) |
| Adds all the points from anotherMap to this map, without fusing. | |
| void | operator+= (const CPointsMap &anotherMap) |
| This operator is synonymous with addFrom. | |
| void | insertAnotherMap (const CPointsMap *otherMap, const CPose3D &otherPose) |
| Insert the contents of another map into this one with some geometric transformation, without fusing close points. | |
| size_t | size () const |
| Returns the number of stored points in the map. | |
| size_t | getPointsCount () const |
| Returns the number of stored points in the map (DEPRECATED, use "size()" instead better) | |
| unsigned long | getPoint (size_t index, float &x, float &y, float &z) const |
| Access to a given point from map, as a 2D point. | |
| unsigned long | getPoint (size_t index, float &x, float &y) const |
| unsigned long | getPoint (size_t index, double &x, double &y, double &z) const |
| unsigned long | getPoint (size_t index, double &x, double &y) const |
| unsigned long | getPoint (size_t index, CPoint2D &p) const |
| unsigned long | getPoint (size_t index, CPoint3D &p) const |
| unsigned long | getPoint (size_t index, mrpt::math::TPoint2D &p) const |
| unsigned long | getPoint (size_t index, mrpt::math::TPoint3D &p) const |
| virtual void | getPoint (size_t index, float &x, float &y, float &z, float &R, float &G, float &B) const |
| Access to a given point from map, and its colors, if the map defines them (othersise, R=G=B=1.0). | |
| void | getPointFast (size_t index, float &x, float &y, float &z) const |
| Just like getPoint() but without checking out-of-bound index and without returning the point weight, just XYZ. | |
| virtual bool | hasColorPoints () const |
| Returns true if the point map has a color field for each point. | |
| void | setPoint (size_t index, float x, float y, float z) |
| Changes a given point from map, with Z defaulting to 0 if not provided. | |
| void | setPoint (size_t index, CPoint2D &p) |
| void | setPoint (size_t index, CPoint3D &p) |
| void | setPoint (size_t index, float x, float y) |
| virtual void | setPoint (size_t index, float x, float y, float z, float R, float G, float B) |
| virtual void | setPointWeight (size_t index, unsigned long w) |
| Sets the point weight, which is ignored in all classes but those which actually store that field (Note: No checks are done for out-of-bounds index). | |
| virtual unsigned int | getPointWeight (size_t index) const |
| Gets the point weight, which is ignored in all classes (defaults to 1) but in those which actually store that field (Note: No checks are done for out-of-bounds index). | |
| void | getPointsBuffer (size_t &outPointsCount, const float *&xs, const float *&ys, const float *&zs) const |
| Provides a direct access to points buffer, or NULL if there is no points in the map. | |
| const std::vector< float > & | getPointsBufferRef_x () const |
| Provides a direct access to a read-only reference of the internal point buffer. | |
| const std::vector< float > & | getPointsBufferRef_y () const |
| Provides a direct access to a read-only reference of the internal point buffer. | |
| const std::vector< float > & | getPointsBufferRef_z () const |
| Provides a direct access to a read-only reference of the internal point buffer. | |
| template<class VECTOR > | |
| void | getAllPoints (VECTOR &xs, VECTOR &ys, VECTOR &zs, size_t decimation=1) const |
| Returns a copy of the 2D/3D points as a std::vector of float coordinates. | |
| void | getAllPoints (std::vector< TPoint3D > &ps, size_t decimation=1) const |
| void | getAllPoints (std::vector< float > &xs, std::vector< float > &ys, size_t decimation=1) const |
| Returns a copy of the 2D/3D points as a std::vector of float coordinates. | |
| void | getAllPoints (std::vector< TPoint2D > &ps, size_t decimation=1) const |
| void | insertPoint (float x, float y, float z=0) |
| Provides a way to insert (append) individual points into the map: the missing fields of child classes (color, weight, etc) are left to their default values. | |
| void | insertPoint (const CPoint3D &p) |
| void | insertPoint (const mrpt::math::TPoint3D &p) |
| virtual void | insertPoint (float x, float y, float z, float R, float G, float B) |
| template<typename VECTOR > | |
| void | setAllPointsTemplate (const VECTOR &X, const VECTOR &Y, const VECTOR &Z=VECTOR()) |
| Set all the points at once from vectors with X,Y and Z coordinates (if Z is not provided, it will be set to all zeros). | |
| void | setAllPoints (const std::vector< float > &X, const std::vector< float > &Y, const std::vector< float > &Z) |
| Set all the points at once from vectors with X,Y and Z coordinates. | |
| void | setAllPoints (const std::vector< float > &X, const std::vector< float > &Y) |
| Set all the points at once from vectors with X and Y coordinates (Z=0). | |
| void | getPointAllFields (const size_t index, std::vector< float > &point_data) const |
| Get all the data fields for one point as a vector: depending on the implementation class this can be [X Y Z] or [X Y Z R G B], etc... | |
| void | setPointAllFields (const size_t index, const std::vector< float > &point_data) |
| Set all the data fields for one point as a vector: depending on the implementation class this can be [X Y Z] or [X Y Z R G B], etc... | |
| void | clipOutOfRangeInZ (float zMin, float zMax) |
| Delete points out of the given "z" axis range have been removed. | |
| void | clipOutOfRange (const CPoint2D &point, float maxRange) |
| Delete points which are more far than "maxRange" away from the given "point". | |
| void | applyDeletionMask (const std::vector< bool > &mask) |
| Remove from the map the points marked in a bool's array as "true". | |
| void | computeMatchingWith2D (const CMetricMap *otherMap, const CPose2D &otherMapPose, float maxDistForCorrespondence, float maxAngularDistForCorrespondence, const CPose2D &angularDistPivotPoint, TMatchingPairList &correspondences, float &correspondencesRatio, float *sumSqrDist=NULL, bool onlyKeepTheClosest=false, bool onlyUniqueRobust=false, const size_t decimation_other_map_points=1, const size_t offset_other_map_points=0) const |
| Computes the matchings between this and another 2D/3D points map. | |
| void | computeMatchingWith3D (const CMetricMap *otherMap, const CPose3D &otherMapPose, float maxDistForCorrespondence, float maxAngularDistForCorrespondence, const CPoint3D &angularDistPivotPoint, TMatchingPairList &correspondences, float &correspondencesRatio, float *sumSqrDist=NULL, bool onlyKeepTheClosest=true, bool onlyUniqueRobust=false, const size_t decimation_other_map_points=1, const size_t offset_other_map_points=0) const |
| Computes the matchings between this and another 3D points map - method used in 3D-ICP. | |
| float | compute3DMatchingRatio (const CMetricMap *otherMap, const CPose3D &otherMapPose, float minDistForCorr=0.10f, float minMahaDistForCorr=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. | |
| void | fuseWith (CPointsMap *anotherMap, float minDistForFuse=0.02f, std::vector< bool > *notFusedPoints=NULL) |
| Insert the contents of another map into this one, fusing the previous content with the new one. | |
| void | changeCoordinatesReference (const CPose2D &b) |
Replace each point by (pose compounding operator). | |
| void | changeCoordinatesReference (const CPose3D &b) |
Replace each point by (pose compounding operator). | |
| void | changeCoordinatesReference (const CPointsMap &other, const CPose3D &b) |
Copy all the points from "other" map to "this", replacing each point by (pose compounding operator). | |
| virtual bool | isEmpty () const |
| Returns true if the map is empty/no observation has been inserted. | |
| bool | empty () const |
| STL-like method to check whether the map is empty: | |
| virtual void | getAs3DObject (mrpt::opengl::CSetOfObjectsPtr &outObj) const |
| Returns a 3D object representing the map. | |
| float | getLargestDistanceFromOrigin () const |
| This method returns the largest distance from the origin to any of the points, such as a sphere centered at the origin with this radius cover ALL the points in the map (the results are buffered, such as, if the map is not modified, the second call will be much faster than the first one). | |
| float | getLargestDistanceFromOriginNoRecompute (bool &output_is_valid) const |
| Like getLargestDistanceFromOrigin() but returns in output_is_valid = false if the distance was not already computed, skipping its computation then, unlike getLargestDistanceFromOrigin() | |
| void | boundingBox (float &min_x, float &max_x, float &min_y, float &max_y, float &min_z, float &max_z) const |
| Computes the bounding box of all the points, or (0,0 ,0,0, 0,0) if there are no points. | |
| void | boundingBox (TPoint3D &pMin, TPoint3D &pMax) const |
| void | extractCylinder (const CPoint2D ¢er, const double radius, const double zmin, const double zmax, CPointsMap *outMap) |
| virtual double | computeObservationLikelihood (const CObservation *obs, const CPose3D &takenFrom) |
| Computes the likelihood of taking a given observation from a given pose in the world being modeled with this map. | |
| double | computeObservationLikelihood (const CObservation *obs, const CPose2D &takenFrom) |
| Computes the log-likelihood of a given observation given an arbitrary robot 2D pose. | |
| void | clear () |
| Erase all the contents of the map. | |
| void | loadFromProbabilisticPosesAndObservations (const CSimpleMap &Map) |
| Load the map contents from a CSimpleMap object, erasing all previous content of the map. | |
| void | loadFromSimpleMap (const CSimpleMap &Map) |
| Load the map contents from a CSimpleMap object, erasing all previous content of the map. | |
| bool | insertObservation (const CObservation *obs, const CPose3D *robotPose=NULL) |
| Insert the observation information into this map. | |
| bool | insertObservationPtr (const CObservationPtr &obs, const CPose3D *robotPose=NULL) |
| A wrapper for smart pointers, just calls the non-smart pointer version. | |
| virtual bool | canComputeObservationLikelihood (const CObservation *obs) |
| Returns true if this map is able to compute a sensible likelihood function for this observation (i.e. | |
| double | computeObservationsLikelihood (const CSensoryFrame &sf, const CPose2D &takenFrom) |
| Returns the sum of the log-likelihoods of each individual observation within a mrpt::slam::CSensoryFrame. | |
| bool | canComputeObservationsLikelihood (const CSensoryFrame &sf) |
| Returns true if this map is able to compute a sensible likelihood function for this observation (i.e. | |
| virtual void | auxParticleFilterCleanUp () |
| This method is called at the end of each "prediction-update-map insertion" cycle within "mrpt::slam::CMetricMapBuilderRBPF::processActionObservation". | |
| 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). | |
| CObject * | clone () const |
| Cloning interface for smart pointers. | |
| const Derived & | derived () const |
| CRTP helper method. | |
| Derived & | derived () |
| CRTP helper method. | |
| bool | loadFromPlyFile (const std::string &filename, CStringList *file_comments=NULL, CStringList *file_obj_info=NULL) |
| Loads from a PLY file. | |
| std::string | getLoadPLYErrorString () const |
| Return a description of the error if loadFromPlyFile() returned false, or an empty string if the file was loaded without problems. | |
| bool | saveToPlyFile (const std::string &filename, bool save_in_binary=false, const CStringList &file_comments=CStringList(), const CStringList &file_obj_info=CStringList()) const |
| Saves to a PLY file. | |
| std::string | getSavePLYErrorString () const |
| Return a description of the error if loadFromPlyFile() returned false, or an empty string if the file was loaded without problems. | |
File input/output methods | |
| bool | load2D_from_text_file (const std::string &file) |
| Load from a text file. | |
| bool | load3D_from_text_file (const std::string &file) |
| Load from a text file. | |
| bool | load2Dor3D_from_text_file (const std::string &file, const bool is_3D) |
| 2D or 3D generic implementation of load2D_from_text_file and load3D_from_text_file | |
| bool | save2D_to_text_file (const std::string &file) const |
| Save to a text file. | |
| bool | save3D_to_text_file (const std::string &file) const |
| Save to a text file. | |
| 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). | |
| virtual bool | savePCDFile (const std::string &filename, bool save_as_binary) const |
| Save the point cloud as a PCL PCD file, in either ASCII or binary format (requires MRPT built against PCL) | |
Filter-by-height stuff | |
| void | enableFilterByHeight (bool enable=true) |
| Enable/disable the filter-by-height functionality. | |
| bool | isFilterByHeightEnabled () const |
| Return whether filter-by-height is enabled. | |
| void | setHeightFilterLevels (const double _z_min, const double _z_max) |
| Set the min/max Z levels for points to be actually inserted in the map (only if enableFilterByHeight() was called before). | |
| void | getHeightFilterLevels (double &_z_min, double &_z_max) const |
| Get the min/max Z levels for points to be actually inserted in the map. | |
PCL library support | |
| template<class POINTCLOUD > | |
| void | getPCLPointCloud (POINTCLOUD &cloud) const |
| Use to convert this MRPT point cloud object into a PCL point cloud object. | |
Methods that MUST be implemented by children classes of KDTreeCapable | |
| size_t | kdtree_get_point_count () const |
| Must return the number of data points. | |
| float | kdtree_get_pt (const size_t idx, int dim) const |
| Returns the dim'th component of the idx'th point in the class: | |
| float | kdtree_distance (const float *p1, const size_t idx_p2, size_t size) const |
| Returns the distance between the vector "p1[0:size-1]" and the data point with index "idx_p2" stored in the class: | |
| template<typename BBOX > | |
| bool | kdtree_get_bbox (BBOX &bb) const |
Public utility methods to query the KD-tree | |
| size_t | kdTreeClosestPoint2D (float x0, float y0, float &out_x, float &out_y, float &out_dist_sqr) const |
| KD Tree-based search for the closest point (only ONE) to some given 2D coordinates. | |
| size_t | kdTreeClosestPoint2D (float x0, float y0, float &out_dist_sqr) const |
| size_t | kdTreeClosestPoint2D (const TPoint2D &p0, TPoint2D &pOut, float &outDistSqr) const |
| float | kdTreeClosestPoint2DsqrError (float x0, float y0) const |
| Like kdTreeClosestPoint2D, but just return the square error from some point to its closest neighbor. | |
| float | kdTreeClosestPoint2DsqrError (const TPoint2D &p0) const |
| void | kdTreeTwoClosestPoint2D (float x0, float y0, float &out_x1, float &out_y1, float &out_x2, float &out_y2, float &out_dist_sqr1, float &out_dist_sqr2) const |
| KD Tree-based search for the TWO closest point to some given 2D coordinates. | |
| void | kdTreeTwoClosestPoint2D (const TPoint2D &p0, TPoint2D &pOut1, TPoint2D &pOut2, float &outDistSqr1, float &outDistSqr2) const |
| std::vector< int > | kdTreeNClosestPoint2D (float x0, float y0, size_t knn, std::vector< float > &out_x, std::vector< float > &out_y, std::vector< float > &out_dist_sqr) const |
| KD Tree-based search for the N closest point to some given 2D coordinates. | |
| std::vector< int > | kdTreeNClosestPoint2D (const TPoint2D &p0, size_t N, std::vector< TPoint2D > &pOut, std::vector< float > &outDistSqr) const |
| void | kdTreeNClosestPoint2DIdx (float x0, float y0, size_t knn, std::vector< int > &out_idx, std::vector< float > &out_dist_sqr) const |
| KD Tree-based search for the N closest point to some given 2D coordinates and returns their indexes. | |
| void | kdTreeNClosestPoint2DIdx (const TPoint2D &p0, size_t N, std::vector< int > &outIdx, std::vector< float > &outDistSqr) const |
| size_t | kdTreeClosestPoint3D (float x0, float y0, float z0, float &out_x, float &out_y, float &out_z, float &out_dist_sqr) const |
| KD Tree-based search for the closest point (only ONE) to some given 3D coordinates. | |
| size_t | kdTreeClosestPoint3D (float x0, float y0, float z0, float &out_dist_sqr) const |
| size_t | kdTreeClosestPoint3D (const TPoint3D &p0, TPoint3D &pOut, float &outDistSqr) const |
| void | kdTreeNClosestPoint3D (float x0, float y0, float z0, size_t knn, std::vector< float > &out_x, std::vector< float > &out_y, std::vector< float > &out_z, std::vector< float > &out_dist_sqr) const |
| KD Tree-based search for the N closest points to some given 3D coordinates. | |
| void | kdTreeNClosestPoint3D (const TPoint3D &p0, size_t N, std::vector< TPoint3D > &pOut, std::vector< float > &outDistSqr) const |
| void | kdTreeNClosestPoint3DIdx (float x0, float y0, float z0, size_t knn, std::vector< int > &out_idx, std::vector< float > &out_dist_sqr) const |
| KD Tree-based search for the N closest point to some given 3D coordinates and returns their indexes. | |
| void | kdTreeNClosestPoint3DIdx (const TPoint3D &p0, size_t N, std::vector< int > &outIdx, std::vector< float > &outDistSqr) const |
Public Attributes | |
| TInsertionOptions | insertionOptions |
| The options used when inserting observations in the map. | |
| TLikelihoodOptions | likelihoodOptions |
| bool | m_disableSaveAs3DObject |
| When set to true (default=false), calling "getAs3DObject" will have no effects. | |
| TKDTreeSearchParams | kdtree_search_params |
| Parameters to tune the ANN searches. | |
Static Public Attributes | |
| static float | COLOR_3DSCENE_R |
| The color [0,1] of points when extracted from getAs3DObject (default=blue) | |
| static float | COLOR_3DSCENE_G |
| static float | COLOR_3DSCENE_B |
| static const mrpt::utils::TRuntimeClassId | classCObject |
RTTI stuff | |
| static const mrpt::utils::TRuntimeClassId | classCMetricMap |
RTTI stuff | |
| static const mrpt::utils::TRuntimeClassId | classCSerializable |
Protected Member Functions | |
| virtual void | internal_clear () |
| Clear the map, erasing all the points. | |
| void | mark_as_modified () const |
| Called only by this class or children classes, set m_largestDistanceFromOriginIsUpdated=false and such. | |
| bool | internal_insertObservation (const CObservation *obs, const CPose3D *robotPose) |
| This is a common version of CMetricMap::insertObservation() for point maps (actually, CMetricMap::internal_insertObservation), so derived classes don't need to worry implementing that method unless something special is really necesary. | |
| void | base_copyFrom (const CPointsMap &obj) |
| Helper method for ::copyFrom() | |
| virtual void | writeToStream (mrpt::utils::CStream &out, int *getVersion) const =0 |
| Introduces a pure virtual method responsible for writing to a CStream. | |
| 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. | |
| 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. | |
| 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. | |
| void | kdtree_mark_as_outdated () const |
| To be called by child classes when KD tree data changes. | |
PLY Import virtual methods to implement in base classes | |
| virtual void | PLY_import_set_vertex_count (const size_t N) |
| In a base class, reserve memory to prepare subsequent calls to PLY_import_set_vertex. | |
PLY Import virtual methods to implement in base classes | |
| virtual void | PLY_import_set_face_count (const size_t N) |
| In a base class, reserve memory to prepare subsequent calls to PLY_import_set_face. | |
| virtual void | PLY_import_set_vertex (const size_t idx, const mrpt::math::TPoint3Df &pt, const mrpt::utils::TColorf *pt_color=NULL) |
| In a base class, will be called after PLY_import_set_vertex_count() once for each loaded point. | |
PLY Export virtual methods to implement in base classes | |
| virtual size_t | PLY_export_get_vertex_count () const |
| In a base class, return the number of vertices. | |
| virtual size_t | PLY_export_get_face_count () const |
| In a base class, return the number of faces. | |
| virtual void | PLY_export_get_vertex (const size_t idx, mrpt::math::TPoint3Df &pt, bool &pt_has_color, mrpt::utils::TColorf &pt_color) const |
| In a base class, will be called after PLY_export_get_vertex_count() once for each exported point. | |
Protected Attributes | |
| std::vector< float > | x |
| std::vector< float > | y |
| std::vector< float > | z |
| The point coordinates. | |
| CSinCosLookUpTableFor2DScans | m_scans_sincos_cache |
| Cache of sin/cos values for the latest 2D scan geometries. | |
| float | m_largestDistanceFromOrigin |
| Auxiliary variables used in "getLargestDistanceFromOrigin". | |
| bool | m_largestDistanceFromOriginIsUpdated |
| Auxiliary variables used in "getLargestDistanceFromOrigin". | |
| bool | m_boundingBoxIsUpdated |
| float | m_bb_min_x |
| float | m_bb_max_x |
| float | m_bb_min_y |
| float | m_bb_max_y |
| float | m_bb_min_z |
| float | m_bb_max_z |
| double | m_heightfilter_z_min |
| The minimum and maximum height for a certain laser scan to be inserted into this map. | |
| double | m_heightfilter_z_max |
| bool | m_heightfilter_enabled |
| Whether or not (default=not) filter the input points by height. | |
RTTI stuff | |
| static const mrpt::utils::TRuntimeClassId | classCPointsMap |
| class | mrpt::utils::CStream |
RTTI stuff | |
| typedef CSimplePointsMapPtr | SmartPtr |
| static mrpt::utils::CLASSINIT | _init_CSimplePointsMap |
| static mrpt::utils::TRuntimeClassId | classCSimplePointsMap |
| static const mrpt::utils::TRuntimeClassId * | classinfo |
| static const mrpt::utils::TRuntimeClassId * | _GetBaseClass () |
| virtual const mrpt::utils::TRuntimeClassId * | GetRuntimeClass () const |
| Returns information about the class of an object in runtime. | |
| virtual mrpt::utils::CObject * | duplicate () const |
| Returns a copy of the object, indepently of its class. | |
| static mrpt::utils::CObject * | CreateObject () |
| static CSimplePointsMapPtr | Create () |
Pure virtual interfaces to be implemented by any class derived from CPointsMap | |
| struct | detail::loadFromRangeImpl |
| struct | detail::pointmap_traits |
| virtual void | reserve (size_t newLength) |
| Reserves memory for a given number of points: the size of the map does not change, it only reserves the memory. | |
| virtual void | resize (size_t newLength) |
| Resizes all point buffers so they can hold the given number of points: newly created points are set to default values, and old contents are not changed. | |
| virtual void | setSize (size_t newLength) |
| Resizes all point buffers so they can hold the given number of points, *erasing* all previous contents and leaving all points to default values. | |
| virtual void | setPointFast (size_t index, float x, float y, float z) |
| Changes the coordinates of the given point (0-based index), *without* checking for out-of-bounds and *without* calling mark_as_modified() | |
| virtual void | insertPointFast (float x, float y, float z=0) |
| The virtual method for insertPoint() *without* calling mark_as_modified() | |
| virtual void | copyFrom (const CPointsMap &obj) |
| Virtual assignment operator, to be implemented in derived classes. | |
| virtual void | getPointAllFieldsFast (const size_t index, std::vector< float > &point_data) const |
| Get all the data fields for one point as a vector: [X Y Z] Unlike getPointAllFields(), this method does not check for index out of bounds. | |
| virtual void | setPointAllFieldsFast (const size_t index, const std::vector< float > &point_data) |
| Set all the data fields for one point as a vector: [X Y Z] Unlike setPointAllFields(), this method does not check for index out of bounds. | |
| virtual void | loadFromRangeScan (const CObservation2DRangeScan &rangeScan, const CPose3D *robotPose=NULL) |
| See CPointsMap::loadFromRangeScan() | |
| virtual void | loadFromRangeScan (const CObservation3DRangeScan &rangeScan, const CPose3D *robotPose=NULL) |
| See CPointsMap::loadFromRangeScan() | |
| virtual void | addFrom_classSpecific (const CPointsMap &anotherMap, const size_t nPreviousPoints) |
| Auxiliary method called from within addFrom() automatically, to finish the copying of class-specific data. | |
typedef KDTreeCapable<Derived,num_t,metric_t> mrpt::math::KDTreeCapable::self_t [inherited] |
Definition at line 90 of file KDTreeCapable.h.
A typedef for the associated smart pointer
Definition at line 57 of file CSimplePointsMap.h.
| mrpt::slam::CSimplePointsMap::CSimplePointsMap | ( | ) |
Default constructor.
| virtual mrpt::slam::CSimplePointsMap::~CSimplePointsMap | ( | ) | [virtual] |
Destructor.
| static const mrpt::utils::TRuntimeClassId* mrpt::slam::CSimplePointsMap::_GetBaseClass | ( | ) | [static, protected] |
Reimplemented from mrpt::slam::CPointsMap.
| virtual void mrpt::slam::CPointsMap::addFrom | ( | const CPointsMap & | anotherMap | ) | [virtual, inherited] |
Adds all the points from anotherMap to this map, without fusing.
This operation can be also invoked via the "+=" operator, for example:
CSimplePointsMap m1, m2; ... m1.addFrom( m2 ); // Add all points of m2 to m1 m1 += m2; // Exactly the same than above
| virtual void mrpt::slam::CSimplePointsMap::addFrom_classSpecific | ( | const CPointsMap & | anotherMap, |
| const size_t | nPreviousPoints | ||
| ) | [inline, protected, virtual] |
Auxiliary method called from within addFrom() automatically, to finish the copying of class-specific data.
Implements mrpt::slam::CPointsMap.
Definition at line 131 of file CSimplePointsMap.h.
| void mrpt::slam::CPointsMap::applyDeletionMask | ( | const std::vector< bool > & | mask | ) | [inherited] |
Remove from the map the points marked in a bool's array as "true".
| std::exception | If mask size is not equal to points count. |
| virtual void mrpt::slam::CMetricMap::auxParticleFilterCleanUp | ( | ) | [inline, virtual, inherited] |
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 326 of file CMetricMap.h.
| void mrpt::slam::CPointsMap::base_copyFrom | ( | const CPointsMap & | obj | ) | [protected, inherited] |
Helper method for ::copyFrom()
| void mrpt::slam::CPointsMap::boundingBox | ( | float & | min_x, |
| float & | max_x, | ||
| float & | min_y, | ||
| float & | max_y, | ||
| float & | min_z, | ||
| float & | max_z | ||
| ) | const [inherited] |
Computes the bounding box of all the points, or (0,0 ,0,0, 0,0) if there are no points.
Results are cached unless the map is somehow modified to avoid repeated calculations.
| void mrpt::slam::CPointsMap::boundingBox | ( | TPoint3D & | pMin, |
| TPoint3D & | pMax | ||
| ) | const [inline, inherited] |
Definition at line 675 of file CPointsMap.h.
References mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
| virtual bool mrpt::slam::CMetricMap::canComputeObservationLikelihood | ( | const CObservation * | obs | ) | [inline, virtual, 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).
| obs | The observation. |
Reimplemented in mrpt::slam::COccupancyGridMap2D, and mrpt::slam::CMultiMetricMap.
Definition at line 184 of file CMetricMap.h.
| bool mrpt::slam::CMetricMap::canComputeObservationsLikelihood | ( | const CSensoryFrame & | sf | ) | [inherited] |
Returns true if this map is able to compute a sensible likelihood function for this observation (i.e.
an occupancy grid map cannot with an image).
| sf | The observations. |
| void mrpt::slam::CPointsMap::changeCoordinatesReference | ( | const CPose2D & | b | ) | [inherited] |
Replace each point
by
(pose compounding operator).
| void mrpt::slam::CPointsMap::changeCoordinatesReference | ( | const CPose3D & | b | ) | [inherited] |
Replace each point
by
(pose compounding operator).
| void mrpt::slam::CPointsMap::changeCoordinatesReference | ( | const CPointsMap & | other, |
| const CPose3D & | b | ||
| ) | [inherited] |
Copy all the points from "other" map to "this", replacing each point
by
(pose compounding operator).
| void mrpt::slam::CMetricMap::clear | ( | ) | [inherited] |
Erase all the contents of the map.
Reimplemented in mrpt::slam::CRandomFieldGridMap2D, mrpt::slam::CHeightGridMap2D, and mrpt::slam::CReflectivityGridMap2D.
Referenced by mrpt::slam::CHeightGridMap2D::clear(), and mrpt::slam::CReflectivityGridMap2D::clear().
| void mrpt::slam::CPointsMap::clipOutOfRange | ( | const CPoint2D & | point, |
| float | maxRange | ||
| ) | [inherited] |
Delete points which are more far than "maxRange" away from the given "point".
| void mrpt::slam::CPointsMap::clipOutOfRangeInZ | ( | float | zMin, |
| float | zMax | ||
| ) | [inherited] |
Delete points out of the given "z" axis range have been removed.
| CObject* mrpt::utils::CObject::clone | ( | ) | const [inline, inherited] |
Cloning interface for smart pointers.
Reimplemented in mrpt::opengl::CRenderizable, and mrpt::opengl::CRenderizableDisplayList.
| float mrpt::slam::CPointsMap::compute3DMatchingRatio | ( | const CMetricMap * | otherMap, |
| const CPose3D & | otherMapPose, | ||
| float | minDistForCorr = 0.10f, |
||
| float | minMahaDistForCorr = 2.0f |
||
| ) | const [virtual, inherited] |
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". |
| minDistForCorr | [IN] The minimum distance between 2 non-probabilistic map elements for counting them as a correspondence. |
| minMahaDistForCorr | [IN] The minimum Mahalanobis distance between 2 probabilistic map elements for counting them as a correspondence. |
Implements mrpt::slam::CMetricMap.
| void mrpt::slam::CPointsMap::computeMatchingWith2D | ( | const CMetricMap * | otherMap, |
| const CPose2D & | otherMapPose, | ||
| float | maxDistForCorrespondence, | ||
| float | maxAngularDistForCorrespondence, | ||
| const CPose2D & | angularDistPivotPoint, | ||
| TMatchingPairList & | correspondences, | ||
| float & | correspondencesRatio, | ||
| float * | sumSqrDist = NULL, |
||
| bool | onlyKeepTheClosest = false, |
||
| bool | onlyUniqueRobust = false, |
||
| const size_t | decimation_other_map_points = 1, |
||
| const size_t | offset_other_map_points = 0 |
||
| ) | const [virtual, inherited] |
Computes the matchings between this and another 2D/3D points map.
This includes finding:
| otherMap | [IN] The other map to compute the matching with. |
| otherMapPose | [IN] The pose of the other map as seen from "this". |
| maxDistForCorrespondence | [IN] Maximum 2D distance between two points to be matched. |
| maxAngularDistForCorrespondence | [IN] Maximum angular distance in radians to allow far points to be matched. |
| angularDistPivotPoint | [IN] The point from which to measure the "angular distances" |
| correspondences | [OUT] The detected matchings pairs. |
| correspondencesRatio | [OUT] The number of correct correspondences. |
| sumSqrDist | [OUT] The sum of all matched points squared distances.If undesired, set to NULL, as default. |
| covariance | [OUT] The resulting matching covariance 3x3 matrix, or NULL if undesired. |
| onlyKeepTheClosest | [OUT] Returns only the closest correspondence (default=false) |
Reimplemented from mrpt::slam::CMetricMap.
| void mrpt::slam::CPointsMap::computeMatchingWith3D | ( | const CMetricMap * | otherMap, |
| const CPose3D & | otherMapPose, | ||
| float | maxDistForCorrespondence, | ||
| float | maxAngularDistForCorrespondence, | ||
| const CPoint3D & | angularDistPivotPoint, | ||
| TMatchingPairList & | correspondences, | ||
| float & | correspondencesRatio, | ||
| float * | sumSqrDist = NULL, |
||
| bool | onlyKeepTheClosest = true, |
||
| bool | onlyUniqueRobust = false, |
||
| const size_t | decimation_other_map_points = 1, |
||
| const size_t | offset_other_map_points = 0 |
||
| ) | const [virtual, inherited] |
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 the ICP algorithm.
| otherMap | [IN] The other map to compute the matching with. |
| otherMapPose | [IN] The pose of the other map as seen from "this". |
| maxDistForCorrespondence | [IN] Maximum 2D linear distance between two points to be matched. |
| maxAngularDistForCorrespondence | [IN] In radians: The aim is to allow larger distances to more distant correspondences. |
| angularDistPivotPoint | [IN] The point used to calculate distances from in both maps. |
| correspondences | [OUT] The detected matchings pairs. |
| correspondencesRatio | [OUT] The ratio [0,1] of points in otherMap with at least one correspondence. |
| sumSqrDist | [OUT] The sum of all matched points squared distances.If undesired, set to NULL, as default. |
| onlyKeepTheClosest | [IN] If set to true, only the closest correspondence will be returned. If false (default) all are returned. |
Reimplemented from mrpt::slam::CMetricMap.
| double mrpt::slam::CMetricMap::computeObservationLikelihood | ( | const CObservation * | obs, |
| const CPose2D & | takenFrom | ||
| ) | [inline, 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. |
Definition at line 175 of file CMetricMap.h.
| virtual double mrpt::slam::CPointsMap::computeObservationLikelihood | ( | const CObservation * | obs, |
| const CPose3D & | takenFrom | ||
| ) | [virtual, inherited] |
Computes the likelihood of taking a given observation from a given pose in the world being modeled with this map.
| takenFrom | The robot's pose the observation is supposed to be taken from. |
| obs | The observation. |
Implements mrpt::slam::CMetricMap.
| double mrpt::slam::CMetricMap::computeObservationsLikelihood | ( | const CSensoryFrame & | sf, |
| const CPose2D & | takenFrom | ||
| ) | [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. |
| virtual void mrpt::slam::CSimplePointsMap::copyFrom | ( | const CPointsMap & | obj | ) | [virtual] |
Virtual assignment operator, to be implemented in derived classes.
Implements mrpt::slam::CPointsMap.
| static CSimplePointsMapPtr mrpt::slam::CSimplePointsMap::Create | ( | ) | [static] |
| static mrpt::utils::CObject* mrpt::slam::CSimplePointsMap::CreateObject | ( | ) | [static] |
| const Derived& mrpt::math::KDTreeCapable::derived | ( | ) | const [inline, inherited] |
CRTP helper method.
Definition at line 100 of file KDTreeCapable.h.
| Derived& mrpt::math::KDTreeCapable::derived | ( | ) | [inline, inherited] |
CRTP helper method.
Definition at line 102 of file KDTreeCapable.h.
| virtual mrpt::utils::CObject* mrpt::slam::CSimplePointsMap::duplicate | ( | ) | const [virtual] |
Returns a copy of the object, indepently of its class.
Implements mrpt::utils::CObject.
| mrpt::utils::CObjectPtr mrpt::utils::CObject::duplicateGetSmartPtr | ( | ) | const [inline, inherited] |
| bool mrpt::slam::CPointsMap::empty | ( | ) | const [inline, inherited] |
STL-like method to check whether the map is empty:
Definition at line 646 of file CPointsMap.h.
| void mrpt::slam::CPointsMap::enableFilterByHeight | ( | bool | enable = true | ) | [inline, inherited] |
Enable/disable the filter-by-height functionality.
Definition at line 692 of file CPointsMap.h.
| void mrpt::slam::CPointsMap::extractCylinder | ( | const CPoint2D & | center, |
| const double | radius, | ||
| const double | zmin, | ||
| const double | zmax, | ||
| CPointsMap * | outMap | ||
| ) | [inherited] |
| void mrpt::slam::CPointsMap::fuseWith | ( | CPointsMap * | anotherMap, |
| float | minDistForFuse = 0.02f, |
||
| std::vector< bool > * | notFusedPoints = NULL |
||
| ) | [inherited] |
Insert the contents of another map into this one, fusing the previous content with the new one.
This means that points very close to existing ones will be "fused", rather than "added". This prevents the unbounded increase in size of these class of maps. NOTICE that "otherMap" is neither translated nor rotated here, so if this is desired it must done before calling this method.
| otherMap | The other map whose points are to be inserted into this one. |
| minDistForFuse | Minimum distance (in meters) between two points, each one in a map, to be considered the same one and be fused rather than added. |
| notFusedPoints | If a pointer is supplied, this list will contain at output a list with a "bool" value per point in "this" map. This will be false/true according to that point having been fused or not. |
| void mrpt::slam::CPointsMap::getAllPoints | ( | VECTOR & | xs, |
| VECTOR & | ys, | ||
| VECTOR & | zs, | ||
| size_t | decimation = 1 |
||
| ) | const [inline, inherited] |
Returns a copy of the 2D/3D points as a std::vector of float coordinates.
If decimation is greater than 1, only 1 point out of that number will be saved in the output, effectively performing a subsampling of the points.
| VECTOR | can be std::vector<float or double> or any row/column Eigen::Array or Eigen::Matrix (this includes mrpt::vector_float and mrpt::vector_double). |
Definition at line 390 of file CPointsMap.h.
References MRPT_START, ASSERT_, Eigen::internal::y, and MRPT_END.
| void mrpt::slam::CPointsMap::getAllPoints | ( | std::vector< TPoint3D > & | ps, |
| size_t | decimation = 1 |
||
| ) | const [inline, inherited] |
Definition at line 408 of file CPointsMap.h.
| void mrpt::slam::CPointsMap::getAllPoints | ( | std::vector< float > & | xs, |
| std::vector< float > & | ys, | ||
| size_t | decimation = 1 |
||
| ) | const [inherited] |
Returns a copy of the 2D/3D points as a std::vector of float coordinates.
If decimation is greater than 1, only 1 point out of that number will be saved in the output, effectively performing a subsampling of the points.
| void mrpt::slam::CPointsMap::getAllPoints | ( | std::vector< TPoint2D > & | ps, |
| size_t | decimation = 1 |
||
| ) | const [inline, inherited] |
Definition at line 425 of file CPointsMap.h.
| virtual void mrpt::slam::CPointsMap::getAs3DObject | ( | mrpt::opengl::CSetOfObjectsPtr & | outObj | ) | const [virtual, inherited] |
Returns a 3D object representing the map.
The color of the points is given by the static variables: COLOR_3DSCENE_R,COLOR_3DSCENE_G,COLOR_3DSCENE_B
Implements mrpt::slam::CMetricMap.
Reimplemented in mrpt::slam::CColouredPointsMap.
| virtual const CSimplePointsMap* mrpt::slam::CSimplePointsMap::getAsSimplePointsMap | ( | ) | const [inline, virtual] |
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 from mrpt::slam::CPointsMap.
Definition at line 149 of file CSimplePointsMap.h.
| virtual CSimplePointsMap* mrpt::slam::CSimplePointsMap::getAsSimplePointsMap | ( | ) | [inline, virtual] |
Reimplemented from mrpt::slam::CPointsMap.
Definition at line 150 of file CSimplePointsMap.h.
| void mrpt::slam::CPointsMap::getHeightFilterLevels | ( | double & | _z_min, |
| double & | _z_max | ||
| ) | const [inline, inherited] |
Get the min/max Z levels for points to be actually inserted in the map.
Definition at line 699 of file CPointsMap.h.
| float mrpt::slam::CPointsMap::getLargestDistanceFromOrigin | ( | ) | const [inherited] |
This method returns the largest distance from the origin to any of the points, such as a sphere centered at the origin with this radius cover ALL the points in the map (the results are buffered, such as, if the map is not modified, the second call will be much faster than the first one).
| float mrpt::slam::CPointsMap::getLargestDistanceFromOriginNoRecompute | ( | bool & | output_is_valid | ) | const [inline, inherited] |
Like getLargestDistanceFromOrigin() but returns in output_is_valid = false if the distance was not already computed, skipping its computation then, unlike getLargestDistanceFromOrigin()
Definition at line 665 of file CPointsMap.h.
| std::string mrpt::utils::PLY_Importer::getLoadPLYErrorString | ( | ) | const [inline, inherited] |
Return a description of the error if loadFromPlyFile() returned false, or an empty string if the file was loaded without problems.
Definition at line 60 of file PLY_import_export.h.
| void mrpt::slam::CPointsMap::getPCLPointCloud | ( | POINTCLOUD & | cloud | ) | const [inline, inherited] |
Use to convert this MRPT point cloud object into a PCL point cloud object.
Usage example:
mrpt::slam::CPointsCloud pc;
pcl::PointCloud<pcl::PointXYZ> cloud;
pc.getPCLPointCloud(cloud);
Definition at line 733 of file CPointsMap.h.
References mrpt::math::size(), and Eigen::internal::y.
| unsigned long mrpt::slam::CPointsMap::getPoint | ( | size_t | index, |
| float & | x, | ||
| float & | y, | ||
| float & | z | ||
| ) | const [inherited] |
Access to a given point from map, as a 2D point.
First index is 0.
| Throws | std::exception on index out of bound. |
Reimplemented in mrpt::slam::CColouredPointsMap.
| unsigned long mrpt::slam::CPointsMap::getPoint | ( | size_t | index, |
| float & | x, | ||
| float & | y | ||
| ) | const [inherited] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| unsigned long mrpt::slam::CPointsMap::getPoint | ( | size_t | index, |
| double & | x, | ||
| double & | y, | ||
| double & | z | ||
| ) | const [inherited] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| unsigned long mrpt::slam::CPointsMap::getPoint | ( | size_t | index, |
| double & | x, | ||
| double & | y | ||
| ) | const [inherited] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| unsigned long mrpt::slam::CPointsMap::getPoint | ( | size_t | index, |
| CPoint2D & | p | ||
| ) | const [inline, inherited] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 325 of file CPointsMap.h.
References mrpt::slam::CPointsMap::getPoint().
Referenced by mrpt::slam::CPointsMap::getPoint().
| unsigned long mrpt::slam::CPointsMap::getPoint | ( | size_t | index, |
| CPoint3D & | p | ||
| ) | const [inline, inherited] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 327 of file CPointsMap.h.
References mrpt::slam::CPointsMap::getPoint().
Referenced by mrpt::slam::CPointsMap::getPoint().
| unsigned long mrpt::slam::CPointsMap::getPoint | ( | size_t | index, |
| mrpt::math::TPoint2D & | p | ||
| ) | const [inline, inherited] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 329 of file CPointsMap.h.
References mrpt::slam::CPointsMap::getPoint(), mrpt::math::TPoint2D::x, and mrpt::math::TPoint2D::y.
Referenced by mrpt::slam::CPointsMap::getPoint().
| unsigned long mrpt::slam::CPointsMap::getPoint | ( | size_t | index, |
| mrpt::math::TPoint3D & | p | ||
| ) | const [inline, inherited] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 331 of file CPointsMap.h.
References mrpt::slam::CPointsMap::getPoint(), mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
Referenced by mrpt::slam::CPointsMap::getPoint().
| virtual void mrpt::slam::CPointsMap::getPoint | ( | size_t | index, |
| float & | x, | ||
| float & | y, | ||
| float & | z, | ||
| float & | R, | ||
| float & | G, | ||
| float & | B | ||
| ) | const [inline, virtual, inherited] |
Access to a given point from map, and its colors, if the map defines them (othersise, R=G=B=1.0).
First index is 0.
| Throws | std::exception on index out of bound. |
Reimplemented in mrpt::slam::CColouredPointsMap.
Definition at line 337 of file CPointsMap.h.
| void mrpt::slam::CPointsMap::getPointAllFields | ( | const size_t | index, |
| std::vector< float > & | point_data | ||
| ) | const [inline, inherited] |
Get all the data fields for one point as a vector: depending on the implementation class this can be [X Y Z] or [X Y Z R G B], etc...
Definition at line 475 of file CPointsMap.h.
References ASSERT_BELOW_, and mrpt::math::size().
| virtual void mrpt::slam::CSimplePointsMap::getPointAllFieldsFast | ( | const size_t | index, |
| std::vector< float > & | point_data | ||
| ) | const [inline, virtual] |
Get all the data fields for one point as a vector: [X Y Z] Unlike getPointAllFields(), this method does not check for index out of bounds.
Implements mrpt::slam::CPointsMap.
Definition at line 99 of file CSimplePointsMap.h.
| void mrpt::slam::CPointsMap::getPointFast | ( | size_t | index, |
| float & | x, | ||
| float & | y, | ||
| float & | z | ||
| ) | const [inline, inherited] |
Just like getPoint() but without checking out-of-bound index and without returning the point weight, just XYZ.
Definition at line 345 of file CPointsMap.h.
| void mrpt::slam::CPointsMap::getPointsBuffer | ( | size_t & | outPointsCount, |
| const float *& | xs, | ||
| const float *& | ys, | ||
| const float *& | zs | ||
| ) | const [inherited] |
Provides a direct access to points buffer, or NULL if there is no points in the map.
| const std::vector<float>& mrpt::slam::CPointsMap::getPointsBufferRef_x | ( | ) | const [inline, inherited] |
Provides a direct access to a read-only reference of the internal point buffer.
Definition at line 378 of file CPointsMap.h.
| const std::vector<float>& mrpt::slam::CPointsMap::getPointsBufferRef_y | ( | ) | const [inline, inherited] |
Provides a direct access to a read-only reference of the internal point buffer.
Definition at line 380 of file CPointsMap.h.
References Eigen::internal::y.
| const std::vector<float>& mrpt::slam::CPointsMap::getPointsBufferRef_z | ( | ) | const [inline, inherited] |
Provides a direct access to a read-only reference of the internal point buffer.
Definition at line 382 of file CPointsMap.h.
| size_t mrpt::slam::CPointsMap::getPointsCount | ( | ) | const [inline, inherited] |
Returns the number of stored points in the map (DEPRECATED, use "size()" instead better)
Definition at line 310 of file CPointsMap.h.
References mrpt::math::size().
| virtual unsigned int mrpt::slam::CPointsMap::getPointWeight | ( | size_t | index | ) | const [inline, virtual, inherited] |
Gets the point weight, which is ignored in all classes (defaults to 1) but in those which actually store that field (Note: No checks are done for out-of-bounds index).
Reimplemented in mrpt::slam::CWeightedPointsMap.
Definition at line 370 of file CPointsMap.h.
| virtual const mrpt::utils::TRuntimeClassId* mrpt::slam::CSimplePointsMap::GetRuntimeClass | ( | ) | const [virtual] |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::slam::CPointsMap.
| std::string mrpt::utils::PLY_Exporter::getSavePLYErrorString | ( | ) | const [inline, inherited] |
Return a description of the error if loadFromPlyFile() returned false, or an empty string if the file was loaded without problems.
Definition at line 106 of file PLY_import_export.h.
| virtual bool mrpt::slam::CPointsMap::hasColorPoints | ( | ) | const [inline, virtual, inherited] |
Returns true if the point map has a color field for each point.
Reimplemented in mrpt::slam::CColouredPointsMap.
Definition at line 348 of file CPointsMap.h.
| bool mrpt::utils::CObservable::hasSubscribers | ( | ) | const [inline, protected, inherited] |
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 69 of file CObservable.h.
| void mrpt::slam::CPointsMap::insertAnotherMap | ( | const CPointsMap * | otherMap, |
| const CPose3D & | otherPose | ||
| ) | [inherited] |
| bool mrpt::slam::CMetricMap::insertObservation | ( | const CObservation * | obs, |
| const CPose3D * | robotPose = NULL |
||
| ) | [inline, 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. |
Definition at line 133 of file CMetricMap.h.
| bool mrpt::slam::CMetricMap::insertObservationPtr | ( | const CObservationPtr & | obs, |
| const CPose3D * | robotPose = NULL |
||
| ) | [inline, inherited] |
A wrapper for smart pointers, just calls the non-smart pointer version.
Definition at line 147 of file CMetricMap.h.
References MRPT_START, THROW_EXCEPTION, mrpt::slam::CObservationPtr::pointer(), and MRPT_END.
| void mrpt::slam::CPointsMap::insertPoint | ( | float | x, |
| float | y, | ||
| float | z = 0 |
||
| ) | [inline, inherited] |
Provides a way to insert (append) individual points into the map: the missing fields of child classes (color, weight, etc) are left to their default values.
Reimplemented in mrpt::slam::CColouredPointsMap.
Definition at line 438 of file CPointsMap.h.
| void mrpt::slam::CPointsMap::insertPoint | ( | const CPoint3D & | p | ) | [inline, inherited] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reimplemented in mrpt::slam::CColouredPointsMap.
Definition at line 440 of file CPointsMap.h.
References mrpt::slam::CPointsMap::insertPoint().
Referenced by mrpt::slam::CPointsMap::insertPoint().
| void mrpt::slam::CPointsMap::insertPoint | ( | const mrpt::math::TPoint3D & | p | ) | [inline, inherited] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reimplemented in mrpt::slam::CColouredPointsMap.
Definition at line 442 of file CPointsMap.h.
References mrpt::slam::CPointsMap::insertPoint(), mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
Referenced by mrpt::slam::CPointsMap::insertPoint().
| virtual void mrpt::slam::CPointsMap::insertPoint | ( | float | x, |
| float | y, | ||
| float | z, | ||
| float | R, | ||
| float | G, | ||
| float | B | ||
| ) | [inline, virtual, inherited] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reimplemented in mrpt::slam::CColouredPointsMap.
Definition at line 444 of file CPointsMap.h.
References mrpt::slam::CPointsMap::insertPoint().
Referenced by mrpt::slam::CPointsMap::insertPoint().
| virtual void mrpt::slam::CSimplePointsMap::insertPointFast | ( | float | x, |
| float | y, | ||
| float | z = 0 |
||
| ) | [virtual] |
The virtual method for insertPoint() *without* calling mark_as_modified()
Implements mrpt::slam::CPointsMap.
| virtual void mrpt::slam::CSimplePointsMap::internal_clear | ( | ) | [protected, virtual] |
Clear the map, erasing all the points.
Implements mrpt::slam::CMetricMap.
| bool mrpt::slam::CPointsMap::internal_insertObservation | ( | const CObservation * | obs, |
| const CPose3D * | robotPose | ||
| ) | [protected, virtual, inherited] |
This is a common version of CMetricMap::insertObservation() for point maps (actually, CMetricMap::internal_insertObservation), so derived classes don't need to worry implementing that method unless something special is really necesary.
See mrpt::slam::CPointsMap for the enumeration of types of observations which are accepted.
Implements mrpt::slam::CMetricMap.
| virtual bool mrpt::slam::CPointsMap::isEmpty | ( | ) | const [virtual, inherited] |
Returns true if the map is empty/no observation has been inserted.
Implements mrpt::slam::CMetricMap.
| bool mrpt::slam::CPointsMap::isFilterByHeightEnabled | ( | ) | const [inline, inherited] |
Return whether filter-by-height is enabled.
Definition at line 694 of file CPointsMap.h.
| float mrpt::slam::CPointsMap::kdtree_distance | ( | const float * | p1, |
| const size_t | idx_p2, | ||
| size_t | size | ||
| ) | const [inline, inherited] |
Returns the distance between the vector "p1[0:size-1]" and the data point with index "idx_p2" stored in the class:
Definition at line 764 of file CPointsMap.h.
References Eigen::internal::y.
| bool mrpt::slam::CPointsMap::kdtree_get_bbox | ( | BBOX & | bb | ) | const [inline, inherited] |
Definition at line 785 of file CPointsMap.h.
| size_t mrpt::slam::CPointsMap::kdtree_get_point_count | ( | ) | const [inline, inherited] |
Must return the number of data points.
Definition at line 754 of file CPointsMap.h.
References mrpt::math::size().
| float mrpt::slam::CPointsMap::kdtree_get_pt | ( | const size_t | idx, |
| int | dim | ||
| ) | const [inline, inherited] |
Returns the dim'th component of the idx'th point in the class:
Definition at line 757 of file CPointsMap.h.
References Eigen::internal::y.
| void mrpt::math::KDTreeCapable::kdtree_mark_as_outdated | ( | ) | const [inline, protected, inherited] |
To be called by child classes when KD tree data changes.
Definition at line 575 of file KDTreeCapable.h.
| size_t mrpt::math::KDTreeCapable::kdTreeClosestPoint2D | ( | float | x0, |
| float | y0, | ||
| float & | out_x, | ||
| float & | out_y, | ||
| float & | out_dist_sqr | ||
| ) | const [inline, inherited] |
KD Tree-based search for the closest point (only ONE) to some given 2D coordinates.
This method automatically build the "m_kdtree_data" structure when:
| x0 | The X coordinate of the query. |
| y0 | The Y coordinate of the query. |
| out_x | The X coordinate of the found closest correspondence. |
| out_y | The Y coordinate of the found closest correspondence. |
| out_dist_sqr | The square distance between the query and the returned point. |
Definition at line 136 of file KDTreeCapable.h.
| size_t mrpt::math::KDTreeCapable::kdTreeClosestPoint2D | ( | float | x0, |
| float | y0, | ||
| float & | out_dist_sqr | ||
| ) | const [inline, inherited] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 166 of file KDTreeCapable.h.
| size_t mrpt::math::KDTreeCapable::kdTreeClosestPoint2D | ( | const TPoint2D & | p0, |
| TPoint2D & | pOut, | ||
| float & | outDistSqr | ||
| ) | const [inline, inherited] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 189 of file KDTreeCapable.h.
| float mrpt::math::KDTreeCapable::kdTreeClosestPoint2DsqrError | ( | float | x0, |
| float | y0 | ||
| ) | const [inline, inherited] |
Like kdTreeClosestPoint2D, but just return the square error from some point to its closest neighbor.
Definition at line 199 of file KDTreeCapable.h.
| float mrpt::math::KDTreeCapable::kdTreeClosestPoint2DsqrError | ( | const TPoint2D & | p0 | ) | const [inline, inherited] |
Definition at line 208 of file KDTreeCapable.h.
| size_t mrpt::math::KDTreeCapable::kdTreeClosestPoint3D | ( | float | x0, |
| float | y0, | ||
| float | z0, | ||
| float & | out_x, | ||
| float & | out_y, | ||
| float & | out_z, | ||
| float & | out_dist_sqr | ||
| ) | const [inline, inherited] |
KD Tree-based search for the closest point (only ONE) to some given 3D coordinates.
This method automatically build the "m_kdtree_data" structure when:
| x0 | The X coordinate of the query. |
| y0 | The Y coordinate of the query. |
| z0 | The Z coordinate of the query. |
| out_x | The X coordinate of the found closest correspondence. |
| out_y | The Y coordinate of the found closest correspondence. |
| out_z | The Z coordinate of the found closest correspondence. |
| out_dist_sqr | The square distance between the query and the returned point. |
Definition at line 394 of file KDTreeCapable.h.
| size_t mrpt::math::KDTreeCapable::kdTreeClosestPoint3D | ( | float | x0, |
| float | y0, | ||
| float | z0, | ||
| float & | out_dist_sqr | ||
| ) | const [inline, inherited] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 428 of file KDTreeCapable.h.
| size_t mrpt::math::KDTreeCapable::kdTreeClosestPoint3D | ( | const TPoint3D & | p0, |
| TPoint3D & | pOut, | ||
| float & | outDistSqr | ||
| ) | const [inline, inherited] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 454 of file KDTreeCapable.h.
| std::vector<int> mrpt::math::KDTreeCapable::kdTreeNClosestPoint2D | ( | float | x0, |
| float | y0, | ||
| size_t | knn, | ||
| std::vector< float > & | out_x, | ||
| std::vector< float > & | out_y, | ||
| std::vector< float > & | out_dist_sqr | ||
| ) | const [inline, inherited] |
KD Tree-based search for the N closest point to some given 2D coordinates.
This method automatically build the "m_kdtree_data" structure when:
| x0 | The X coordinate of the query. |
| y0 | The Y coordinate of the query. |
| N | The number of closest points to search. |
| out_x | The vector containing the X coordinates of the correspondences. |
| out_y | The vector containing the Y coordinates of the correspondences. |
| out_dist_sqr | The vector containing the square distance between the query and the returned points. |
Definition at line 293 of file KDTreeCapable.h.
| std::vector<int> mrpt::math::KDTreeCapable::kdTreeNClosestPoint2D | ( | const TPoint2D & | p0, |
| size_t | N, | ||
| std::vector< TPoint2D > & | pOut, | ||
| std::vector< float > & | outDistSqr | ||
| ) | const [inline, inherited] |
Definition at line 326 of file KDTreeCapable.h.
| void mrpt::math::KDTreeCapable::kdTreeNClosestPoint2DIdx | ( | float | x0, |
| float | y0, | ||
| size_t | knn, | ||
| std::vector< int > & | out_idx, | ||
| std::vector< float > & | out_dist_sqr | ||
| ) | const [inline, inherited] |
KD Tree-based search for the N closest point to some given 2D coordinates and returns their indexes.
This method automatically build the "m_kdtree_data" structure when:
| x0 | The X coordinate of the query. |
| y0 | The Y coordinate of the query. |
| N | The number of closest points to search. |
| out_idx | The indexes of the found closest correspondence. |
| out_dist_sqr | The square distance between the query and the returned point. |
Definition at line 351 of file KDTreeCapable.h.
| void mrpt::math::KDTreeCapable::kdTreeNClosestPoint2DIdx | ( | const TPoint2D & | p0, |
| size_t | N, | ||
| std::vector< int > & | outIdx, | ||
| std::vector< float > & | outDistSqr | ||
| ) | const [inline, inherited] |
Definition at line 373 of file KDTreeCapable.h.
| void mrpt::math::KDTreeCapable::kdTreeNClosestPoint3D | ( | float | x0, |
| float | y0, | ||
| float | z0, | ||
| size_t | knn, | ||
| std::vector< float > & | out_x, | ||
| std::vector< float > & | out_y, | ||
| std::vector< float > & | out_z, | ||
| std::vector< float > & | out_dist_sqr | ||
| ) | const [inline, inherited] |
KD Tree-based search for the N closest points to some given 3D coordinates.
This method automatically build the "m_kdtree_data" structure when:
| x0 | The X coordinate of the query. |
| y0 | The Y coordinate of the query. |
| z0 | The Z coordinate of the query. |
| N | The number of closest points to search. |
| out_x | The vector containing the X coordinates of the correspondences. |
| out_y | The vector containing the Y coordinates of the correspondences. |
| out_z | The vector containing the Z coordinates of the correspondences. |
| out_dist_sqr | The vector containing the square distance between the query and the returned points. |
Definition at line 480 of file KDTreeCapable.h.
| void mrpt::math::KDTreeCapable::kdTreeNClosestPoint3D | ( | const TPoint3D & | p0, |
| size_t | N, | ||
| std::vector< TPoint3D > & | pOut, | ||
| std::vector< float > & | outDistSqr | ||
| ) | const [inline, inherited] |
Definition at line 517 of file KDTreeCapable.h.
| void mrpt::math::KDTreeCapable::kdTreeNClosestPoint3DIdx | ( | float | x0, |
| float | y0, | ||
| float | z0, | ||
| size_t | knn, | ||
| std::vector< int > & | out_idx, | ||
| std::vector< float > & | out_dist_sqr | ||
| ) | const [inline, inherited] |
KD Tree-based search for the N closest point to some given 3D coordinates and returns their indexes.
This method automatically build the "m_kdtree_data" structure when:
| x0 | The X coordinate of the query. |
| y0 | The Y coordinate of the query. |
| z0 | The Z coordinate of the query. |
| N | The number of closest points to search. |
| out_idx | The indexes of the found closest correspondence. |
| out_dist_sqr | The square distance between the query and the returned point. |
Definition at line 543 of file KDTreeCapable.h.
| void mrpt::math::KDTreeCapable::kdTreeNClosestPoint3DIdx | ( | const TPoint3D & | p0, |
| size_t | N, | ||
| std::vector< int > & | outIdx, | ||
| std::vector< float > & | outDistSqr | ||
| ) | const [inline, inherited] |
Definition at line 567 of file KDTreeCapable.h.
| void mrpt::math::KDTreeCapable::kdTreeTwoClosestPoint2D | ( | float | x0, |
| float | y0, | ||
| float & | out_x1, | ||
| float & | out_y1, | ||
| float & | out_x2, | ||
| float & | out_y2, | ||
| float & | out_dist_sqr1, | ||
| float & | out_dist_sqr2 | ||
| ) | const [inline, inherited] |
KD Tree-based search for the TWO closest point to some given 2D coordinates.
This method automatically build the "m_kdtree_data" structure when:
| x0 | The X coordinate of the query. |
| y0 | The Y coordinate of the query. |
| out_x1 | The X coordinate of the first correspondence. |
| out_y1 | The Y coordinate of the first correspondence. |
| out_x2 | The X coordinate of the second correspondence. |
| out_y2 | The Y coordinate of the second correspondence. |
| out_dist_sqr1 | The square distance between the query and the first returned point. |
| out_dist_sqr2 | The square distance between the query and the second returned point. |
Definition at line 229 of file KDTreeCapable.h.
| void mrpt::math::KDTreeCapable::kdTreeTwoClosestPoint2D | ( | const TPoint2D & | p0, |
| TPoint2D & | pOut1, | ||
| TPoint2D & | pOut2, | ||
| float & | outDistSqr1, | ||
| float & | outDistSqr2 | ||
| ) | const [inline, inherited] |
Definition at line 266 of file KDTreeCapable.h.
| bool mrpt::slam::CPointsMap::load2D_from_text_file | ( | const std::string & | file | ) | [inline, inherited] |
Load from a text file.
Each line should contain an "X Y" coordinate pair, separated by whitespaces. Returns false if any error occured, true elsewere.
Definition at line 268 of file CPointsMap.h.
| bool mrpt::slam::CPointsMap::load2Dor3D_from_text_file | ( | const std::string & | file, |
| const bool | is_3D | ||
| ) | [inherited] |
2D or 3D generic implementation of load2D_from_text_file and load3D_from_text_file
| bool mrpt::slam::CPointsMap::load3D_from_text_file | ( | const std::string & | file | ) | [inline, inherited] |
Load from a text file.
Each line should contain an "X Y Z" coordinate tuple, separated by whitespaces. Returns false if any error occured, true elsewere.
Definition at line 273 of file CPointsMap.h.
| bool mrpt::utils::PLY_Importer::loadFromPlyFile | ( | const std::string & | filename, |
| CStringList * | file_comments = NULL, |
||
| CStringList * | file_obj_info = NULL |
||
| ) | [inherited] |
Loads from a PLY file.
| [in] | filename | The filename to open. It can be either in binary or text format. |
| [out] | file_comments | If provided (!=NULL) the list of comment strings stored in the file will be returned. |
| [out] | file_obj_info | If provided (!=NULL) the list of "object info" strings stored in the file will be returned. |
| void mrpt::slam::CMetricMap::loadFromProbabilisticPosesAndObservations | ( | const CSimpleMap & | Map | ) | [inherited] |
Load the map contents from a CSimpleMap object, erasing all previous content of the map.
This is automaticed invoking "insertObservation" for each observation at the mean 3D robot pose as given by the "poses::CPosePDF" in the CSimpleMap object.
| std::exception | Some internal steps in invoked methods can raise exceptions on invalid parameters, etc... |
| virtual void mrpt::slam::CSimplePointsMap::loadFromRangeScan | ( | const CObservation2DRangeScan & | rangeScan, |
| const CPose3D * | robotPose = NULL |
||
| ) | [virtual] |
See CPointsMap::loadFromRangeScan()
Implements mrpt::slam::CPointsMap.
| virtual void mrpt::slam::CSimplePointsMap::loadFromRangeScan | ( | const CObservation3DRangeScan & | rangeScan, |
| const CPose3D * | robotPose = NULL |
||
| ) | [virtual] |
See CPointsMap::loadFromRangeScan()
Implements mrpt::slam::CPointsMap.
| void mrpt::slam::CMetricMap::loadFromSimpleMap | ( | const CSimpleMap & | Map | ) | [inline, 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... |
Definition at line 124 of file CMetricMap.h.
| void mrpt::slam::CPointsMap::mark_as_modified | ( | ) | const [inline, protected, inherited] |
Called only by this class or children classes, set m_largestDistanceFromOriginIsUpdated=false and such.
Definition at line 821 of file CPointsMap.h.
| void mrpt::slam::CPointsMap::operator+= | ( | const CPointsMap & | anotherMap | ) | [inline, inherited] |
This operator is synonymous with addFrom.
Definition at line 247 of file CPointsMap.h.
| virtual size_t mrpt::slam::CPointsMap::PLY_export_get_face_count | ( | ) | const [inline, protected, virtual, inherited] |
In a base class, return the number of faces.
Implements mrpt::utils::PLY_Exporter.
Definition at line 858 of file CPointsMap.h.
| virtual void mrpt::slam::CPointsMap::PLY_export_get_vertex | ( | const size_t | idx, |
| mrpt::math::TPoint3Df & | pt, | ||
| bool & | pt_has_color, | ||
| mrpt::utils::TColorf & | pt_color | ||
| ) | const [protected, virtual, inherited] |
In a base class, will be called after PLY_export_get_vertex_count() once for each exported point.
| pt_color | Will be NULL if the loaded file does not provide color info. |
Implements mrpt::utils::PLY_Exporter.
Reimplemented in mrpt::slam::CColouredPointsMap.
| virtual size_t mrpt::slam::CPointsMap::PLY_export_get_vertex_count | ( | ) | const [protected, virtual, inherited] |
In a base class, return the number of vertices.
Implements mrpt::utils::PLY_Exporter.
| virtual void mrpt::slam::CPointsMap::PLY_import_set_face_count | ( | const size_t | N | ) | [inline, protected, virtual, inherited] |
In a base class, reserve memory to prepare subsequent calls to PLY_import_set_face.
Implements mrpt::utils::PLY_Importer.
Definition at line 843 of file CPointsMap.h.
| virtual void mrpt::slam::CPointsMap::PLY_import_set_vertex | ( | const size_t | idx, |
| const mrpt::math::TPoint3Df & | pt, | ||
| const mrpt::utils::TColorf * | pt_color = NULL |
||
| ) | [protected, virtual, inherited] |
In a base class, will be called after PLY_import_set_vertex_count() once for each loaded point.
| pt_color | Will be NULL if the loaded file does not provide color info. |
Implements mrpt::utils::PLY_Importer.
Reimplemented in mrpt::slam::CColouredPointsMap.
| virtual void mrpt::slam::CSimplePointsMap::PLY_import_set_vertex_count | ( | const size_t | N | ) | [protected, virtual] |
In a base class, reserve memory to prepare subsequent calls to PLY_import_set_vertex.
Implements mrpt::utils::PLY_Importer.
| void mrpt::utils::CObservable::publishEvent | ( | const mrptEvent & | e | ) | const [protected, inherited] |
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 | ||
| ) | [protected, pure virtual, inherited] |
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::math::CMatrixD, and mrpt::math::CMatrix.
| virtual void mrpt::slam::CSimplePointsMap::reserve | ( | size_t | newLength | ) | [virtual] |
Reserves memory for a given number of points: the size of the map does not change, it only reserves the memory.
This is useful for situations where it is approximately known the final size of the map. This method is more efficient than constantly increasing the size of the buffers. Refer to the STL C++ library's "reserve" methods.
Implements mrpt::slam::CPointsMap.
| virtual void mrpt::slam::CSimplePointsMap::resize | ( | size_t | newLength | ) | [virtual] |
Resizes all point buffers so they can hold the given number of points: newly created points are set to default values, and old contents are not changed.
Implements mrpt::slam::CPointsMap.
| bool mrpt::slam::CPointsMap::save2D_to_text_file | ( | const std::string & | file | ) | const [inherited] |
Save to a text file.
Each line will contain "X Y" point coordinates. Returns false if any error occured, true elsewere.
| bool mrpt::slam::CPointsMap::save3D_to_text_file | ( | const std::string & | file | ) | const [inherited] |
Save to a text file.
Each line will contain "X Y Z" point coordinates. Returns false if any error occured, true elsewere.
| void mrpt::slam::CPointsMap::saveMetricMapRepresentationToFile | ( | const std::string & | filNamePrefix | ) | const [inline, virtual, inherited] |
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 290 of file CPointsMap.h.
| virtual bool mrpt::slam::CPointsMap::savePCDFile | ( | const std::string & | filename, |
| bool | save_as_binary | ||
| ) | const [virtual, inherited] |
Save the point cloud as a PCL PCD file, in either ASCII or binary format (requires MRPT built against PCL)
Reimplemented in mrpt::slam::CColouredPointsMap.
| bool mrpt::utils::PLY_Exporter::saveToPlyFile | ( | const std::string & | filename, |
| bool | save_in_binary = false, |
||
| const CStringList & | file_comments = CStringList(), |
||
| const CStringList & | file_obj_info = CStringList() |
||
| ) | const [inherited] |
Saves to a PLY file.
| [in] | filename | The filename to be saved. |
| [in] | file_comments | If provided (!=NULL) the list of comment strings stored in the file will be returned. |
| [in] | file_obj_info | If provided (!=NULL) the list of "object info" strings stored in the file will be returned. |
| void mrpt::slam::CPointsMap::setAllPoints | ( | const std::vector< float > & | X, |
| const std::vector< float > & | Y, | ||
| const std::vector< float > & | Z | ||
| ) | [inline, inherited] |
Set all the points at once from vectors with X,Y and Z coordinates.
Definition at line 463 of file CPointsMap.h.
| void mrpt::slam::CPointsMap::setAllPoints | ( | const std::vector< float > & | X, |
| const std::vector< float > & | Y | ||
| ) | [inline, inherited] |
Set all the points at once from vectors with X and Y coordinates (Z=0).
Definition at line 468 of file CPointsMap.h.
| void mrpt::slam::CPointsMap::setAllPointsTemplate | ( | const VECTOR & | X, |
| const VECTOR & | Y, | ||
| const VECTOR & | Z = VECTOR() |
||
| ) | [inline, inherited] |
Set all the points at once from vectors with X,Y and Z coordinates (if Z is not provided, it will be set to all zeros).
| VECTOR | can be mrpt::vector_float or std::vector<float> or any other column or row Eigen::Matrix. |
Definition at line 450 of file CPointsMap.h.
References ASSERT_EQUAL_, ASSERT_, and setSize().
| void mrpt::slam::CPointsMap::setHeightFilterLevels | ( | const double | _z_min, |
| const double | _z_max | ||
| ) | [inline, inherited] |
Set the min/max Z levels for points to be actually inserted in the map (only if enableFilterByHeight() was called before).
Definition at line 697 of file CPointsMap.h.
| void mrpt::slam::CPointsMap::setPoint | ( | size_t | index, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) | [inline, inherited] |
Changes a given point from map, with Z defaulting to 0 if not provided.
| Throws | std::exception on index out of bound. |
Reimplemented in mrpt::slam::CColouredPointsMap.
Definition at line 353 of file CPointsMap.h.
References ASSERT_BELOW_, and mrpt::math::size().
| void mrpt::slam::CPointsMap::setPoint | ( | size_t | index, |
| CPoint2D & | p | ||
| ) | [inline, inherited] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reimplemented in mrpt::slam::CColouredPointsMap.
Definition at line 359 of file CPointsMap.h.
References mrpt::slam::CPointsMap::setPoint().
Referenced by mrpt::slam::CPointsMap::setPoint().
| void mrpt::slam::CPointsMap::setPoint | ( | size_t | index, |
| CPoint3D & | p | ||
| ) | [inline, inherited] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reimplemented in mrpt::slam::CColouredPointsMap.
Definition at line 361 of file CPointsMap.h.
References mrpt::slam::CPointsMap::setPoint().
Referenced by mrpt::slam::CPointsMap::setPoint().
| void mrpt::slam::CPointsMap::setPoint | ( | size_t | index, |
| float | x, | ||
| float | y | ||
| ) | [inline, inherited] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reimplemented in mrpt::slam::CColouredPointsMap.
Definition at line 363 of file CPointsMap.h.
References mrpt::slam::CPointsMap::setPoint().
Referenced by mrpt::slam::CPointsMap::setPoint().
| virtual void mrpt::slam::CPointsMap::setPoint | ( | size_t | index, |
| float | x, | ||
| float | y, | ||
| float | z, | ||
| float | R, | ||
| float | G, | ||
| float | B | ||
| ) | [inline, virtual, inherited] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reimplemented in mrpt::slam::CColouredPointsMap.
Definition at line 365 of file CPointsMap.h.
References mrpt::slam::CPointsMap::setPoint().
Referenced by mrpt::slam::CPointsMap::setPoint().
| void mrpt::slam::CPointsMap::setPointAllFields | ( | const size_t | index, |
| const std::vector< float > & | point_data | ||
| ) | [inline, inherited] |
Set all the data fields for one point as a vector: depending on the implementation class this can be [X Y Z] or [X Y Z R G B], etc...
Unlike setPointAllFields(), this method does not check for index out of bounds
Definition at line 484 of file CPointsMap.h.
References ASSERT_BELOW_, and mrpt::math::size().
| virtual void mrpt::slam::CSimplePointsMap::setPointAllFieldsFast | ( | const size_t | index, |
| const std::vector< float > & | point_data | ||
| ) | [inline, virtual] |
Set all the data fields for one point as a vector: [X Y Z] Unlike setPointAllFields(), this method does not check for index out of bounds.
Implements mrpt::slam::CPointsMap.
Definition at line 110 of file CSimplePointsMap.h.
References ASSERTDEB_, and Eigen::internal::y.
| virtual void mrpt::slam::CSimplePointsMap::setPointFast | ( | size_t | index, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) | [virtual] |
Changes the coordinates of the given point (0-based index), *without* checking for out-of-bounds and *without* calling mark_as_modified()
Implements mrpt::slam::CPointsMap.
| virtual void mrpt::slam::CPointsMap::setPointWeight | ( | size_t | index, |
| unsigned long | w | ||
| ) | [inline, virtual, inherited] |
Sets the point weight, which is ignored in all classes but those which actually store that field (Note: No checks are done for out-of-bounds index).
Reimplemented in mrpt::slam::CWeightedPointsMap.
Definition at line 368 of file CPointsMap.h.
| virtual void mrpt::slam::CSimplePointsMap::setSize | ( | size_t | newLength | ) | [virtual] |
Resizes all point buffers so they can hold the given number of points, *erasing* all previous contents and leaving all points to default values.
Implements mrpt::slam::CPointsMap.
| size_t mrpt::slam::CPointsMap::size | ( | ) | const [inline, inherited] |
Returns the number of stored points in the map.
Definition at line 306 of file CPointsMap.h.
| virtual float mrpt::slam::CPointsMap::squareDistanceToClosestCorrespondence | ( | float | x0, |
| float | y0 | ||
| ) | const [virtual, inherited] |
Returns the square distance from the 2D point (x0,y0) to the closest correspondence in the map.
| virtual float mrpt::slam::CMetricMap::squareDistanceToClosestCorrespondence | ( | const float & | x0, |
| const float & | y0 | ||
| ) | const [inline, virtual, inherited] |
Returns the square distance from the 2D point (x0,y0) to the closest correspondence in the map.
Definition at line 333 of file CMetricMap.h.
References MRPT_START, THROW_EXCEPTION, and MRPT_END.
| float mrpt::slam::CPointsMap::squareDistanceToClosestCorrespondenceT | ( | const TPoint2D & | p0 | ) | const [inline, inherited] |
Definition at line 175 of file CPointsMap.h.
References mrpt::math::TPoint2D::x, and mrpt::math::TPoint2D::y.
| virtual void mrpt::utils::CSerializable::writeToStream | ( | mrpt::utils::CStream & | out, |
| int * | getVersion | ||
| ) | const [protected, pure virtual, inherited] |
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::math::CMatrixD, and mrpt::math::CMatrix.
friend struct detail::loadFromRangeImpl [friend] |
Reimplemented from mrpt::slam::CPointsMap.
Definition at line 136 of file CSimplePointsMap.h.
friend struct detail::pointmap_traits [friend] |
Reimplemented from mrpt::slam::CPointsMap.
Definition at line 137 of file CSimplePointsMap.h.
friend class mrpt::utils::CStream [friend, inherited] |
Reimplemented from mrpt::slam::CMetricMap.
Definition at line 84 of file CPointsMap.h.
mrpt::utils::CLASSINIT mrpt::slam::CSimplePointsMap::_init_CSimplePointsMap [static, protected] |
Definition at line 57 of file CSimplePointsMap.h.
const mrpt::utils::TRuntimeClassId mrpt::slam::CMetricMap::classCMetricMap [static, inherited] |
Definition at line 81 of file CMetricMap.h.
const mrpt::utils::TRuntimeClassId mrpt::utils::CObject::classCObject [static, inherited] |
const mrpt::utils::TRuntimeClassId mrpt::slam::CPointsMap::classCPointsMap [static, inherited] |
Definition at line 84 of file CPointsMap.h.
const mrpt::utils::TRuntimeClassId mrpt::utils::CSerializable::classCSerializable [static, inherited] |
Definition at line 56 of file CSerializable.h.
Definition at line 57 of file CSimplePointsMap.h.
const mrpt::utils::TRuntimeClassId* mrpt::slam::CSimplePointsMap::classinfo [static] |
Definition at line 57 of file CSimplePointsMap.h.
float mrpt::slam::CPointsMap::COLOR_3DSCENE_B [static, inherited] |
Definition at line 706 of file CPointsMap.h.
float mrpt::slam::CPointsMap::COLOR_3DSCENE_G [static, inherited] |
Definition at line 705 of file CPointsMap.h.
float mrpt::slam::CPointsMap::COLOR_3DSCENE_R [static, inherited] |
The color [0,1] of points when extracted from getAs3DObject (default=blue)
Definition at line 704 of file CPointsMap.h.
The options used when inserting observations in the map.
Definition at line 203 of file CPointsMap.h.
TKDTreeSearchParams mrpt::math::KDTreeCapable::kdtree_search_params [inherited] |
Parameters to tune the ANN searches.
Definition at line 116 of file KDTreeCapable.h.
Definition at line 231 of file CPointsMap.h.
float mrpt::slam::CPointsMap::m_bb_max_x [mutable, protected, inherited] |
Definition at line 817 of file CPointsMap.h.
float mrpt::slam::CPointsMap::m_bb_max_y [mutable, protected, inherited] |
Definition at line 817 of file CPointsMap.h.
float mrpt::slam::CPointsMap::m_bb_max_z [mutable, protected, inherited] |
Definition at line 817 of file CPointsMap.h.
float mrpt::slam::CPointsMap::m_bb_min_x [mutable, protected, inherited] |
Definition at line 817 of file CPointsMap.h.
float mrpt::slam::CPointsMap::m_bb_min_y [mutable, protected, inherited] |
Definition at line 817 of file CPointsMap.h.
float mrpt::slam::CPointsMap::m_bb_min_z [mutable, protected, inherited] |
Definition at line 817 of file CPointsMap.h.
bool mrpt::slam::CPointsMap::m_boundingBoxIsUpdated [mutable, protected, inherited] |
Definition at line 816 of file CPointsMap.h.
bool mrpt::slam::CMetricMap::m_disableSaveAs3DObject [inherited] |
When set to true (default=false), calling "getAs3DObject" will have no effects.
Definition at line 321 of file CMetricMap.h.
bool mrpt::slam::CPointsMap::m_heightfilter_enabled [protected, inherited] |
Whether or not (default=not) filter the input points by height.
Definition at line 877 of file CPointsMap.h.
double mrpt::slam::CPointsMap::m_heightfilter_z_max [protected, inherited] |
Definition at line 873 of file CPointsMap.h.
double mrpt::slam::CPointsMap::m_heightfilter_z_min [protected, inherited] |
The minimum and maximum height for a certain laser scan to be inserted into this map.
Definition at line 873 of file CPointsMap.h.
float mrpt::slam::CPointsMap::m_largestDistanceFromOrigin [mutable, protected, inherited] |
Auxiliary variables used in "getLargestDistanceFromOrigin".
Definition at line 809 of file CPointsMap.h.
bool mrpt::slam::CPointsMap::m_largestDistanceFromOriginIsUpdated [mutable, protected, inherited] |
Auxiliary variables used in "getLargestDistanceFromOrigin".
Definition at line 814 of file CPointsMap.h.
CSinCosLookUpTableFor2DScans mrpt::slam::CPointsMap::m_scans_sincos_cache [protected, inherited] |
Cache of sin/cos values for the latest 2D scan geometries.
Definition at line 804 of file CPointsMap.h.
std::vector<float> mrpt::slam::CPointsMap::x [protected, inherited] |
Definition at line 802 of file CPointsMap.h.
std::vector<float> mrpt::slam::CPointsMap::y [protected, inherited] |
Definition at line 802 of file CPointsMap.h.
std::vector<float> mrpt::slam::CPointsMap::z [protected, inherited] |
The point coordinates.
Definition at line 802 of file CPointsMap.h.
| Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011 |