MRPT  1.9.9
mrpt::maps::CPointsMap Class Referenceabstract

Detailed Description

A cloud of points in 2D or 3D, which can be built from a sequence of laser scans or other sensors.

This is a virtual class, thus only a derived class can be instantiated by the user. The user most usually wants to use CSimplePointsMap.

This class implements generic version of mrpt::maps::CMetric::insertObservation() accepting these types of sensory data:

Loading and saving in the standard LAS LiDAR point cloud format is supported by installing libLAS and including the header <mrpt/maps/CPointsMaps_liblas.h> in your program. Since MRPT 1.5.0 there is no need to build MRPT against libLAS to use this feature. See LAS functions in libLAS interface for CPointsMap (in.

See also
CMetricMap, CPoint, CSerializable

Definition at line 65 of file CPointsMap.h.

#include <mrpt/maps/CPointsMap.h>

Inheritance diagram for mrpt::maps::CPointsMap:

Classes

struct  TInsertionOptions
 With this struct options are provided to the observation insertion process. More...
 
struct  TLaserRange2DInsertContext
 Helper struct used for internal_loadFromRangeScan2D_prepareOneRange() More...
 
struct  TLaserRange3DInsertContext
 Helper struct used for internal_loadFromRangeScan3D_prepareOneRange() More...
 
struct  TLikelihoodOptions
 Options used when evaluating "computeObservationLikelihood" in the derived classes. More...
 
struct  TRenderOptions
 Rendering options, used in getAs3DObject() More...
 

Public Types

using UniquePtr = std::unique_ptr< CObject >
 
using ConstUniquePtr = std::unique_ptr< const CObject >
 
using self_t = KDTreeCapable< CPointsMap, float, nanoflann::L2_Simple_Adaptor< float, CPointsMap > >
 

Public Member Functions

 CPointsMap ()
 Ctor. More...
 
 ~CPointsMap () override
 Virtual destructor. More...
 
CPointsMapoperator= (const CPointsMap &o)
 
float squareDistanceToClosestCorrespondence (float x0, float y0) const override
 Returns the square distance from the 2D point (x0,y0) to the closest correspondence in the map. More...
 
float squareDistanceToClosestCorrespondenceT (const mrpt::math::TPoint2D &p0) const
 
virtual void addFrom (const CPointsMap &anotherMap)
 Adds all the points from anotherMap to this map, without fusing. More...
 
void operator+= (const CPointsMap &anotherMap)
 This operator is synonymous with addFrom. More...
 
void insertAnotherMap (const CPointsMap *otherMap, const mrpt::poses::CPose3D &otherPose)
 Insert the contents of another map into this one with some geometric transformation, without fusing close points. More...
 
size_t size () const
 Returns the number of stored points in the map. More...
 
void getPoint (size_t index, float &x, float &y, float &z) const
 Access to a given point from map, as a 2D point. More...
 
void getPoint (size_t index, float &x, float &y) const
 
void getPoint (size_t index, double &x, double &y, double &z) const
 
void getPoint (size_t index, double &x, double &y) const
 
void getPoint (size_t index, mrpt::math::TPoint2D &p) const
 
void getPoint (size_t index, mrpt::math::TPoint3D &p) const
 
virtual void getPointRGB (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). More...
 
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. More...
 
virtual bool hasColorPoints () const
 Returns true if the point map has a color field for each point. More...
 
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. More...
 
void setPoint (size_t index, const mrpt::math::TPoint2D &p)
 
void setPoint (size_t index, const mrpt::math::TPoint3D &p)
 
void setPoint (size_t index, float x, float y)
 
virtual void setPointRGB (size_t index, float x, float y, float z, float R, float G, float B)
 overload (RGB data is ignored in classes without color information) More...
 
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). More...
 
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). More...
 
void getPointsBuffer (size_t &outPointsCount, const float *&xs, const float *&ys, const float *&zs) const
 Provides a direct access to points buffer, or nullptr if there is no points in the map. More...
 
const mrpt::aligned_std_vector< float > & getPointsBufferRef_x () const
 Provides a direct access to a read-only reference of the internal point buffer. More...
 
const mrpt::aligned_std_vector< float > & getPointsBufferRef_y () const
 Provides a direct access to a read-only reference of the internal point buffer. More...
 
const mrpt::aligned_std_vector< float > & getPointsBufferRef_z () const
 Provides a direct access to a read-only reference of the internal point buffer. More...
 
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. More...
 
template<class CONTAINER >
void getAllPoints (CONTAINER &ps, size_t decimation=1) const
 Gets all points as a STL-like container. More...
 
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. More...
 
void getAllPoints (std::vector< mrpt::math::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. More...
 
void insertPoint (const mrpt::math::TPoint3D &p)
 
virtual void insertPointRGB (float x, float y, float z, float R, float G, float B)
 overload (RGB data is ignored in classes without color information) More...
 
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). More...
 
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. More...
 
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). More...
 
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... More...
 
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... More...
 
void clipOutOfRangeInZ (float zMin, float zMax)
 Delete points out of the given "z" axis range have been removed. More...
 
void clipOutOfRange (const mrpt::math::TPoint2D &point, float maxRange)
 Delete points which are more far than "maxRange" away from the given "point". More...
 
void applyDeletionMask (const std::vector< bool > &mask)
 Remove from the map the points marked in a bool's array as "true". More...
 
void determineMatching2D (const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::CPose2D &otherMapPose, mrpt::tfest::TMatchingPairList &correspondences, const TMatchingParams &params, TMatchingExtraResults &extraResults) const override
 Computes the matching between this and another 2D point map, which includes finding: More...
 
void determineMatching3D (const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::CPose3D &otherMapPose, mrpt::tfest::TMatchingPairList &correspondences, const TMatchingParams &params, TMatchingExtraResults &extraResults) const override
 Computes the matchings between this and another 3D points map - method used in 3D-ICP. More...
 
float compute3DMatchingRatio (const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::CPose3D &otherMapPose, const TMatchingRatioParams &params) const override
 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...
 
void compute3DDistanceToMesh (const mrpt::maps::CMetricMap *otherMap2, const mrpt::poses::CPose3D &otherMapPose, float maxDistForCorrespondence, mrpt::tfest::TMatchingPairList &correspondences, float &correspondencesRatio)
 Computes the matchings between this and another 3D points map. More...
 
virtual void loadFromRangeScan (const mrpt::obs::CObservation2DRangeScan &rangeScan, const mrpt::poses::CPose3D *robotPose=nullptr)=0
 Transform the range scan into a set of cartessian coordinated points. More...
 
virtual void loadFromRangeScan (const mrpt::obs::CObservation3DRangeScan &rangeScan, const mrpt::poses::CPose3D *robotPose=nullptr)=0
 Overload of loadFromRangeScan() for 3D range scans (for example, Kinect observations). More...
 
void loadFromVelodyneScan (const mrpt::obs::CObservationVelodyneScan &scan, const mrpt::poses::CPose3D *robotPose=nullptr)
 Like loadFromRangeScan() for Velodyne 3D scans. More...
 
void fuseWith (CPointsMap *anotherMap, float minDistForFuse=0.02f, std::vector< bool > *notFusedPoints=nullptr)
 Insert the contents of another map into this one, fusing the previous content with the new one. More...
 
void changeCoordinatesReference (const mrpt::poses::CPose2D &b)
 Replace each point $ p_i $ by $ p'_i = b \oplus p_i $ (pose compounding operator). More...
 
void changeCoordinatesReference (const mrpt::poses::CPose3D &b)
 Replace each point $ p_i $ by $ p'_i = b \oplus p_i $ (pose compounding operator). More...
 
void changeCoordinatesReference (const CPointsMap &other, const mrpt::poses::CPose3D &b)
 Copy all the points from "other" map to "this", replacing each point $ p_i $ by $ p'_i = b \oplus p_i $ (pose compounding operator). More...
 
bool isEmpty () const override
 Returns true if the map is empty/no observation has been inserted. More...
 
bool empty () const
 STL-like method to check whether the map is empty: More...
 
void getAs3DObject (mrpt::opengl::CSetOfObjects::Ptr &outObj) const override
 Returns a 3D object representing the map. More...
 
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). More...
 
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() More...
 
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. More...
 
void boundingBox (mrpt::math::TPoint3D &pMin, mrpt::math::TPoint3D &pMax) const
 
void extractCylinder (const mrpt::math::TPoint2D &center, const double radius, const double zmin, const double zmax, CPointsMap *outMap)
 Extracts the points in the map within a cylinder in 3D defined the provided radius and zmin/zmax values. More...
 
void extractPoints (const mrpt::math::TPoint3D &corner1, const mrpt::math::TPoint3D &corner2, CPointsMap *outMap, const double &R=1, const double &G=1, const double &B=1)
 Extracts the points in the map within the area defined by two corners. More...
 
double internal_computeObservationLikelihood (const mrpt::obs::CObservation &obs, const mrpt::poses::CPose3D &takenFrom) override
 Internal method called by computeObservationLikelihood() More...
 
double internal_computeObservationLikelihoodPointCloud3D (const mrpt::poses::CPose3D &pc_in_map, const float *xs, const float *ys, const float *zs, const std::size_t num_pts)
 
void mark_as_modified () const
 Users normally don't need to call this. More...
 
void clear ()
 Erase all the contents of the map. More...
 
void loadFromProbabilisticPosesAndObservations (const mrpt::maps::CSimpleMap &Map)
 Load the map contents from a CSimpleMap object, erasing all previous content of the map. More...
 
void loadFromSimpleMap (const mrpt::maps::CSimpleMap &Map)
 ! More...
 
bool insertObservation (const mrpt::obs::CObservation &obs, const mrpt::poses::CPose3D *robotPose=nullptr)
 Insert the observation information into this map. More...
 
bool insertObservationPtr (const mrpt::obs::CObservation::Ptr &obs, const mrpt::poses::CPose3D *robotPose=nullptr)
 A wrapper for smart pointers, just calls the non-smart pointer version. More...
 
double computeObservationLikelihood (const mrpt::obs::CObservation &obs, const mrpt::poses::CPose3D &takenFrom)
 Computes the log-likelihood of a given observation given an arbitrary robot 3D pose. More...
 
double computeObservationLikelihood (const mrpt::obs::CObservation &obs, const mrpt::poses::CPose2D &takenFrom)
 
virtual bool canComputeObservationLikelihood (const mrpt::obs::CObservation &obs) const
 Returns true if this map is able to compute a sensible likelihood function for this observation (i.e. More...
 
double computeObservationsLikelihood (const mrpt::obs::CSensoryFrame &sf, const mrpt::poses::CPose2D &takenFrom)
 Returns the sum of the log-likelihoods of each individual observation within a mrpt::obs::CSensoryFrame. More...
 
bool canComputeObservationsLikelihood (const mrpt::obs::CSensoryFrame &sf) const
 Returns true if this map is able to compute a sensible likelihood function for this observation (i.e. 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 const mrpt::maps::CSimplePointsMapgetAsSimplePointsMap () const
 If the map is a simple points map or it's a multi-metric map that contains EXACTLY one simple points map, return it. More...
 
mrpt::maps::CSimplePointsMapgetAsSimplePointsMap ()
 
virtual mxArraywriteToMatlab () const
 Introduces a pure virtual method responsible for writing to a mxArray Matlab object, typically a MATLAB struct whose contents are documented in each derived class. More...
 
virtual CObjectclone () const =0
 Returns a deep copy (clone) of the object, indepently of its class. More...
 
const CPointsMapderived () const
 CRTP helper method. More...
 
CPointsMapderived ()
 CRTP helper method. More...
 
bool loadFromPlyFile (const std::string &filename, std::vector< std::string > *file_comments=nullptr, std::vector< std::string > *file_obj_info=nullptr)
 Loads from a PLY file. More...
 
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. More...
 
bool saveToPlyFile (const std::string &filename, bool save_in_binary=false, const std::vector< std::string > &file_comments=std::vector< std::string >(), const std::vector< std::string > &file_obj_info=std::vector< std::string >()) const
 Saves to a PLY file. More...
 
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. More...
 
File input/output methods
bool load2D_from_text_file (const std::string &file)
 Load from a text file. More...
 
bool load3D_from_text_file (const std::string &file)
 Load from a text file. More...
 
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 More...
 
bool save2D_to_text_file (const std::string &file) const
 Save to a text file. More...
 
bool save3D_to_text_file (const std::string &file) const
 Save to a text file. More...
 
void saveMetricMapRepresentationToFile (const std::string &filNamePrefix) const override
 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 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) More...
 
virtual bool loadPCDFile (const std::string &filename)
 Load the point cloud from a PCL PCD file (requires MRPT built against PCL) More...
 
Filter-by-height stuff
void enableFilterByHeight (bool enable=true)
 Enable/disable the filter-by-height functionality. More...
 
bool isFilterByHeightEnabled () const
 Return whether filter-by-height is enabled. More...
 
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). More...
 
void getHeightFilterLevels (double &_z_min, double &_z_max) const
 Get the min/max Z levels for points to be actually inserted in the map. More...
 
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 (PointCloud<PointXYZ>). More...
 
template<class POINTCLOUD >
void setFromPCLPointCloud (const POINTCLOUD &cloud)
 Loads a PCL point cloud into this MRPT class (note: this method ignores potential RGB information, see CColouredPointsMap::setFromPCLPointCloudRGB() ). More...
 
Methods that MUST be implemented by children classes of

KDTreeCapable

size_t kdtree_get_point_count () const
 Must return the number of data points. More...
 
float kdtree_get_pt (const size_t idx, int dim) const
 Returns the dim'th component of the idx'th point in the class: More...
 
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: More...
 
template<typename BBOX >
bool kdtree_get_bbox (BBOX &bb) const
 
RTTI classes and functions for polymorphic hierarchies
mrpt::rtti::CObject::Ptr duplicateGetSmartPtr () const
 Makes a deep copy of the object and returns a smart pointer to it. More...
 
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. More...
 
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. More...
 
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. More...
 
void kdTreeTwoClosestPoint2D (const TPoint2D &p0, TPoint2D &pOut1, TPoint2D &pOut2, float &outDistSqr1, float &outDistSqr2) const
 
std::vector< size_t > 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. More...
 
std::vector< size_t > 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< size_t > &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. More...
 
void kdTreeNClosestPoint2DIdx (const TPoint2D &p0, size_t N, std::vector< size_t > &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. More...
 
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. More...
 
void kdTreeNClosestPoint3D (const TPoint3D &p0, size_t N, std::vector< TPoint3D > &pOut, std::vector< float > &outDistSqr) const
 
void kdTreeNClosestPoint3DWithIdx (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< size_t > &out_idx, std::vector< float > &out_dist_sqr) const
 KD Tree-based search for the N closest points to some given 3D coordinates. More...
 
size_t kdTreeRadiusSearch3D (const float x0, const float y0, const float z0, const float maxRadiusSqr, std::vector< std::pair< size_t, float >> &out_indices_dist) const
 KD Tree-based search for all the points within a given radius of some 3D point. More...
 
size_t kdTreeRadiusSearch2D (const float x0, const float y0, const float maxRadiusSqr, std::vector< std::pair< size_t, float >> &out_indices_dist) const
 KD Tree-based search for all the points within a given radius of some 2D point. More...
 
void kdTreeNClosestPoint3DIdx (float x0, float y0, float z0, size_t knn, std::vector< size_t > &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. More...
 
void kdTreeNClosestPoint3DIdx (const TPoint3D &p0, size_t N, std::vector< size_t > &outIdx, std::vector< float > &outDistSqr) const
 
void kdTreeEnsureIndexBuilt3D ()
 
void kdTreeEnsureIndexBuilt2D ()
 

Public Attributes

TInsertionOptions insertionOptions
 The options used when inserting observations in the map. More...
 
TLikelihoodOptions likelihoodOptions
 
TRenderOptions renderOptions
 
TMapGenericParams genericMapParams
 Common params to all maps. More...
 
TKDTreeSearchParams kdtree_search_params
 Parameters to tune the ANN searches. More...
 

Protected Member Functions

bool internal_insertObservation (const mrpt::obs::CObservation &obs, const mrpt::poses::CPose3D *robotPose) override
 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. More...
 
void base_copyFrom (const CPointsMap &obj)
 Helper method for ::copyFrom() 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...
 
void kdtree_mark_as_outdated () const
 To be called by child classes when KD tree data changes. More...
 
PLY Import virtual methods to implement in base classes
void PLY_import_set_face_count (const size_t N) override
 In a base class, reserve memory to prepare subsequent calls to PLY_import_set_face. More...
 
void PLY_import_set_vertex (const size_t idx, const mrpt::math::TPoint3Df &pt, const mrpt::img::TColorf *pt_color=nullptr) override
 In a base class, will be called after PLY_import_set_vertex_count() once for each loaded point. More...
 
PLY Export virtual methods to implement in base classes
size_t PLY_export_get_vertex_count () const override
 In a base class, return the number of vertices. More...
 
size_t PLY_export_get_face_count () const override
 In a base class, return the number of faces. More...
 
void PLY_export_get_vertex (const size_t idx, mrpt::math::TPoint3Df &pt, bool &pt_has_color, mrpt::img::TColorf &pt_color) const override
 In a base class, will be called after PLY_export_get_vertex_count() once for each exported point. More...
 
CSerializable virtual methods
virtual uint8_t serializeGetVersion () const =0
 Must return the current versioning number of the object. More...
 
virtual void serializeTo (CArchive &out) const =0
 Pure virtual method for writing (serializing) to an abstract archive. More...
 
virtual void serializeTo (CSchemeArchiveBase &out) const
 Virtual method for writing (serializing) to an abstract schema based archive. More...
 
virtual void serializeFrom (CArchive &in, uint8_t serial_version)=0
 Pure virtual method for reading (deserializing) from an abstract archive. More...
 
virtual void serializeFrom (CSchemeArchiveBase &in)
 Virtual method for reading (deserializing) from an abstract schema based archive. More...
 
PLY Import virtual methods to implement in base classes
virtual void PLY_import_set_vertex_count (const size_t N)=0
 In a base class, reserve memory to prepare subsequent calls to PLY_import_set_vertex. More...
 

Protected Attributes

mrpt::aligned_std_vector< float > m_x
 The point coordinates. More...
 
mrpt::aligned_std_vector< float > m_y
 
mrpt::aligned_std_vector< float > m_z
 
mrpt::obs::CSinCosLookUpTableFor2DScans m_scans_sincos_cache
 Cache of sin/cos values for the latest 2D scan geometries. More...
 
float m_largestDistanceFromOrigin {0}
 Auxiliary variables used in "getLargestDistanceFromOrigin". More...
 
bool m_largestDistanceFromOriginIsUpdated
 Auxiliary variables used in "getLargestDistanceFromOrigin". More...
 
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 {-10}
 The minimum and maximum height for a certain laser scan to be inserted into this map. More...
 
double m_heightfilter_z_max {10}
 
bool m_heightfilter_enabled {false}
 Whether or not (default=not) filter the input points by height. More...
 

Friends

template<class Derived >
struct detail::loadFromRangeImpl
 
template<class Derived >
struct detail::pointmap_traits
 

RTTI stuff

using Ptr = std::shared_ptr< CPointsMap >
 
using ConstPtr = std::shared_ptr< const CPointsMap >
 
static const mrpt::rtti::TRuntimeClassId runtimeClassId
 
static const mrpt::rtti::TRuntimeClassId_GetBaseClass ()
 
virtual const mrpt::rtti::TRuntimeClassIdGetRuntimeClass () const override
 Returns information about the class of an object in runtime. More...
 
static const mrpt::rtti::TRuntimeClassIdGetRuntimeClassIdStatic ()
 

Pure virtual interfaces to be implemented by any class derived

from CPointsMap

virtual void reserve (size_t newLength)=0
 Reserves memory for a given number of points: the size of the map does not change, it only reserves the memory. More...
 
virtual void resize (size_t newLength)=0
 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. More...
 
virtual void setSize (size_t newLength)=0
 Resizes all point buffers so they can hold the given number of points, erasing all previous contents and leaving all points to default values. More...
 
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(). More...
 
virtual void insertPointFast (float x, float y, float z=0)=0
 The virtual method for insertPoint() without calling mark_as_modified() More...
 
virtual void getPointAllFieldsFast (const size_t index, std::vector< float > &point_data) const =0
 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... More...
 
virtual void setPointAllFieldsFast (const size_t index, const std::vector< float > &point_data)=0
 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... More...
 
virtual void impl_copyFrom (const CPointsMap &obj)=0
 Virtual assignment operator, copies as much common data (XYZ, color,...) as possible from the source map into this one. More...
 
virtual void addFrom_classSpecific (const CPointsMap &anotherMap, const size_t nPreviousPoints)=0
 Auxiliary method called from within addFrom() automatically, to finish the copying of class-specific data. More...
 

Member Typedef Documentation

◆ ConstPtr

Definition at line 70 of file CPointsMap.h.

◆ ConstUniquePtr

using mrpt::rtti::CObject::ConstUniquePtr = std::unique_ptr<const CObject>
inherited

Definition at line 183 of file CObject.h.

◆ Ptr

Definition at line 70 of file CPointsMap.h.

◆ self_t

◆ UniquePtr

using mrpt::rtti::CObject::UniquePtr = std::unique_ptr<CObject>
inherited

Definition at line 182 of file CObject.h.

Constructor & Destructor Documentation

◆ CPointsMap()

CPointsMap::CPointsMap ( )

Ctor.

Definition at line 58 of file CPointsMap.cpp.

◆ ~CPointsMap()

CPointsMap::~CPointsMap ( )
overridedefault

Virtual destructor.

Member Function Documentation

◆ _GetBaseClass()

static const mrpt::rtti::TRuntimeClassId* mrpt::maps::CPointsMap::_GetBaseClass ( )
staticprotected

◆ addFrom()

void CPointsMap::addFrom ( const CPointsMap anotherMap)
virtual

Adds all the points from anotherMap to this map, without fusing.

This operation can be also invoked via the "+=" operator, for example:

...
m1.addFrom( m2 ); // Add all points of m2 to m1
m1 += m2; // Exactly the same than above
Note
The method in CPointsMap is generic but derived classes may redefine this virtual method to another one more optimized.

Definition at line 1648 of file CPointsMap.cpp.

References addFrom_classSpecific(), m_x, m_y, m_z, mark_as_modified(), resize(), and size().

Referenced by operator+=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addFrom_classSpecific()

virtual void mrpt::maps::CPointsMap::addFrom_classSpecific ( const CPointsMap anotherMap,
const size_t  nPreviousPoints 
)
protectedpure virtual

Auxiliary method called from within addFrom() automatically, to finish the copying of class-specific data.

Implemented in mrpt::maps::CColouredPointsMap, mrpt::maps::CWeightedPointsMap, mrpt::maps::CSimplePointsMap, and mrpt::maps::CPointsMapXYZI.

Referenced by addFrom(), and insertAnotherMap().

Here is the caller graph for this function:

◆ applyDeletionMask()

void CPointsMap::applyDeletionMask ( const std::vector< bool > &  mask)

Remove from the map the points marked in a bool's array as "true".

Exceptions
std::exceptionIf mask size is not equal to points count.

Definition at line 1708 of file CPointsMap.cpp.

References ASSERT_EQUAL_, getPointAllFieldsFast(), mark_as_modified(), resize(), setPointAllFieldsFast(), and size().

Referenced by mrpt::graphslam::deciders::CRangeScanOps< GRAPH_T >::decimatePointsMap(), mrpt::maps::CPointCloudFilterByDistance::filter(), and internal_insertObservation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ auxParticleFilterCleanUp()

virtual void mrpt::maps::CMetricMap::auxParticleFilterCleanUp ( )
inlinevirtualinherited

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

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

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

Definition at line 283 of file CMetricMap.h.

◆ base_copyFrom()

void CPointsMap::base_copyFrom ( const CPointsMap obj)
protected

Helper method for ::copyFrom()

Definition at line 1765 of file CPointsMap.cpp.

References mrpt::math::KDTreeCapable< CPointsMap >::kdtree_mark_as_outdated(), m_largestDistanceFromOrigin, m_largestDistanceFromOriginIsUpdated, m_x, m_y, m_z, MRPT_END, MRPT_START, and resize().

Here is the call graph for this function:

◆ boundingBox() [1/2]

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

Results are cached unless the map is somehow modified to avoid repeated calculations.

Definition at line 922 of file CPointsMap.cpp.

References m_bb_max_x, m_bb_max_y, m_bb_max_z, m_bb_min_x, m_bb_min_y, m_bb_min_z, m_boundingBoxIsUpdated, m_x, m_y, m_z, min, MRPT_END, and MRPT_START.

Referenced by boundingBox(), compute3DDistanceToMesh(), determineMatching3D(), getAs3DObject(), and kdtree_get_bbox().

Here is the caller graph for this function:

◆ boundingBox() [2/2]

void mrpt::maps::CPointsMap::boundingBox ( mrpt::math::TPoint3D pMin,
mrpt::math::TPoint3D pMax 
) const
inline

Definition at line 906 of file CPointsMap.h.

References boundingBox(), mrpt::math::TPoint3D_data::x, mrpt::math::TPoint3D_data::y, and mrpt::math::TPoint3D_data::z.

Here is the call graph for this function:

◆ canComputeObservationLikelihood()

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

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

an occupancy grid map cannot with an image). See: Maps and observations compatibility matrix

Parameters
obsThe observation.
See also
computeObservationLikelihood, genericMapParams.enableObservationLikelihood

Definition at line 172 of file CMetricMap.cpp.

◆ canComputeObservationsLikelihood()

bool CMetricMap::canComputeObservationsLikelihood ( const mrpt::obs::CSensoryFrame sf) const
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). See: Maps and observations compatibility matrix

Parameters
sfThe observations.
See also
canComputeObservationLikelihood

Definition at line 85 of file CMetricMap.cpp.

References mrpt::obs::CSensoryFrame::begin(), and mrpt::obs::CSensoryFrame::end().

Here is the call graph for this function:

◆ changeCoordinatesReference() [1/3]

void CPointsMap::changeCoordinatesReference ( const mrpt::poses::CPose2D b)

Replace each point $ p_i $ by $ p'_i = b \oplus p_i $ (pose compounding operator).

Definition at line 553 of file CPointsMap.cpp.

References mrpt::poses::CPose3D::composePoint().

Referenced by mrpt::maps::CHeightGridMap2D_Base::dem_internal_insertObservation(), and TEST_F().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeCoordinatesReference() [2/3]

void CPointsMap::changeCoordinatesReference ( const mrpt::poses::CPose3D b)

Replace each point $ p_i $ by $ p'_i = b \oplus p_i $ (pose compounding operator).

Definition at line 571 of file CPointsMap.cpp.

References mrpt::poses::CPose3D::composePoint().

Here is the call graph for this function:

◆ changeCoordinatesReference() [3/3]

void CPointsMap::changeCoordinatesReference ( const CPointsMap other,
const mrpt::poses::CPose3D b 
)

Copy all the points from "other" map to "this", replacing each point $ p_i $ by $ p'_i = b \oplus p_i $ (pose compounding operator).

Definition at line 587 of file CPointsMap.cpp.

◆ clear()

◆ clipOutOfRange()

void CPointsMap::clipOutOfRange ( const mrpt::math::TPoint2D point,
float  maxRange 
)

Delete points which are more far than "maxRange" away from the given "point".

Definition at line 263 of file CPointsMap.cpp.

References mrpt::square().

Here is the call graph for this function:

◆ clipOutOfRangeInZ()

void CPointsMap::clipOutOfRangeInZ ( float  zMin,
float  zMax 
)

Delete points out of the given "z" axis range have been removed.

Definition at line 245 of file CPointsMap.cpp.

◆ clone()

virtual CObject* mrpt::rtti::CObject::clone ( ) const
pure virtualinherited

Returns a deep copy (clone) of the object, indepently of its class.

Implemented in mrpt::obs::CObservation3DRangeScan, mrpt::nav::CLogFileRecord_FullEval, mrpt::nav::CLogFileRecord_ND, mrpt::img::CImage, mrpt::maps::CMultiMetricMap, mrpt::db::CSimpleDatabase, mrpt::obs::CObservationIMU, mrpt::poses::CPose3D, mrpt::obs::CObservationRGBD360, mrpt::maps::CRandomFieldGridMap3D, mrpt::obs::CObservationVelodyneScan, mrpt::maps::TMapGenericParams, mrpt::detectors::CDetectable3D, mrpt::hmtslam::THypothesisIDSet, mrpt::maps::CLandmarksMap, mrpt::hmtslam::CHMTSLAM, mrpt::hmtslam::CLocalMetricHypothesis, mrpt::kinematics::CKinematicChain, mrpt::obs::CObservationGPS, mrpt::opengl::COctoMapVoxels, mrpt::maps::CMultiMetricMapPDF, mrpt::maps::CHeightGridMap2D, mrpt::obs::CRawlog, mrpt::opengl::COpenGLViewport, mrpt::opengl::COpenGLScene, mrpt::opengl::CPlanarLaserScan, mrpt::slam::CIncrementalMapPartitioner, mrpt::vision::CFeature, mrpt::maps::COccupancyGridMap2D, mrpt::nav::CHolonomicFullEval, mrpt::obs::CObservation2DRangeScan, mrpt::nav::CHolonomicND, mrpt::obs::CSensoryFrame, mrpt::opengl::CFrustum, mrpt::poses::CPose2DInterpolator, mrpt::poses::CPose3DInterpolator, mrpt::nav::CHolonomicVFF, mrpt::opengl::CEllipsoidInverseDepth3D, mrpt::opengl::CPointCloudColoured, mrpt::opengl::CPointCloud, mrpt::poses::CPose3DQuat, mrpt::hmtslam::CLSLAMParticleData, mrpt::opengl::CEllipsoid, mrpt::opengl::CEllipsoidInverseDepth2D, mrpt::pbmap::PbMap, mrpt::detectors::CDetectable2D, mrpt::maps::CBeaconMap, mrpt::opengl::CPolyhedron, mrpt::pbmap::Plane, mrpt::poses::CPose3DQuatPDFGaussian, mrpt::poses::CPose3DQuatPDFGaussianInf, mrpt::opengl::CText3D, mrpt::maps::COctoMap, mrpt::opengl::CAngularObservationMesh, mrpt::opengl::CEllipsoidRangeBearing2D, mrpt::poses::CPose2D, mrpt::maps::CReflectivityGridMap2D, mrpt::nav::CPTG_DiffDrive_C, mrpt::poses::CPose3DPDFGaussianInf, mrpt::opengl::CAssimpModel, mrpt::opengl::CBox, mrpt::poses::CPose3DPDFGaussian, mrpt::maps::CColouredOctoMap, mrpt::obs::CObservationStereoImages, mrpt::opengl::CMeshFast, mrpt::poses::CPosePDFParticles, MyNS::Bar, mrpt::hmtslam::CHMHMapNode, mrpt::hmtslam::CRobotPosesGraph, mrpt::opengl::CVectorField3D, mrpt::poses::CPose3DPDFParticles, mrpt::obs::CObservationStereoImagesFeatures, mrpt::opengl::CMesh, mrpt::hmtslam::CMHPropertiesValuesList, mrpt::maps::CBeacon, mrpt::maps::COccupancyGridMap3D, mrpt::nav::CPTG_DiffDrive_alpha, mrpt::opengl::CText, mrpt::maps::CRBPFParticleData, mrpt::maps::CLandmark, mrpt::maps::CHeightGridMap2D_MRF, mrpt::opengl::CColorBar, mrpt::poses::CPosePDFGaussianInf, mrpt::poses::CPosePDFSOG, mrpt::hmtslam::CHMHMapArc, mrpt::obs::CObservationPointCloud, mrpt::poses::CPoint2D, mrpt::poses::CPointPDFSOG, mrpt::maps::CGasConcentrationGridMap2D, mrpt::maps::CWirelessPowerGridMap2D, mrpt::maps::CSimpleMap, mrpt::obs::CObservationImage, mrpt::opengl::CMesh3D, mrpt::opengl::CVectorField2D, mrpt::poses::CPoint3D, mrpt::poses::CPose3DPDFSOG, mrpt::obs::CObservationBatteryState, mrpt::opengl::CSetOfLines, mrpt::hmtslam::CHierarchicalMHMap, mrpt::maps::CSimplePointsMap, mrpt::opengl::CDisk, mrpt::maps::CColouredPointsMap, mrpt::maps::CWeightedPointsMap, mrpt::nav::CLogFileRecord, mrpt::obs::CActionRobotMovement2D, mrpt::obs::CObservationOdometry, mrpt::obs::CObservationRawDAQ, mrpt::opengl::CAxis, mrpt::opengl::CCamera, mrpt::opengl::CCylinder, mrpt::opengl::CGridPlaneXY, mrpt::opengl::CGridPlaneXZ, mrpt::poses::CPointPDFParticles, mrpt::obs::CObservationBearingRange, mrpt::obs::CObservationWindSensor, mrpt::opengl::CArrow, mrpt::opengl::CGeneralizedCylinder, mrpt::opengl::CSphere, mrpt::poses::CPosePDFGaussian, MyNS::MyDerived2, mrpt::obs::CObservationRange, mrpt::maps::CPointsMapXYZI, mrpt::nav::CMultiObjMotionOpt_Scalarization, mrpt::nav::CPTG_Holo_Blend, mrpt::obs::CActionCollection, mrpt::obs::CActionRobotMovement3D, mrpt::obs::CObservationWirelessPower, mrpt::opengl::CSetOfObjects, mrpt::img::TCamera, mrpt::nav::CLogFileRecord_VFF, mrpt::nav::CPTG_DiffDrive_CC, mrpt::nav::CPTG_DiffDrive_CCS, mrpt::nav::CPTG_DiffDrive_CS, mrpt::obs::CObservation6DFeatures, mrpt::obs::CObservationSkeleton, mrpt::poses::CPose3DPDFGrid, mrpt::obs::CObservationVisualLandmarks, mrpt::math::CMatrixD, mrpt::math::CSplineInterpolator1D, mrpt::obs::CObservationBeaconRanges, mrpt::obs::CObservationComment, mrpt::obs::CObservationGasSensors, mrpt::obs::CObservationReflectivity, mrpt::obs::CObservationRFID, mrpt::poses::CPosePDFGrid, mrpt::poses::CPoses2DSequence, mrpt::img::TStereoCamera, mrpt::opengl::COpenGLStandardObject, mrpt::poses::CPoses3DSequence, mrpt::math::CMatrixF, mrpt::opengl::CSetOfTriangles, mrpt::poses::CPointPDFGaussian, mrpt::hmtslam::CPropertiesValuesList, mrpt::math::CMatrixB, mrpt::obs::CObservationCANBusJ1939, mrpt::obs::CObservationRobotPose, mrpt::opengl::CSetOfTexturedTriangles, MyNS::MyDerived1, mrpt::math::CPolygon, mrpt::poses::CPoint2DPDFGaussian, MyNS::Foo, mrpt::db::CSimpleDatabaseTable, mrpt::kinematics::CVehicleVelCmd_DiffDriven, mrpt::kinematics::CVehicleVelCmd_Holo, mrpt::opengl::CSimpleLine, mrpt::opengl::CTexturedPlane, and MyNS::Foo.

Referenced by mrpt::rtti::CObject::duplicateGetSmartPtr(), mrpt::maps::CSimpleMap::insert(), mrpt::obs::CActionCollection::insert(), and mrpt::poses::CPoseRandomSampler::setPosePDF().

Here is the caller graph for this function:

◆ compute3DDistanceToMesh()

void CPointsMap::compute3DDistanceToMesh ( const mrpt::maps::CMetricMap otherMap2,
const mrpt::poses::CPose3D otherMapPose,
float  maxDistForCorrespondence,
mrpt::tfest::TMatchingPairList correspondences,
float &  correspondencesRatio 
)

Computes the matchings between this and another 3D points map.

This method matches each point in the other map with the centroid of the 3 closest points in 3D from this map (if the distance is below a defined threshold).

Parameters
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.
correspondences[OUT] The detected matchings pairs.
correspondencesRatio[OUT] The ratio [0,1] of points in otherMap with at least one correspondence.
See also
determineMatching3D

Definition at line 1262 of file CPointsMap.cpp.

References boundingBox(), mrpt::math::distance(), mrpt::math::KDTreeCapable< CPointsMap >::kdTreeNClosestPoint3DWithIdx(), MRPT_END, MRPT_START, MRPT_UNUSED_PARAM, and size().

Here is the call graph for this function:

◆ compute3DMatchingRatio()

float CPointsMap::compute3DMatchingRatio ( const mrpt::maps::CMetricMap otherMap,
const mrpt::poses::CPose3D otherMapPose,
const TMatchingRatioParams params 
) const
overridevirtual

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

This method always return 0 for grid maps.

Parameters
otherMap[IN] The other map to compute the matching with.
otherMapPose[IN] The 6D pose of the other map as seen from "this".
params[IN] Matching parameters
Returns
The matching ratio [0,1]
See also
determineMatching2D

Reimplemented from mrpt::maps::CMetricMap.

Definition at line 803 of file CPointsMap.cpp.

References mrpt::maps::TMatchingExtraResults::correspondencesRatio, determineMatching3D(), mrpt::maps::CMetricMap::getAsSimplePointsMap(), and mrpt::maps::TMatchingRatioParams::maxDistForCorr.

Here is the call graph for this function:

◆ computeObservationLikelihood() [1/2]

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

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

See: Maps and observations compatibility matrix

Parameters
takenFromThe robot's pose the observation is supposed to be taken from.
obsThe observation.
Returns
This method returns a log-likelihood.
See also
Used in particle filter algorithms, see: CMultiMetricMapPDF::update

Definition at line 181 of file CMetricMap.cpp.

Referenced by mrpt::maps::CMultiMetricMapPDF::PF_SLAM_computeObservationLikelihoodForParticle().

Here is the caller graph for this function:

◆ computeObservationLikelihood() [2/2]

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

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

Definition at line 76 of file CMetricMap.cpp.

◆ computeObservationsLikelihood()

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

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

See: Maps and observations compatibility matrix

Parameters
takenFromThe robot's pose the observation is supposed to be taken from.
sfThe set of observations in a CSensoryFrame.
Returns
This method returns a log-likelihood.
See also
canComputeObservationsLikelihood

Definition at line 66 of file CMetricMap.cpp.

Referenced by mrpt::hmtslam::CLSLAM_RBPF_2DLASER::auxiliarComputeObservationLikelihood().

Here is the caller graph for this function:

◆ derived() [1/2]

const CPointsMap & mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::derived ( ) const
inlineinherited

CRTP helper method.

Definition at line 100 of file KDTreeCapable.h.

◆ derived() [2/2]

CPointsMap & mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::derived ( )
inlineinherited

CRTP helper method.

Definition at line 105 of file KDTreeCapable.h.

◆ determineMatching2D()

void CPointsMap::determineMatching2D ( const mrpt::maps::CMetricMap otherMap,
const mrpt::poses::CPose2D otherMapPose,
mrpt::tfest::TMatchingPairList correspondences,
const TMatchingParams params,
TMatchingExtraResults extraResults 
) const
overridevirtual

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

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

The algorithm is:

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

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

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

Reimplemented from mrpt::maps::CMetricMap.

Definition at line 283 of file CPointsMap.cpp.

References ASSERT_, ASSERT_ABOVE_, ASSERT_BELOW_, ASSERTMSG_, mrpt::tfest::TMatchingPairList::filterUniqueRobustPairs(), IS_DERIVED, min, MRPT_END, MRPT_START, mrpt::poses::CPose2D::phi(), mrpt::math::internal::ProvideStaticResize< Derived >::size(), mrpt::square(), mrpt::poses::CPoseOrPoint< DERIVEDCLASS, DIM >::x(), and mrpt::poses::CPoseOrPoint< DERIVEDCLASS, DIM >::y().

Referenced by fuseWith().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ determineMatching3D()

void CPointsMap::determineMatching3D ( const mrpt::maps::CMetricMap otherMap,
const mrpt::poses::CPose3D otherMapPose,
mrpt::tfest::TMatchingPairList correspondences,
const TMatchingParams params,
TMatchingExtraResults extraResults 
) const
overridevirtual

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

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

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

The algorithm is:

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

Reimplemented from mrpt::maps::CMetricMap.

Definition at line 1046 of file CPointsMap.cpp.

References ASSERT_, ASSERT_ABOVE_, ASSERT_BELOW_, ASSERTMSG_, boundingBox(), CLASS_ID, mrpt::poses::CPose3D::composePoint(), mrpt::rtti::TRuntimeClassId::derivedFrom(), mrpt::tfest::TMatchingPairList::filterUniqueRobustPairs(), mrpt::maps::CMetricMap::GetRuntimeClass(), mrpt::math::KDTreeCapable< CPointsMap >::kdTreeClosestPoint3D(), m_x, m_y, m_z, min, MRPT_END, MRPT_START, size(), and mrpt::square().

Referenced by compute3DMatchingRatio().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ duplicateGetSmartPtr()

mrpt::rtti::CObject::Ptr CObject::duplicateGetSmartPtr ( ) const
inlineinherited

Makes a deep copy of the object and returns a smart pointer to it.

Definition at line 200 of file CObject.h.

References mrpt::rtti::CObject::clone().

Referenced by mrpt::obs::CRawlog::addActions(), and mrpt::obs::CRawlog::addObservations().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ empty()

bool mrpt::maps::CPointsMap::empty ( ) const
inline

STL-like method to check whether the map is empty:

Definition at line 875 of file CPointsMap.h.

References isEmpty().

Referenced by mrpt::maps::CHeightGridMap2D_Base::dem_internal_insertObservation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enableFilterByHeight()

void mrpt::maps::CPointsMap::enableFilterByHeight ( bool  enable = true)
inline

Enable/disable the filter-by-height functionality.

See also
setHeightFilterLevels
Note
Default upon construction is disabled.

Definition at line 939 of file CPointsMap.h.

References m_heightfilter_enabled.

◆ extractCylinder()

void CPointsMap::extractCylinder ( const mrpt::math::TPoint2D center,
const double  radius,
const double  zmin,
const double  zmax,
CPointsMap outMap 
)

Extracts the points in the map within a cylinder in 3D defined the provided radius and zmin/zmax values.

Definition at line 1221 of file CPointsMap.cpp.

References mrpt::maps::CMetricMap::clear(), insertPoint(), m_x, m_y, m_z, mrpt::square(), mrpt::math::TPoint2D_data::x, and mrpt::math::TPoint2D_data::y.

Here is the call graph for this function:

◆ extractPoints()

void CPointsMap::extractPoints ( const mrpt::math::TPoint3D corner1,
const mrpt::math::TPoint3D corner2,
CPointsMap outMap,
const double &  R = 1,
const double &  G = 1,
const double &  B = 1 
)

Extracts the points in the map within the area defined by two corners.

The points are coloured according the R,G,B input data.

Definition at line 1238 of file CPointsMap.cpp.

References mrpt::maps::CMetricMap::clear(), G, insertPointRGB(), m_x, m_y, m_z, min, R, mrpt::math::TPoint3D_data::x, mrpt::math::TPoint3D_data::y, and mrpt::math::TPoint3D_data::z.

Here is the call graph for this function:

◆ fuseWith()

void CPointsMap::fuseWith ( CPointsMap anotherMap,
float  minDistForFuse = 0.02f,
std::vector< bool > *  notFusedPoints = nullptr 
)

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.

Parameters
otherMapThe other map whose points are to be inserted into this one.
minDistForFuseMinimum distance (in meters) between two points, each one in a map, to be considered the same one and be fused rather than added.
notFusedPointsIf 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.
See also
loadFromRangeScan, addFrom

Definition at line 2074 of file CPointsMap.cpp.

References ASSERT_, determineMatching2D(), getPoint(), getPointWeight(), insertPointFast(), m_x, m_y, m_z, mark_as_modified(), reserve(), setPointWeight(), size(), mrpt::square(), and mrpt::math::TPoint3D_data::x.

Referenced by internal_insertObservation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAllPoints() [1/4]

template<class VECTOR >
void mrpt::maps::CPointsMap::getAllPoints ( VECTOR &  xs,
VECTOR &  ys,
VECTOR &  zs,
size_t  decimation = 1 
) const
inline

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.

See also
getPointsBufferRef_x, getPointsBufferRef_y, getPointsBufferRef_z
Template Parameters
VECTORcan be std::vector<float or double> or any row/column Eigen::Array or Eigen::Matrix (this includes mrpt::math::CVectorFloat and mrpt::math::CVectorDouble).

Definition at line 557 of file CPointsMap.h.

References ASSERT_, m_x, m_y, m_z, MRPT_END, and MRPT_START.

Referenced by getAllPoints().

Here is the caller graph for this function:

◆ getAllPoints() [2/4]

template<class CONTAINER >
void mrpt::maps::CPointsMap::getAllPoints ( CONTAINER &  ps,
size_t  decimation = 1 
) const
inline

Gets all points as a STL-like container.

Template Parameters
CONTAINERAny STL-like container of mrpt::math::TPoint3D, mrpt::math::TPoint3Df or anything having members x,y,z. Note that this method is not efficient for large point clouds. Fastest methods are getPointsBuffer() or getPointsBufferRef_x(), getPointsBufferRef_y(), getPointsBufferRef_z()

Definition at line 585 of file CPointsMap.h.

References getAllPoints().

Here is the call graph for this function:

◆ getAllPoints() [3/4]

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

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.

See also
setAllPoints

Definition at line 847 of file CPointsMap.cpp.

References ASSERT_, m_x, m_y, MRPT_END, and MRPT_START.

◆ getAllPoints() [4/4]

void mrpt::maps::CPointsMap::getAllPoints ( std::vector< mrpt::math::TPoint2D > &  ps,
size_t  decimation = 1 
) const
inline

Definition at line 608 of file CPointsMap.h.

References getAllPoints().

Here is the call graph for this function:

◆ getAs3DObject()

void CPointsMap::getAs3DObject ( mrpt::opengl::CSetOfObjects::Ptr outObj) const
overridevirtual

Returns a 3D object representing the map.

The color of the points is controlled by renderOptions

Implements mrpt::maps::CMetricMap.

Reimplemented in mrpt::maps::CPointsMapXYZI.

Definition at line 774 of file CPointsMap.cpp.

References boundingBox(), mrpt::img::cmNONE, mrpt::maps::CPointsMap::TRenderOptions::color, mrpt::maps::CPointsMap::TRenderOptions::colormap, mrpt::opengl::CPointCloud::Create(), mrpt::opengl::CPointCloudColoured::Create(), mrpt::maps::TMapGenericParams::enableSaveAs3DObject, mrpt::maps::CMetricMap::genericMapParams, MRPT_END, MRPT_START, mrpt::maps::CPointsMap::TRenderOptions::point_size, renderOptions, and mrpt::math::TPoint3D_data::z.

Referenced by TEST_F().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAsSimplePointsMap() [1/2]

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

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

Otherwise, return nullptr

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

Definition at line 296 of file CMetricMap.h.

Referenced by compute3DMatchingRatio(), and mrpt::maps::CMetricMap::getAsSimplePointsMap().

Here is the caller graph for this function:

◆ getAsSimplePointsMap() [2/2]

mrpt::maps::CSimplePointsMap* mrpt::maps::CMetricMap::getAsSimplePointsMap ( )
inlineinherited

Definition at line 300 of file CMetricMap.h.

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

Here is the call graph for this function:

◆ getHeightFilterLevels()

void mrpt::maps::CPointsMap::getHeightFilterLevels ( double &  _z_min,
double &  _z_max 
) const
inline

Get the min/max Z levels for points to be actually inserted in the map.

See also
enableFilterByHeight, setHeightFilterLevels

Definition at line 958 of file CPointsMap.h.

References m_heightfilter_z_max, and m_heightfilter_z_min.

◆ getLargestDistanceFromOrigin()

float CPointsMap::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).

Definition at line 824 of file CPointsMap.cpp.

References m_largestDistanceFromOrigin, m_largestDistanceFromOriginIsUpdated, m_x, m_y, m_z, and mrpt::square().

Here is the call graph for this function:

◆ getLargestDistanceFromOriginNoRecompute()

float mrpt::maps::CPointsMap::getLargestDistanceFromOriginNoRecompute ( bool &  output_is_valid) const
inline

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 891 of file CPointsMap.h.

References m_largestDistanceFromOrigin, and m_largestDistanceFromOriginIsUpdated.

◆ getLoadPLYErrorString()

std::string mrpt::opengl::PLY_Importer::getLoadPLYErrorString ( ) const
inlineinherited

Return a description of the error if loadFromPlyFile() returned false, or an empty string if the file was loaded without problems.

Definition at line 44 of file PLY_import_export.h.

References mrpt::opengl::PLY_Importer::m_ply_import_last_error.

◆ getPCLPointCloud()

template<class POINTCLOUD >
void mrpt::maps::CPointsMap::getPCLPointCloud ( POINTCLOUD &  cloud) const
inline

Use to convert this MRPT point cloud object into a PCL point cloud object (PointCloud<PointXYZ>).

Usage example:

mrpt::maps::CPointsCloud pc;
pcl::PointCloud<pcl::PointXYZ> cloud;
pc.getPCLPointCloud(cloud);
See also
setFromPCLPointCloud, CColouredPointsMap::getPCLPointCloudXYZRGB (for color data)

Definition at line 991 of file CPointsMap.h.

References m_x, m_y, m_z, and size().

Referenced by mrpt::maps::CPointsMapXYZI::getPCLPointCloudXYZI(), mrpt::maps::CColouredPointsMap::getPCLPointCloudXYZRGB(), loadPCDFile(), and savePCDFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPoint() [1/6]

void CPointsMap::getPoint ( size_t  index,
float &  x,
float &  y,
float &  z 
) const

Access to a given point from map, as a 2D point.

First index is 0.

Exceptions
Throwsstd::exception on index out of bound.
See also
setPoint, getPointFast

Definition at line 200 of file CPointsMap.cpp.

References ASSERT_BELOW_.

Referenced by mrpt::slam::CGridMapAligner::AlignPDF_robustMatch(), mrpt::maps::COccupancyGridMap2D::computeLikelihoodField_II(), mrpt::maps::COccupancyGridMap2D::computeLikelihoodField_Thrun(), mrpt::maps::CHeightGridMap2D_Base::dem_internal_insertObservation(), fuseWith(), getPoint(), getPointRGB(), mrpt::opengl::PointCloudAdapter< mrpt::maps::CPointsMapXYZI >::getPointXYZ_RGBu8(), internal_insertObservation(), and ransac_data_assoc_run().

Here is the caller graph for this function:

◆ getPoint() [2/6]

void CPointsMap::getPoint ( size_t  index,
float &  x,
float &  y 
) const

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 194 of file CPointsMap.cpp.

References ASSERT_BELOW_.

◆ getPoint() [3/6]

void CPointsMap::getPoint ( size_t  index,
double &  x,
double &  y,
double &  z 
) const

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 213 of file CPointsMap.cpp.

References ASSERT_BELOW_.

◆ getPoint() [4/6]

void CPointsMap::getPoint ( size_t  index,
double &  x,
double &  y 
) const

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 207 of file CPointsMap.cpp.

References ASSERT_BELOW_.

◆ getPoint() [5/6]

void mrpt::maps::CPointsMap::getPoint ( size_t  index,
mrpt::math::TPoint2D p 
) const
inline

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 435 of file CPointsMap.h.

References getPoint().

Here is the call graph for this function:

◆ getPoint() [6/6]

void mrpt::maps::CPointsMap::getPoint ( size_t  index,
mrpt::math::TPoint3D p 
) const
inline

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 440 of file CPointsMap.h.

References getPoint().

Here is the call graph for this function:

◆ getPointAllFields()

void mrpt::maps::CPointsMap::getPointAllFields ( const size_t  index,
std::vector< float > &  point_data 
) const
inline

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

See also
getPointAllFieldsFast, setPointAllFields, setPointAllFieldsFast

Definition at line 693 of file CPointsMap.h.

References ASSERT_BELOW_, getPointAllFieldsFast(), and size().

Here is the call graph for this function:

◆ getPointAllFieldsFast()

virtual void mrpt::maps::CPointsMap::getPointAllFieldsFast ( const size_t  index,
std::vector< float > &  point_data 
) const
pure virtual

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

Unlike getPointAllFields(), this method does not check for index out of bounds

See also
getPointAllFields, setPointAllFields, setPointAllFieldsFast

Implemented in mrpt::maps::CColouredPointsMap, mrpt::maps::CWeightedPointsMap, mrpt::maps::CSimplePointsMap, and mrpt::maps::CPointsMapXYZI.

Referenced by applyDeletionMask(), and getPointAllFields().

Here is the caller graph for this function:

◆ getPointFast()

void mrpt::maps::CPointsMap::getPointFast ( size_t  index,
float &  x,
float &  y,
float &  z 
) const
inline

Just like getPoint() but without checking out-of-bound index and without returning the point weight, just XYZ.

Definition at line 462 of file CPointsMap.h.

References m_x, m_y, and m_z.

Referenced by mrpt::maps::CPointCloudFilterByDistance::filter(), mrpt::opengl::PointCloudAdapter< mrpt::maps::CSimplePointsMap >::getPointXYZ(), mrpt::opengl::PointCloudAdapter< mrpt::maps::CWeightedPointsMap >::getPointXYZ(), mrpt::opengl::PointCloudAdapter< mrpt::maps::CPointsMapXYZI >::getPointXYZ(), mrpt::opengl::PointCloudAdapter< mrpt::maps::CColouredPointsMap >::getPointXYZ(), mrpt::opengl::PointCloudAdapter< mrpt::maps::CPointsMap >::getPointXYZ(), and insertAnotherMap().

Here is the caller graph for this function:

◆ getPointRGB()

virtual void mrpt::maps::CPointsMap::getPointRGB ( size_t  index,
float &  x,
float &  y,
float &  z,
float &  R,
float &  G,
float &  B 
) const
inlinevirtual

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.

Returns
The return value is the weight of the point (the times it has been fused)
Exceptions
Throwsstd::exception on index out of bound.

Reimplemented in mrpt::maps::CColouredPointsMap, and mrpt::maps::CPointsMapXYZI.

Definition at line 451 of file CPointsMap.h.

References G, getPoint(), and R.

Here is the call graph for this function:

◆ getPointsBuffer()

void CPointsMap::getPointsBuffer ( size_t &  outPointsCount,
const float *&  xs,
const float *&  ys,
const float *&  zs 
) const

◆ getPointsBufferRef_x()

const mrpt::aligned_std_vector<float>& mrpt::maps::CPointsMap::getPointsBufferRef_x ( ) const
inline

Provides a direct access to a read-only reference of the internal point buffer.

See also
getAllPoints

Definition at line 531 of file CPointsMap.h.

References m_x.

Referenced by mrpt::maps::COccupancyGridMap3D::insertPointCloud().

Here is the caller graph for this function:

◆ getPointsBufferRef_y()

const mrpt::aligned_std_vector<float>& mrpt::maps::CPointsMap::getPointsBufferRef_y ( ) const
inline

Provides a direct access to a read-only reference of the internal point buffer.

See also
getAllPoints

Definition at line 537 of file CPointsMap.h.

References m_y.

Referenced by mrpt::maps::COccupancyGridMap3D::insertPointCloud().

Here is the caller graph for this function:

◆ getPointsBufferRef_z()

const mrpt::aligned_std_vector<float>& mrpt::maps::CPointsMap::getPointsBufferRef_z ( ) const
inline

Provides a direct access to a read-only reference of the internal point buffer.

See also
getAllPoints

Definition at line 543 of file CPointsMap.h.

References m_z.

Referenced by mrpt::maps::COccupancyGridMap3D::insertPointCloud(), and TEST().

Here is the caller graph for this function:

◆ getPointWeight()

virtual unsigned int mrpt::maps::CPointsMap::getPointWeight ( size_t  index) const
inlinevirtual

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

See also
setPointWeight

Reimplemented in mrpt::maps::CWeightedPointsMap.

Definition at line 516 of file CPointsMap.h.

References MRPT_UNUSED_PARAM.

Referenced by fuseWith().

Here is the caller graph for this function:

◆ GetRuntimeClass()

virtual const mrpt::rtti::TRuntimeClassId* mrpt::maps::CPointsMap::GetRuntimeClass ( ) const
overridevirtual

Returns information about the class of an object in runtime.

Reimplemented from mrpt::maps::CMetricMap.

Reimplemented in mrpt::maps::CSimplePointsMap, mrpt::maps::CColouredPointsMap, mrpt::maps::CWeightedPointsMap, and mrpt::maps::CPointsMapXYZI.

◆ GetRuntimeClassIdStatic()

static const mrpt::rtti::TRuntimeClassId& mrpt::maps::CPointsMap::GetRuntimeClassIdStatic ( )
static

◆ getSavePLYErrorString()

std::string mrpt::opengl::PLY_Exporter::getSavePLYErrorString ( ) const
inlineinherited

Return a description of the error if loadFromPlyFile() returned false, or an empty string if the file was loaded without problems.

Definition at line 104 of file PLY_import_export.h.

References mrpt::opengl::PLY_Exporter::m_ply_export_last_error.

◆ hasColorPoints()

virtual bool mrpt::maps::CPointsMap::hasColorPoints ( ) const
inlinevirtual

Returns true if the point map has a color field for each point.

Reimplemented in mrpt::maps::CColouredPointsMap, and mrpt::maps::CPointsMapXYZI.

Definition at line 470 of file CPointsMap.h.

◆ hasSubscribers()

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

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

Definition at line 53 of file CObservable.h.

References mrpt::system::CObservable::m_subscribers.

Referenced by mrpt::gui::CWindowDialog::OnMouseDown(), mrpt::gui::CWindowDialog::OnMouseMove(), mrpt::gui::CWindowDialog::OnResize(), and mrpt::opengl::COpenGLViewport::render().

Here is the caller graph for this function:

◆ impl_copyFrom()

virtual void mrpt::maps::CPointsMap::impl_copyFrom ( const CPointsMap obj)
protectedpure virtual

Virtual assignment operator, copies as much common data (XYZ, color,...) as possible from the source map into this one.

Implemented in mrpt::maps::CColouredPointsMap, mrpt::maps::CWeightedPointsMap, mrpt::maps::CSimplePointsMap, and mrpt::maps::CPointsMapXYZI.

Referenced by operator=().

Here is the caller graph for this function:

◆ insertAnotherMap()

void CPointsMap::insertAnotherMap ( const CPointsMap otherMap,
const mrpt::poses::CPose3D otherPose 
)

Insert the contents of another map into this one with some geometric transformation, without fusing close points.

Parameters
otherMapThe other map whose points are to be inserted into this one.
otherPoseThe pose of the other map in the coordinates of THIS map
See also
fuseWith, addFrom

Definition at line 1734 of file CPointsMap.cpp.

References addFrom_classSpecific(), mrpt::poses::CPose3D::composePoint(), getPointFast(), mark_as_modified(), resize(), setPointFast(), size(), mrpt::math::TPoint3Df::x, mrpt::math::TPoint3Df::y, and mrpt::math::TPoint3Df::z.

Referenced by internal_insertObservation(), and mrpt::nav::CReactiveNavigationSystem3D::loggingGetWSObstaclesAndShape().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insertObservation()

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

Insert the observation information into this map.

This method must be implemented in derived classes. See: Maps and observations compatibility matrix

Parameters
obsThe observation
robotPoseThe 3D pose of the robot mobile base in the map reference system, or NULL (default) if you want to use the origin.
See also
CObservation::insertObservationInto

Definition at line 93 of file CMetricMap.cpp.

Referenced by ICPTests::align2scans(), mrpt::maps::COccupancyGridMap2D::computeObservationLikelihood_likelihoodField_Thrun(), mrpt::opengl::CPlanarLaserScan::getBoundingBox(), mrpt::graphslam::deciders::CRangeScanOps< GRAPH_T >::getICPEdge(), CAngularObservationMesh_fnctr::operator()(), mrpt::opengl::CPlanarLaserScan::render_dl(), TEST(), and mrpt::graphslam::CGraphSlamEngine< GRAPH_T >::updateMapVisualization().

Here is the caller graph for this function:

◆ insertObservationPtr()

bool CMetricMap::insertObservationPtr ( const mrpt::obs::CObservation::Ptr obs,
const mrpt::poses::CPose3D robotPose = nullptr 
)
inherited

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

See: Maps and observations compatibility matrix

Definition at line 107 of file CMetricMap.cpp.

References MRPT_END, MRPT_START, and THROW_EXCEPTION.

Referenced by mrpt::slam::CMetricMapBuilderICP::processObservation().

Here is the caller graph for this function:

◆ insertPoint() [1/2]

void mrpt::maps::CPointsMap::insertPoint ( float  x,
float  y,
float  z = 0 
)
inline

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.

Definition at line 625 of file CPointsMap.h.

References insertPointFast(), and mark_as_modified().

Referenced by mrpt::slam::CGridMapAligner::AlignPDF_robustMatch(), extractCylinder(), mrpt::maps::COccupancyGridMap2D::getAsPointCloud(), insertPoint(), insertPointRGB(), run_pc_filter_test(), mrpt::maps::CColouredPointsMap::setFromPCLPointCloudRGB(), and mrpt::maps::CPointsMapXYZI::setFromPCLPointCloudXYZI().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insertPoint() [2/2]

void mrpt::maps::CPointsMap::insertPoint ( const mrpt::math::TPoint3D p)
inline

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 631 of file CPointsMap.h.

References insertPoint().

Here is the call graph for this function:

◆ insertPointFast()

virtual void mrpt::maps::CPointsMap::insertPointFast ( float  x,
float  y,
float  z = 0 
)
pure virtual

The virtual method for insertPoint() without calling mark_as_modified()

Implemented in mrpt::maps::CColouredPointsMap, mrpt::maps::CSimplePointsMap, mrpt::maps::CWeightedPointsMap, and mrpt::maps::CPointsMapXYZI.

Referenced by fuseWith(), insertPoint(), internal_insertObservation(), setFromPCLPointCloud(), and mrpt::nav::PlannerTPS_VirtualBase::transformPointcloudWithSquareClipping().

Here is the caller graph for this function:

◆ insertPointRGB()

virtual void mrpt::maps::CPointsMap::insertPointRGB ( float  x,
float  y,
float  z,
float  R,
float  G,
float  B 
)
inlinevirtual

overload (RGB data is ignored in classes without color information)

Reimplemented in mrpt::maps::CColouredPointsMap, and mrpt::maps::CPointsMapXYZI.

Definition at line 636 of file CPointsMap.h.

References G, insertPoint(), MRPT_UNUSED_PARAM, and R.

Referenced by extractPoints().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ internal_computeObservationLikelihood()

◆ internal_computeObservationLikelihoodPointCloud3D()

double CPointsMap::internal_computeObservationLikelihoodPointCloud3D ( const mrpt::poses::CPose3D pc_in_map,
const float *  xs,
const float *  ys,
const float *  zs,
const std::size_t  num_pts 
)

Definition at line 1425 of file CPointsMap.cpp.

References mrpt::poses::CPose3D::composePoint(), mrpt::maps::CPointsMap::TLikelihoodOptions::decimation, mrpt::math::KDTreeCapable< CPointsMap >::kdTreeClosestPoint3D(), mrpt::keep_min(), likelihoodOptions, mrpt::maps::CPointsMap::TLikelihoodOptions::max_corr_distance, MRPT_TRY_END, MRPT_TRY_START, mrpt::maps::CPointsMap::TLikelihoodOptions::sigma_dist, and mrpt::square().

Referenced by internal_computeObservationLikelihood().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ internal_insertObservation()

bool CPointsMap::internal_insertObservation ( const mrpt::obs::CObservation obs,
const mrpt::poses::CPose3D robotPose 
)
overrideprotectedvirtual

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::maps::CPointsMap for the enumeration of types of observations which are accepted.

Implements mrpt::maps::CMetricMap.

Definition at line 1792 of file CPointsMap.cpp.

References mrpt::obs::gnss::a1, mrpt::obs::gnss::a2, mrpt::maps::CPointsMap::TInsertionOptions::addToExistingPointsMap, applyDeletionMask(), ASSERT_, mrpt::poses::CPose3D::composePoint(), mrpt::maps::CPointsMap::TInsertionOptions::disableDeletion, fuseWith(), mrpt::maps::CPointsMap::TInsertionOptions::fuseWithExisting, mrpt::obs::CObservationVelodyneScan::generatePointCloud(), getPoint(), getPointsBuffer(), mrpt::maps::CPointsMap::TInsertionOptions::horizontalTolerance, insertAnotherMap(), insertionOptions, insertPointFast(), IS_CLASS, mrpt::maps::CPointsMap::TInsertionOptions::isPlanarMap, mrpt::obs::CObservation2DRangeScan::isPlanarScan(), mrpt::maps::CSimplePointsMap::loadFromRangeScan(), loadFromRangeScan(), loadFromVelodyneScan(), mark_as_modified(), mrpt::maps::CPointsMap::TInsertionOptions::minDistBetweenLaserPoints, MRPT_END, MRPT_START, mrpt::math::CPolygon::PointIntoPolygon(), reserve(), mrpt::round(), mrpt::obs::CObservationRange::sensorConeApperture, mrpt::math::CPolygon::setAllVertices(), size(), mrpt::math::TPoint3D_data::x, mrpt::math::TPoint3D_data::y, and mrpt::math::TPoint3D_data::z.

Here is the call graph for this function:

◆ isEmpty()

bool CPointsMap::isEmpty ( ) const
overridevirtual

Returns true if the map is empty/no observation has been inserted.

Implements mrpt::maps::CMetricMap.

Definition at line 597 of file CPointsMap.cpp.

Referenced by empty().

Here is the caller graph for this function:

◆ isFilterByHeightEnabled()

bool mrpt::maps::CPointsMap::isFilterByHeightEnabled ( ) const
inline

Return whether filter-by-height is enabled.

See also
enableFilterByHeight

Definition at line 944 of file CPointsMap.h.

References m_heightfilter_enabled.

◆ kdtree_distance()

float mrpt::maps::CPointsMap::kdtree_distance ( const float *  p1,
const size_t  idx_p2,
size_t  size 
) const
inline

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 1053 of file CPointsMap.h.

References m_x, m_y, and m_z.

◆ kdtree_get_bbox()

template<typename BBOX >
bool mrpt::maps::CPointsMap::kdtree_get_bbox ( BBOX &  bb) const
inline

Definition at line 1078 of file CPointsMap.h.

References boundingBox().

Here is the call graph for this function:

◆ kdtree_get_point_count()

size_t mrpt::maps::CPointsMap::kdtree_get_point_count ( ) const
inline

Must return the number of data points.

Definition at line 1037 of file CPointsMap.h.

References size().

Here is the call graph for this function:

◆ kdtree_get_pt()

float mrpt::maps::CPointsMap::kdtree_get_pt ( const size_t  idx,
int  dim 
) const
inline

Returns the dim'th component of the idx'th point in the class:

Definition at line 1039 of file CPointsMap.h.

References m_x, m_y, and m_z.

◆ kdtree_mark_as_outdated()

void mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdtree_mark_as_outdated ( ) const
inlineprotectedinherited

To be called by child classes when KD tree data changes.

Definition at line 721 of file KDTreeCapable.h.

Referenced by base_copyFrom(), and mark_as_modified().

◆ kdTreeClosestPoint2D() [1/3]

size_t mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdTreeClosestPoint2D ( float  x0,
float  y0,
float &  out_x,
float &  out_y,
float &  out_dist_sqr 
) const
inlineinherited

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:

  • It is called for the first time
  • The map has changed
  • The KD-tree was build for 3D.
Parameters
x0The X coordinate of the query.
y0The Y coordinate of the query.
out_xThe X coordinate of the found closest correspondence.
out_yThe Y coordinate of the found closest correspondence.
out_dist_sqrThe square distance between the query and the returned point.
Returns
The index of the closest point in the map array.
See also
kdTreeClosestPoint3D, kdTreeTwoClosestPoint2D

Definition at line 136 of file KDTreeCapable.h.

Referenced by internal_computeObservationLikelihood().

◆ kdTreeClosestPoint2D() [2/3]

size_t mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdTreeClosestPoint2D ( float  x0,
float  y0,
float &  out_dist_sqr 
) const
inlineinherited

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 163 of file KDTreeCapable.h.

◆ kdTreeClosestPoint2D() [3/3]

size_t mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdTreeClosestPoint2D ( const TPoint2D p0,
TPoint2D pOut,
float &  outDistSqr 
) const
inlineinherited

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 185 of file KDTreeCapable.h.

◆ kdTreeClosestPoint2DsqrError() [1/2]

float mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdTreeClosestPoint2DsqrError ( float  x0,
float  y0 
) const
inlineinherited

Like kdTreeClosestPoint2D, but just return the square error from some point to its closest neighbor.

Definition at line 200 of file KDTreeCapable.h.

Referenced by squareDistanceToClosestCorrespondence().

◆ kdTreeClosestPoint2DsqrError() [2/2]

float mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdTreeClosestPoint2DsqrError ( const TPoint2D p0) const
inlineinherited

Definition at line 207 of file KDTreeCapable.h.

◆ kdTreeClosestPoint3D() [1/3]

size_t mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdTreeClosestPoint3D ( float  x0,
float  y0,
float  z0,
float &  out_x,
float &  out_y,
float &  out_z,
float &  out_dist_sqr 
) const
inlineinherited

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:

  • It is called for the first time
  • The map has changed
  • The KD-tree was build for 2D.
Parameters
x0The X coordinate of the query.
y0The Y coordinate of the query.
z0The Z coordinate of the query.
out_xThe X coordinate of the found closest correspondence.
out_yThe Y coordinate of the found closest correspondence.
out_zThe Z coordinate of the found closest correspondence.
out_dist_sqrThe square distance between the query and the returned point.
Returns
The index of the closest point in the map array.
See also
kdTreeClosestPoint2D

Definition at line 409 of file KDTreeCapable.h.

Referenced by determineMatching3D(), and internal_computeObservationLikelihoodPointCloud3D().

◆ kdTreeClosestPoint3D() [2/3]

size_t mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdTreeClosestPoint3D ( float  x0,
float  y0,
float  z0,
float &  out_dist_sqr 
) const
inlineinherited

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 437 of file KDTreeCapable.h.

◆ kdTreeClosestPoint3D() [3/3]

size_t mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdTreeClosestPoint3D ( const TPoint3D p0,
TPoint3D pOut,
float &  outDistSqr 
) const
inlineinherited

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 459 of file KDTreeCapable.h.

◆ kdTreeEnsureIndexBuilt2D()

void mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdTreeEnsureIndexBuilt2D ( )
inlineinherited

Definition at line 715 of file KDTreeCapable.h.

◆ kdTreeEnsureIndexBuilt3D()

void mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdTreeEnsureIndexBuilt3D ( )
inlineinherited

Definition at line 714 of file KDTreeCapable.h.

◆ kdTreeNClosestPoint2D() [1/2]

std::vector<size_t> mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::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
inlineinherited

KD Tree-based search for the N closest point to some given 2D coordinates.

This method automatically build the "m_kdtree_data" structure when:

  • It is called for the first time
  • The map has changed
  • The KD-tree was build for 3D.
Parameters
x0The X coordinate of the query.
y0The Y coordinate of the query.
NThe number of closest points to search.
out_xThe vector containing the X coordinates of the correspondences.
out_yThe vector containing the Y coordinates of the correspondences.
out_dist_sqrThe vector containing the square distance between the query and the returned points.
Returns
The list of indices
See also
kdTreeClosestPoint2D
kdTreeTwoClosestPoint2D

Definition at line 298 of file KDTreeCapable.h.

◆ kdTreeNClosestPoint2D() [2/2]

std::vector<size_t> mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdTreeNClosestPoint2D ( const TPoint2D p0,
size_t  N,
std::vector< TPoint2D > &  pOut,
std::vector< float > &  outDistSqr 
) const
inlineinherited

Definition at line 328 of file KDTreeCapable.h.

◆ kdTreeNClosestPoint2DIdx() [1/2]

void mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdTreeNClosestPoint2DIdx ( float  x0,
float  y0,
size_t  knn,
std::vector< size_t > &  out_idx,
std::vector< float > &  out_dist_sqr 
) const
inlineinherited

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:

  • It is called for the first time
  • The map has changed
  • The KD-tree was build for 3D.
Parameters
x0The X coordinate of the query.
y0The Y coordinate of the query.
NThe number of closest points to search.
out_idxThe indexes of the found closest correspondence.
out_dist_sqrThe square distance between the query and the returned point.
See also
kdTreeClosestPoint2D

Definition at line 361 of file KDTreeCapable.h.

◆ kdTreeNClosestPoint2DIdx() [2/2]

void mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdTreeNClosestPoint2DIdx ( const TPoint2D p0,
size_t  N,
std::vector< size_t > &  outIdx,
std::vector< float > &  outDistSqr 
) const
inlineinherited

Definition at line 381 of file KDTreeCapable.h.

◆ kdTreeNClosestPoint3D() [1/2]

void mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::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
inlineinherited

KD Tree-based search for the N closest points to some given 3D coordinates.

This method automatically build the "m_kdtree_data" structure when:

  • It is called for the first time
  • The map has changed
  • The KD-tree was build for 2D.
Parameters
x0The X coordinate of the query.
y0The Y coordinate of the query.
z0The Z coordinate of the query.
NThe number of closest points to search.
out_xThe vector containing the X coordinates of the correspondences.
out_yThe vector containing the Y coordinates of the correspondences.
out_zThe vector containing the Z coordinates of the correspondences.
out_dist_sqrThe vector containing the square distance between the query and the returned points.
See also
kdTreeNClosestPoint2D

Definition at line 494 of file KDTreeCapable.h.

◆ kdTreeNClosestPoint3D() [2/2]

void mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdTreeNClosestPoint3D ( const TPoint3D p0,
size_t  N,
std::vector< TPoint3D > &  pOut,
std::vector< float > &  outDistSqr 
) const
inlineinherited

Definition at line 581 of file KDTreeCapable.h.

◆ kdTreeNClosestPoint3DIdx() [1/2]

void mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdTreeNClosestPoint3DIdx ( float  x0,
float  y0,
float  z0,
size_t  knn,
std::vector< size_t > &  out_idx,
std::vector< float > &  out_dist_sqr 
) const
inlineinherited

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:

  • It is called for the first time
  • The map has changed
  • The KD-tree was build for 2D.
Parameters
x0The X coordinate of the query.
y0The Y coordinate of the query.
z0The Z coordinate of the query.
NThe number of closest points to search.
out_idxThe indexes of the found closest correspondence.
out_dist_sqrThe square distance between the query and the returned point.
See also
kdTreeClosestPoint2D, kdTreeRadiusSearch3D

Definition at line 685 of file KDTreeCapable.h.

◆ kdTreeNClosestPoint3DIdx() [2/2]

void mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdTreeNClosestPoint3DIdx ( const TPoint3D p0,
size_t  N,
std::vector< size_t > &  outIdx,
std::vector< float > &  outDistSqr 
) const
inlineinherited

Definition at line 705 of file KDTreeCapable.h.

◆ kdTreeNClosestPoint3DWithIdx()

void mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdTreeNClosestPoint3DWithIdx ( 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< size_t > &  out_idx,
std::vector< float > &  out_dist_sqr 
) const
inlineinherited

KD Tree-based search for the N closest points to some given 3D coordinates.

This method automatically build the "m_kdtree_data" structure when:

  • It is called for the first time
  • The map has changed
  • The KD-tree was build for 2D.
Parameters
x0The X coordinate of the query.
y0The Y coordinate of the query.
z0The Z coordinate of the query.
NThe number of closest points to search.
out_xThe vector containing the X coordinates of the correspondences.
out_yThe vector containing the Y coordinates of the correspondences.
out_zThe vector containing the Z coordinates of the correspondences.
out_idxThe vector containing the indexes of the correspondences.
out_dist_sqrThe vector containing the square distance between the query and the returned points.
See also
kdTreeNClosestPoint2D

Definition at line 549 of file KDTreeCapable.h.

Referenced by compute3DDistanceToMesh().

◆ kdTreeRadiusSearch2D()

size_t mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdTreeRadiusSearch2D ( const float  x0,
const float  y0,
const float  maxRadiusSqr,
std::vector< std::pair< size_t, float >> &  out_indices_dist 
) const
inlineinherited

KD Tree-based search for all the points within a given radius of some 2D point.

This method automatically build the "m_kdtree_data" structure when:

  • It is called for the first time
  • The map has changed
  • The KD-tree was build for 3D.
Parameters
x0The X coordinate of the query.
y0The Y coordinate of the query.
maxRadiusSqrThe square of the desired search radius.
out_indices_distThe output list, with pairs of indeces/squared distances for the found correspondences.
Returns
Number of found points.
See also
kdTreeRadiusSearch3D, kdTreeNClosestPoint2DIdx

Definition at line 650 of file KDTreeCapable.h.

◆ kdTreeRadiusSearch3D()

size_t mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdTreeRadiusSearch3D ( const float  x0,
const float  y0,
const float  z0,
const float  maxRadiusSqr,
std::vector< std::pair< size_t, float >> &  out_indices_dist 
) const
inlineinherited

KD Tree-based search for all the points within a given radius of some 3D point.

This method automatically build the "m_kdtree_data" structure when:

  • It is called for the first time
  • The map has changed
  • The KD-tree was build for 2D.
Parameters
x0The X coordinate of the query.
y0The Y coordinate of the query.
z0The Z coordinate of the query.
maxRadiusSqrThe square of the desired search radius.
out_indices_distThe output list, with pairs of indeces/squared distances for the found correspondences.
Returns
Number of found points.
See also
kdTreeRadiusSearch2D, kdTreeNClosestPoint3DIdx

Definition at line 615 of file KDTreeCapable.h.

◆ kdTreeTwoClosestPoint2D() [1/2]

void mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::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
inlineinherited

KD Tree-based search for the TWO closest point to some given 2D coordinates.

This method automatically build the "m_kdtree_data" structure when:

  • It is called for the first time
  • The map has changed
  • The KD-tree was build for 3D.
Parameters
x0The X coordinate of the query.
y0The Y coordinate of the query.
out_x1The X coordinate of the first correspondence.
out_y1The Y coordinate of the first correspondence.
out_x2The X coordinate of the second correspondence.
out_y2The Y coordinate of the second correspondence.
out_dist_sqr1The square distance between the query and the first returned point.
out_dist_sqr2The square distance between the query and the second returned point.
See also
kdTreeClosestPoint2D

Definition at line 233 of file KDTreeCapable.h.

Referenced by squareDistanceToClosestCorrespondence().

◆ kdTreeTwoClosestPoint2D() [2/2]

void mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdTreeTwoClosestPoint2D ( const TPoint2D p0,
TPoint2D pOut1,
TPoint2D pOut2,
float &  outDistSqr1,
float &  outDistSqr2 
) const
inlineinherited

Definition at line 264 of file KDTreeCapable.h.

◆ load2D_from_text_file()

bool mrpt::maps::CPointsMap::load2D_from_text_file ( const std::string file)
inline

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 369 of file CPointsMap.h.

References load2Dor3D_from_text_file().

Here is the call graph for this function:

◆ load2Dor3D_from_text_file()

bool CPointsMap::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

Definition at line 108 of file CPointsMap.cpp.

References mrpt::containers::clear(), mrpt::system::os::fclose(), mrpt::system::os::fopen(), MRPT_END, and MRPT_START.

Referenced by load2D_from_text_file(), and load3D_from_text_file().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load3D_from_text_file()

bool mrpt::maps::CPointsMap::load3D_from_text_file ( const std::string file)
inline

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 378 of file CPointsMap.h.

References load2Dor3D_from_text_file().

Here is the call graph for this function:

◆ loadFromPlyFile()

bool PLY_Importer::loadFromPlyFile ( const std::string filename,
std::vector< std::string > *  file_comments = nullptr,
std::vector< std::string > *  file_obj_info = nullptr 
)
inherited

Loads from a PLY file.

Parameters
[in]filenameThe filename to open. It can be either in binary or text format.
[out]file_commentsIf provided (!=nullptr) the list of comment strings stored in the file will be returned.
[out]file_obj_infoIf provided (!=nullptr) the list of "object info" strings stored in the file will be returned.
Returns
false on any error in the file format or reading it. To obtain more details on the error you can call getLoadPLYErrorString()

Definition at line 1845 of file PLY_import_export.cpp.

References TVertex::b, TVertex::g, TVertex::intensity, ply_close(), ply_get_comments(), ply_get_element(), ply_get_element_description(), ply_get_obj_info(), ply_get_property(), ply_open_for_reading(), TVertex::r, VAL_NOT_SET, vert_props, TVertex::x, TVertex::y, and TVertex::z.

Here is the call graph for this function:

◆ loadFromProbabilisticPosesAndObservations()

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

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

This is done invoking insertObservation() for each observation at the mean 3D robot pose of each pose-observations pair in the CSimpleMap object.

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

Definition at line 36 of file CMetricMap.cpp.

References ASSERTMSG_, mrpt::containers::clear(), mrpt::maps::CSimpleMap::get(), and mrpt::maps::CSimpleMap::size().

Referenced by mrpt::maps::CMetricMap::loadFromSimpleMap(), and run_test_pf_localization().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadFromRangeScan() [1/2]

virtual void mrpt::maps::CPointsMap::loadFromRangeScan ( const mrpt::obs::CObservation2DRangeScan rangeScan,
const mrpt::poses::CPose3D robotPose = nullptr 
)
pure virtual

Transform the range scan into a set of cartessian coordinated points.

The options in "insertionOptions" are considered in this method.

Parameters
rangeScanThe scan to be inserted into this map
robotPoseDefault to (0,0,0|0deg,0deg,0deg). Changes the frame of reference for the point cloud (i.e. the vehicle/robot pose in world coordinates).

Only ranges marked as "valid=true" in the observation will be inserted

Note
Each derived class may enrich points in different ways (color, weight, etc..), so please refer to the description of the specific implementation of mrpt::maps::CPointsMap you are using.
The actual generic implementation of this file lives in <src>/CPointsMap_crtp_common.h, but specific instantiations are generated at each derived class.
See also
CObservation2DRangeScan, CObservation3DRangeScan

Implemented in mrpt::maps::CColouredPointsMap, mrpt::maps::CWeightedPointsMap, mrpt::maps::CSimplePointsMap, and mrpt::maps::CPointsMapXYZI.

Referenced by internal_insertObservation().

Here is the caller graph for this function:

◆ loadFromRangeScan() [2/2]

virtual void mrpt::maps::CPointsMap::loadFromRangeScan ( const mrpt::obs::CObservation3DRangeScan rangeScan,
const mrpt::poses::CPose3D robotPose = nullptr 
)
pure virtual

Overload of loadFromRangeScan() for 3D range scans (for example, Kinect observations).

Parameters
rangeScanThe scan to be inserted into this map
robotPoseDefault to (0,0,0|0deg,0deg,0deg). Changes the frame of reference for the point cloud (i.e. the vehicle/robot pose in world coordinates).
Note
Each derived class may enrich points in different ways (color, weight, etc..), so please refer to the description of the specific implementation of mrpt::maps::CPointsMap you are using.
The actual generic implementation of this file lives in <src>/CPointsMap_crtp_common.h, but specific instantiations are generated at each derived class.
See also
loadFromVelodyneScan

Implemented in mrpt::maps::CColouredPointsMap, mrpt::maps::CWeightedPointsMap, mrpt::maps::CSimplePointsMap, and mrpt::maps::CPointsMapXYZI.

◆ loadFromSimpleMap()

void mrpt::maps::CMetricMap::loadFromSimpleMap ( const mrpt::maps::CSimpleMap Map)
inlineinherited

!

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

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

Referenced by mrpt::maps::CRandomFieldGridMap2D::internal_clear().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadFromVelodyneScan()

void CPointsMap::loadFromVelodyneScan ( const mrpt::obs::CObservationVelodyneScan scan,
const mrpt::poses::CPose3D robotPose = nullptr 
)

Like loadFromRangeScan() for Velodyne 3D scans.

Points are translated and rotated according to the sensorPose field in the observation and, if provided, to the robotPose parameter.

Parameters
scanThe Raw LIDAR data to be inserted into this map. It MUST contain point cloud data, generated by calling to mrpt::obs::CObservationVelodyneScan::generatePointCloud() prior to insertion in this map.
robotPoseDefault to (0,0,0|0deg,0deg,0deg). Changes the frame of reference for the point cloud (i.e. the vehicle/robot pose in world coordinates).
See also
loadFromRangeScan

Definition at line 2164 of file CPointsMap.cpp.

References mrpt::maps::CPointsMap::TInsertionOptions::addToExistingPointsMap, ASSERT_EQUAL_, mrpt::poses::CPose3D::getHomogeneousMatrix(), insertionOptions, mrpt::obs::CObservationVelodyneScan::TPointCloud::intensity, mark_as_modified(), mrpt::obs::CObservationVelodyneScan::point_cloud, resize(), mrpt::obs::CObservationVelodyneScan::sensorPose, setPointRGB(), mrpt::obs::CObservationVelodyneScan::TPointCloud::size(), size(), mrpt::obs::CObservationVelodyneScan::TPointCloud::x, mrpt::obs::CObservationVelodyneScan::TPointCloud::y, and mrpt::obs::CObservationVelodyneScan::TPointCloud::z.

Referenced by mrpt::maps::CHeightGridMap2D_Base::dem_internal_insertObservation(), and internal_insertObservation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadPCDFile()

bool CPointsMap::loadPCDFile ( const std::string filename)
virtual

Load the point cloud from a PCL PCD file (requires MRPT built against PCL)

Returns
false on any error

Definition at line 1690 of file CPointsMap.cpp.

References getPCLPointCloud(), MRPT_UNUSED_PARAM, and THROW_EXCEPTION.

Here is the call graph for this function:

◆ mark_as_modified()

void mrpt::maps::CPointsMap::mark_as_modified ( ) const
inline

Users normally don't need to call this.

Called by this class or children classes, set m_largestDistanceFromOriginIsUpdated=false, invalidates the kd-tree cache, and such.

Definition at line 1095 of file CPointsMap.h.

References mrpt::math::KDTreeCapable< CPointsMap >::kdtree_mark_as_outdated(), m_boundingBoxIsUpdated, and m_largestDistanceFromOriginIsUpdated.

Referenced by addFrom(), applyDeletionMask(), fuseWith(), insertAnotherMap(), insertPoint(), internal_insertObservation(), loadFromVelodyneScan(), setAllPointsTemplate(), and setPoint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator+=()

void mrpt::maps::CPointsMap::operator+= ( const CPointsMap anotherMap)
inline

This operator is synonymous with addFrom.

See also
addFrom

Definition at line 346 of file CPointsMap.h.

References addFrom().

Here is the call graph for this function:

◆ operator=()

CPointsMap& mrpt::maps::CPointsMap::operator= ( const CPointsMap o)
inline

Definition at line 120 of file CPointsMap.h.

References impl_copyFrom().

Referenced by mrpt::maps::CSimplePointsMap::CSimplePointsMap(), mrpt::maps::CWeightedPointsMap::CWeightedPointsMap(), mrpt::maps::CColouredPointsMap::operator=(), mrpt::maps::CWeightedPointsMap::operator=(), and mrpt::maps::CSimplePointsMap::operator=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PLY_export_get_face_count()

size_t mrpt::maps::CPointsMap::PLY_export_get_face_count ( ) const
inlineoverrideprotectedvirtual

In a base class, return the number of faces.

Implements mrpt::opengl::PLY_Exporter.

Definition at line 1158 of file CPointsMap.h.

◆ PLY_export_get_vertex()

void CPointsMap::PLY_export_get_vertex ( const size_t  idx,
mrpt::math::TPoint3Df pt,
bool &  pt_has_color,
mrpt::img::TColorf pt_color 
) const
overrideprotectedvirtual

In a base class, will be called after PLY_export_get_vertex_count() once for each exported point.

Parameters
pt_colorWill be nullptr if the loaded file does not provide color info.

Implements mrpt::opengl::PLY_Exporter.

Reimplemented in mrpt::maps::CPointsMapXYZI.

Definition at line 1634 of file CPointsMap.cpp.

References m_x, m_y, m_z, MRPT_UNUSED_PARAM, mrpt::math::TPoint3Df::x, mrpt::math::TPoint3Df::y, and mrpt::math::TPoint3Df::z.

◆ PLY_export_get_vertex_count()

size_t CPointsMap::PLY_export_get_vertex_count ( ) const
overrideprotectedvirtual

In a base class, return the number of vertices.

Implements mrpt::opengl::PLY_Exporter.

Definition at line 1629 of file CPointsMap.cpp.

References size().

Here is the call graph for this function:

◆ PLY_import_set_face_count()

void mrpt::maps::CPointsMap::PLY_import_set_face_count ( const size_t  N)
inlineoverrideprotectedvirtual

In a base class, reserve memory to prepare subsequent calls to PLY_import_set_face.

Implements mrpt::opengl::PLY_Importer.

Definition at line 1140 of file CPointsMap.h.

References MRPT_UNUSED_PARAM.

◆ PLY_import_set_vertex()

void CPointsMap::PLY_import_set_vertex ( const size_t  idx,
const mrpt::math::TPoint3Df pt,
const mrpt::img::TColorf pt_color = nullptr 
)
overrideprotectedvirtual

In a base class, will be called after PLY_import_set_vertex_count() once for each loaded point.

Parameters
pt_colorWill be nullptr if the loaded file does not provide color info.

Implements mrpt::opengl::PLY_Importer.

Reimplemented in mrpt::maps::CPointsMapXYZI.

Definition at line 1620 of file CPointsMap.cpp.

References MRPT_UNUSED_PARAM, setPoint(), mrpt::math::TPoint3Df::x, mrpt::math::TPoint3Df::y, and mrpt::math::TPoint3Df::z.

Here is the call graph for this function:

◆ PLY_import_set_vertex_count()

virtual void mrpt::opengl::PLY_Importer::PLY_import_set_vertex_count ( const size_t  N)
protectedpure virtualinherited

In a base class, reserve memory to prepare subsequent calls to PLY_import_set_vertex.

Implemented in mrpt::maps::CColouredPointsMap, mrpt::opengl::CPointCloudColoured, mrpt::maps::CPointsMapXYZI, mrpt::maps::CWeightedPointsMap, mrpt::maps::CSimplePointsMap, and mrpt::opengl::CPointCloud.

◆ publishEvent()

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

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

Definition at line 48 of file CObservable.cpp.

References MRPT_END, and MRPT_START.

Referenced by mrpt::gui::CDisplayWindow3D::internal_emitGrabImageEvent(), mrpt::gui::CWindowDialog::OnChar(), mrpt::gui::CWindowDialog::OnClose(), mrpt::gui::C3DWindowDialog::OnClose(), mrpt::gui::CWindowDialog::OnMouseDown(), mrpt::gui::CWindowDialog::OnMouseMove(), mrpt::gui::CWindowDialog::OnResize(), mrpt::gui::C3DWindowDialog::OnResize(), and mrpt::opengl::COpenGLViewport::render().

Here is the caller graph for this function:

◆ reserve()

virtual void mrpt::maps::CPointsMap::reserve ( size_t  newLength)
pure 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.

Implemented in mrpt::maps::CColouredPointsMap, mrpt::maps::CSimplePointsMap, mrpt::maps::CWeightedPointsMap, and mrpt::maps::CPointsMapXYZI.

Referenced by fuseWith(), internal_insertObservation(), setFromPCLPointCloud(), and mrpt::nav::PlannerTPS_VirtualBase::transformPointcloudWithSquareClipping().

Here is the caller graph for this function:

◆ resize()

virtual void mrpt::maps::CPointsMap::resize ( size_t  newLength)
pure 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.

See also
reserve, setPoint, setPointFast, setSize

Implemented in mrpt::maps::CColouredPointsMap, mrpt::maps::CSimplePointsMap, mrpt::maps::CWeightedPointsMap, and mrpt::maps::CPointsMapXYZI.

Referenced by addFrom(), applyDeletionMask(), base_copyFrom(), insertAnotherMap(), loadFromVelodyneScan(), and mrpt::opengl::PointCloudAdapter< mrpt::maps::CPointsMap >::resize().

Here is the caller graph for this function:

◆ save2D_to_text_file()

bool CPointsMap::save2D_to_text_file ( const std::string file) const

Save to a text file.

Each line will contain "X Y" point coordinates. Returns false if any error occured, true elsewere.

Definition at line 74 of file CPointsMap.cpp.

References mrpt::system::os::fclose(), mrpt::system::os::fopen(), and mrpt::system::os::fprintf().

Here is the call graph for this function:

◆ save3D_to_text_file()

bool CPointsMap::save3D_to_text_file ( const std::string file) const

Save to a text file.

Each line will contain "X Y Z" point coordinates. Returns false if any error occured, true elsewere.

Definition at line 91 of file CPointsMap.cpp.

References mrpt::system::os::fclose(), mrpt::system::os::fopen(), and mrpt::system::os::fprintf().

Referenced by saveMetricMapRepresentationToFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveMetricMapRepresentationToFile()

void mrpt::maps::CPointsMap::saveMetricMapRepresentationToFile ( const std::string filNamePrefix) const
inlineoverridevirtual

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::maps::CMetricMap.

Definition at line 401 of file CPointsMap.h.

References save3D_to_text_file().

Here is the call graph for this function:

◆ savePCDFile()

bool CPointsMap::savePCDFile ( const std::string filename,
bool  save_as_binary 
) const
virtual

Save the point cloud as a PCL PCD file, in either ASCII or binary format (requires MRPT built against PCL)

Save the point cloud as a PCL PCD file, in either ASCII or binary format.

Returns
false on any error

Reimplemented in mrpt::maps::CColouredPointsMap, and mrpt::maps::CPointsMapXYZI.

Definition at line 1672 of file CPointsMap.cpp.

References getPCLPointCloud(), MRPT_UNUSED_PARAM, and THROW_EXCEPTION.

Here is the call graph for this function:

◆ saveToPlyFile()

bool PLY_Exporter::saveToPlyFile ( const std::string filename,
bool  save_in_binary = false,
const std::vector< std::string > &  file_comments = std::vector<std::string>(),
const std::vector< std::string > &  file_obj_info = std::vector<std::string>() 
) const
inherited

Saves to a PLY file.

Parameters
[in]filenameThe filename to be saved.
[in]file_commentsIf provided (!=nullptr) the list of comment strings stored in the file will be returned.
[in]file_obj_infoIf provided (!=nullptr) the list of "object info" strings stored in the file will be returned.
Returns
false on any error writing the file. To obtain more details on the error you can call getSavePLYErrorString()

Definition at line 1946 of file PLY_import_export.cpp.

References mrpt::img::TColorf::B, face_props, mrpt::img::TColorf::G, TVertex::intensity, PLY_ASCII, PLY_BINARY_BE, PLY_BINARY_LE, ply_close(), ply_describe_property(), ply_element_count(), ply_header_complete(), ply_open_for_writing(), ply_put_comment(), ply_put_element(), ply_put_element_setup(), ply_put_obj_info(), mrpt::img::TColorf::R, vert_props, mrpt::math::TPoint3Df::x, TVertex::x, mrpt::math::TPoint3Df::y, TVertex::y, mrpt::math::TPoint3Df::z, and TVertex::z.

Here is the call graph for this function:

◆ serializeFrom() [1/2]

virtual void mrpt::serialization::CSerializable::serializeFrom ( CArchive in,
uint8_t  serial_version 
)
protectedpure virtualinherited

Pure virtual method for reading (deserializing) from an abstract archive.

Users don't call this method directly. Instead, use stream >> object;.

Parameters
inThe input binary stream where the object data must read from.
versionThe version of the object stored in the stream: use this version number in your code to know how to read the incoming data.
Exceptions
std::exceptionOn any I/O error

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

◆ serializeFrom() [2/2]

virtual void mrpt::serialization::CSerializable::serializeFrom ( CSchemeArchiveBase in)
inlineprotectedvirtualinherited

Virtual method for reading (deserializing) from an abstract schema based archive.

Definition at line 74 of file CSerializable.h.

References mrpt::serialization::CSerializable::GetRuntimeClass(), and THROW_EXCEPTION.

Here is the call graph for this function:

◆ serializeGetVersion()

virtual uint8_t mrpt::serialization::CSerializable::serializeGetVersion ( ) const
protectedpure virtualinherited

Must return the current versioning number of the object.

Start in zero for new classes, and increments each time there is a change in the stored format.

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

Referenced by mrpt::serialization::CArchive::WriteObject().

Here is the caller graph for this function:

◆ serializeTo() [1/2]

virtual void mrpt::serialization::CSerializable::serializeTo ( CArchive out) const
protectedpure virtualinherited

Pure virtual method for writing (serializing) to an abstract archive.

Users don't call this method directly. Instead, use stream << object;.

Exceptions
std::exceptionOn any I/O error

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

Referenced by mrpt::serialization::CArchive::WriteObject().

Here is the caller graph for this function:

◆ serializeTo() [2/2]

virtual void mrpt::serialization::CSerializable::serializeTo ( CSchemeArchiveBase out) const
inlineprotectedvirtualinherited

Virtual method for writing (serializing) to an abstract schema based archive.

Definition at line 64 of file CSerializable.h.

References mrpt::serialization::CSerializable::GetRuntimeClass(), and THROW_EXCEPTION.

Here is the call graph for this function:

◆ setAllPoints() [1/2]

void mrpt::maps::CPointsMap::setAllPoints ( const std::vector< float > &  X,
const std::vector< float > &  Y,
const std::vector< float > &  Z 
)
inline

Set all the points at once from vectors with X,Y and Z coordinates.

See also
getAllPoints

Definition at line 674 of file CPointsMap.h.

References setAllPointsTemplate().

Referenced by mrpt::detectors::CFaceDetection::experimental_viewFacePointsAndEigenVects(), mrpt::detectors::CFaceDetection::experimental_viewFacePointsScanned(), and mrpt::detectors::CFaceDetection::experimental_viewRegions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAllPoints() [2/2]

void mrpt::maps::CPointsMap::setAllPoints ( const std::vector< float > &  X,
const std::vector< float > &  Y 
)
inline

Set all the points at once from vectors with X and Y coordinates (Z=0).

See also
getAllPoints

Definition at line 683 of file CPointsMap.h.

References setAllPointsTemplate().

Here is the call graph for this function:

◆ setAllPointsTemplate()

template<typename VECTOR >
void mrpt::maps::CPointsMap::setAllPointsTemplate ( const VECTOR &  X,
const VECTOR &  Y,
const VECTOR &  Z = VECTOR() 
)
inline

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

Template Parameters
VECTORcan be mrpt::math::CVectorFloat or std::vector<float> or any other column or row Eigen::Matrix.

Definition at line 651 of file CPointsMap.h.

References ASSERT_, ASSERT_EQUAL_, mark_as_modified(), setPointFast(), and setSize().

Referenced by setAllPoints().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFromPCLPointCloud()

template<class POINTCLOUD >
void mrpt::maps::CPointsMap::setFromPCLPointCloud ( const POINTCLOUD &  cloud)
inline

Loads a PCL point cloud into this MRPT class (note: this method ignores potential RGB information, see CColouredPointsMap::setFromPCLPointCloudRGB() ).

Usage example:

pcl::PointCloud<pcl::PointXYZ> cloud;
mrpt::maps::CPointsCloud pc;
pc.setFromPCLPointCloud(cloud);
See also
getPCLPointCloud, CColouredPointsMap::setFromPCLPointCloudRGB()

Definition at line 1020 of file CPointsMap.h.

References mrpt::maps::CMetricMap::clear(), insertPointFast(), and reserve().

Here is the call graph for this function:

◆ setHeightFilterLevels()

void mrpt::maps::CPointsMap::setHeightFilterLevels ( const double  _z_min,
const double  _z_max 
)
inline

Set the min/max Z levels for points to be actually inserted in the map (only if enableFilterByHeight() was called before).

Definition at line 951 of file CPointsMap.h.

References m_heightfilter_z_max, and m_heightfilter_z_min.

◆ setPoint() [1/4]

void mrpt::maps::CPointsMap::setPoint ( size_t  index,
float  x,
float  y,
float  z 
)
inline

Changes a given point from map, with Z defaulting to 0 if not provided.

Exceptions
Throwsstd::exception on index out of bound.

Definition at line 474 of file CPointsMap.h.

References ASSERT_BELOW_, mark_as_modified(), setPointFast(), and size().

Referenced by PLY_import_set_vertex(), ransac_data_assoc_run(), setPoint(), and setPointRGB().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPoint() [2/4]

void mrpt::maps::CPointsMap::setPoint ( size_t  index,
const mrpt::math::TPoint2D p 
)
inline

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 481 of file CPointsMap.h.

References setPoint().

Here is the call graph for this function:

◆ setPoint() [3/4]

void mrpt::maps::CPointsMap::setPoint ( size_t  index,
const mrpt::math::TPoint3D p 
)
inline

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 486 of file CPointsMap.h.

References setPoint().

Here is the call graph for this function:

◆ setPoint() [4/4]

void mrpt::maps::CPointsMap::setPoint ( size_t  index,
float  x,
float  y 
)
inline

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 491 of file CPointsMap.h.

References setPoint().

Here is the call graph for this function:

◆ setPointAllFields()

void mrpt::maps::CPointsMap::setPointAllFields ( const size_t  index,
const std::vector< float > &  point_data 
)
inline

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

See also
setPointAllFields, getPointAllFields, getPointAllFieldsFast

Definition at line 706 of file CPointsMap.h.

References ASSERT_BELOW_, setPointAllFieldsFast(), and size().

Here is the call graph for this function:

◆ setPointAllFieldsFast()

virtual void mrpt::maps::CPointsMap::setPointAllFieldsFast ( const size_t  index,
const std::vector< float > &  point_data 
)
pure virtual

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

See also
setPointAllFields, getPointAllFields, getPointAllFieldsFast

Implemented in mrpt::maps::CColouredPointsMap, mrpt::maps::CWeightedPointsMap, mrpt::maps::CSimplePointsMap, and mrpt::maps::CPointsMapXYZI.

Referenced by applyDeletionMask(), and setPointAllFields().

Here is the caller graph for this function:

◆ setPointFast()

void mrpt::maps::CPointsMap::setPointFast ( size_t  index,
float  x,
float  y,
float  z 
)
inline

Changes the coordinates of the given point (0-based index), without checking for out-of-bounds and without calling mark_as_modified().

Also, color, intensity, or other data is left unchanged.

See also
setPoint

Definition at line 159 of file CPointsMap.h.

References m_x, m_y, and m_z.

Referenced by insertAnotherMap(), setAllPointsTemplate(), setPoint(), mrpt::opengl::PointCloudAdapter< mrpt::maps::CSimplePointsMap >::setPointXYZ(), mrpt::opengl::PointCloudAdapter< mrpt::maps::CWeightedPointsMap >::setPointXYZ(), mrpt::opengl::PointCloudAdapter< mrpt::maps::CPointsMapXYZI >::setPointXYZ(), mrpt::opengl::PointCloudAdapter< mrpt::maps::CColouredPointsMap >::setPointXYZ(), and mrpt::opengl::PointCloudAdapter< mrpt::maps::CPointsMap >::setPointXYZ().

Here is the caller graph for this function:

◆ setPointRGB()

virtual void mrpt::maps::CPointsMap::setPointRGB ( size_t  index,
float  x,
float  y,
float  z,
float  R,
float  G,
float  B 
)
inlinevirtual

overload (RGB data is ignored in classes without color information)

Reimplemented in mrpt::maps::CColouredPointsMap, and mrpt::maps::CPointsMapXYZI.

Definition at line 496 of file CPointsMap.h.

References G, MRPT_UNUSED_PARAM, R, and setPoint().

Referenced by loadFromVelodyneScan().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPointWeight()

virtual void mrpt::maps::CPointsMap::setPointWeight ( size_t  index,
unsigned long  w 
)
inlinevirtual

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

See also
getPointWeight

Reimplemented in mrpt::maps::CWeightedPointsMap.

Definition at line 508 of file CPointsMap.h.

References MRPT_UNUSED_PARAM.

Referenced by fuseWith().

Here is the caller graph for this function:

◆ setSize()

virtual void mrpt::maps::CPointsMap::setSize ( size_t  newLength)
pure 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.

See also
reserve, setPoint, setPointFast, setSize

Implemented in mrpt::maps::CColouredPointsMap, mrpt::maps::CSimplePointsMap, mrpt::maps::CWeightedPointsMap, and mrpt::maps::CPointsMapXYZI.

Referenced by setAllPointsTemplate().

Here is the caller graph for this function:

◆ size()

size_t mrpt::maps::CPointsMap::size ( ) const
inline

Returns the number of stored points in the map.

Definition at line 422 of file CPointsMap.h.

References m_x.

Referenced by addFrom(), mrpt::maps::CPointsMapXYZI::addFrom_classSpecific(), mrpt::maps::CWeightedPointsMap::addFrom_classSpecific(), mrpt::maps::CColouredPointsMap::addFrom_classSpecific(), applyDeletionMask(), compute3DDistanceToMesh(), mrpt::maps::COccupancyGridMap2D::computeLikelihoodField_II(), mrpt::maps::COccupancyGridMap2D::computeLikelihoodField_Thrun(), mrpt::graphslam::deciders::CRangeScanOps< GRAPH_T >::decimatePointsMap(), mrpt::maps::CHeightGridMap2D_Base::dem_internal_insertObservation(), determineMatching3D(), mrpt::maps::CPointCloudFilterByDistance::filter(), fuseWith(), getPCLPointCloud(), mrpt::maps::CPointsMapXYZI::getPCLPointCloudXYZI(), mrpt::maps::CColouredPointsMap::getPCLPointCloudXYZRGB(), getPointAllFields(), insertAnotherMap(), mrpt::maps::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >::internal_build_PointCloud_for_observation(), internal_computeObservationLikelihood(), mrpt::maps::CColouredOctoMap::internal_insertObservation(), internal_insertObservation(), kdtree_get_point_count(), loadFromVelodyneScan(), PLY_export_get_vertex_count(), ransac_data_assoc_run(), run_pc_filter_test(), setPoint(), setPointAllFields(), mrpt::opengl::PointCloudAdapter< mrpt::maps::CSimplePointsMap >::size(), mrpt::opengl::PointCloudAdapter< mrpt::maps::CWeightedPointsMap >::size(), mrpt::opengl::PointCloudAdapter< mrpt::maps::CPointsMapXYZI >::size(), mrpt::opengl::PointCloudAdapter< mrpt::maps::CColouredPointsMap >::size(), mrpt::opengl::PointCloudAdapter< mrpt::maps::CPointsMap >::size(), and TEST().

Here is the caller graph for this function:

◆ squareDistanceToClosestCorrespondence()

float CPointsMap::squareDistanceToClosestCorrespondence ( float  x0,
float  y0 
) const
overridevirtual

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

Reimplemented from mrpt::maps::CMetricMap.

Definition at line 879 of file CPointsMap.cpp.

References ASSERT_, mrpt::math::closestFromPointToLine(), mrpt::math::KDTreeCapable< CPointsMap >::kdTreeClosestPoint2DsqrError(), mrpt::math::KDTreeCapable< CPointsMap >::kdTreeTwoClosestPoint2D(), and mrpt::square().

Referenced by squareDistanceToClosestCorrespondenceT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ squareDistanceToClosestCorrespondenceT()

float mrpt::maps::CPointsMap::squareDistanceToClosestCorrespondenceT ( const mrpt::math::TPoint2D p0) const
inline

Definition at line 208 of file CPointsMap.h.

References squareDistanceToClosestCorrespondence(), mrpt::math::TPoint2D_data::x, and mrpt::math::TPoint2D_data::y.

Here is the call graph for this function:

◆ writeToMatlab()

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

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

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

Definition at line 90 of file CSerializable.h.

Friends And Related Function Documentation

◆ detail::loadFromRangeImpl

template<class Derived >
friend struct detail::loadFromRangeImpl
friend

Definition at line 1175 of file CPointsMap.h.

◆ detail::pointmap_traits

template<class Derived >
friend struct detail::pointmap_traits
friend

Definition at line 1177 of file CPointsMap.h.

Member Data Documentation

◆ genericMapParams

◆ insertionOptions

◆ kdtree_search_params

TKDTreeSearchParams mrpt::math::KDTreeCapable< CPointsMap , float , nanoflann::L2_Simple_Adaptor<float , CPointsMap > >::kdtree_search_params
inherited

Parameters to tune the ANN searches.

Definition at line 114 of file KDTreeCapable.h.

◆ likelihoodOptions

TLikelihoodOptions mrpt::maps::CPointsMap::likelihoodOptions

◆ m_bb_max_x

float mrpt::maps::CPointsMap::m_bb_max_x
mutableprotected

Definition at line 1120 of file CPointsMap.h.

Referenced by boundingBox().

◆ m_bb_max_y

float mrpt::maps::CPointsMap::m_bb_max_y
mutableprotected

Definition at line 1120 of file CPointsMap.h.

Referenced by boundingBox().

◆ m_bb_max_z

float mrpt::maps::CPointsMap::m_bb_max_z
mutableprotected

Definition at line 1120 of file CPointsMap.h.

Referenced by boundingBox().

◆ m_bb_min_x

float mrpt::maps::CPointsMap::m_bb_min_x
mutableprotected

Definition at line 1120 of file CPointsMap.h.

Referenced by boundingBox().

◆ m_bb_min_y

float mrpt::maps::CPointsMap::m_bb_min_y
mutableprotected

Definition at line 1120 of file CPointsMap.h.

Referenced by boundingBox().

◆ m_bb_min_z

float mrpt::maps::CPointsMap::m_bb_min_z
mutableprotected

Definition at line 1120 of file CPointsMap.h.

Referenced by boundingBox().

◆ m_boundingBoxIsUpdated

bool mrpt::maps::CPointsMap::m_boundingBoxIsUpdated
mutableprotected

Definition at line 1119 of file CPointsMap.h.

Referenced by boundingBox(), and mark_as_modified().

◆ m_heightfilter_enabled

bool mrpt::maps::CPointsMap::m_heightfilter_enabled {false}
protected

Whether or not (default=not) filter the input points by height.

See also
m_heightfilter_z_min, m_heightfilter_z_max

Definition at line 1171 of file CPointsMap.h.

Referenced by enableFilterByHeight(), and isFilterByHeightEnabled().

◆ m_heightfilter_z_max

double mrpt::maps::CPointsMap::m_heightfilter_z_max {10}
protected

Definition at line 1167 of file CPointsMap.h.

Referenced by getHeightFilterLevels(), and setHeightFilterLevels().

◆ m_heightfilter_z_min

double mrpt::maps::CPointsMap::m_heightfilter_z_min {-10}
protected

The minimum and maximum height for a certain laser scan to be inserted into this map.

See also
m_heightfilter_enabled

Definition at line 1167 of file CPointsMap.h.

Referenced by getHeightFilterLevels(), and setHeightFilterLevels().

◆ m_largestDistanceFromOrigin

float mrpt::maps::CPointsMap::m_largestDistanceFromOrigin {0}
mutableprotected

Auxiliary variables used in "getLargestDistanceFromOrigin".

See also
getLargestDistanceFromOrigin

Definition at line 1112 of file CPointsMap.h.

Referenced by base_copyFrom(), getLargestDistanceFromOrigin(), and getLargestDistanceFromOriginNoRecompute().

◆ m_largestDistanceFromOriginIsUpdated

bool mrpt::maps::CPointsMap::m_largestDistanceFromOriginIsUpdated
mutableprotected

Auxiliary variables used in "getLargestDistanceFromOrigin".

See also
getLargestDistanceFromOrigin

Definition at line 1117 of file CPointsMap.h.

Referenced by base_copyFrom(), getLargestDistanceFromOrigin(), getLargestDistanceFromOriginNoRecompute(), and mark_as_modified().

◆ m_scans_sincos_cache

mrpt::obs::CSinCosLookUpTableFor2DScans mrpt::maps::CPointsMap::m_scans_sincos_cache
protected

Cache of sin/cos values for the latest 2D scan geometries.

Definition at line 1107 of file CPointsMap.h.

◆ m_x

◆ m_y

◆ m_z

◆ renderOptions

TRenderOptions mrpt::maps::CPointsMap::renderOptions

Definition at line 330 of file CPointsMap.h.

Referenced by getAs3DObject(), and TEST_F().

◆ runtimeClassId

const mrpt::rtti::TRuntimeClassId mrpt::maps::CPointsMap::runtimeClassId
staticprotected

Definition at line 70 of file CPointsMap.h.




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at dom jul 14 20:00:11 CEST 2019