MRPT
2.0.1
|
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans.
This class stores the coordinates (x,y,z) and a "weight", or counter of how many times that point has been seen, used only if points fusion is enabled in the options structure.
Definition at line 29 of file CWeightedPointsMap.h.
#include <mrpt/maps/CWeightedPointsMap.h>
Classes | |
struct | TMapDefinition |
struct | TMapDefinitionBase |
Public Types | |
using | self_t = KDTreeCapable< CPointsMap, float, nanoflann::L2_Simple_Adaptor< float, CPointsMap > > |
Public Member Functions | |
CWeightedPointsMap ()=default | |
Default constructor. More... | |
CWeightedPointsMap (const CPointsMap &o) | |
CWeightedPointsMap (const CWeightedPointsMap &o) | |
CWeightedPointsMap & | operator= (const CPointsMap &o) |
CWeightedPointsMap & | operator= (const CWeightedPointsMap &o) |
void | setPointWeight (size_t index, unsigned long w) override |
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... | |
unsigned int | getPointWeight (size_t index) const override |
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... | |
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 |
Save the point cloud as a PCL PCD file, in either ASCII or binary format. 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, [[maybe_unused]] float R, [[maybe_unused]] float G, [[maybe_unused]] float B) |
overload (RGB data is ignored in classes without color information) More... | |
virtual void | setPointWeight ([[maybe_unused]] size_t index, [[maybe_unused]] 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 ([[maybe_unused]] 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, [[maybe_unused]] float R, [[maybe_unused]] float G, [[maybe_unused]] 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 ¶ms, 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 ¶ms, 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 ¶ms) 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... | |
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 by (pose compounding operator). More... | |
void | changeCoordinatesReference (const mrpt::poses::CPose3D &b) |
Replace each point by (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 by (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 ¢er, 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, double R=1, double G=1, 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::CSimplePointsMap * | getAsSimplePointsMap () const |
If the map is a simple points map or it's a multi-metric map that contains EXACTLY one simple points map, return it. More... | |
mrpt::maps::CSimplePointsMap * | getAsSimplePointsMap () |
virtual mxArray * | writeToMatlab () 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... | |
const CPointsMap & | derived () const |
CRTP helper method. More... | |
CPointsMap & | derived () |
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... | |
Pure virtual interfaces to be implemented by any class derived | |
from CPointsMap | |
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... | |
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... | |
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 | |
void | internal_clear () override |
Clear the map, erasing all the points. More... | |
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... | |
CSerializable virtual methods | |
uint8_t | serializeGetVersion () const override |
Must return the current versioning number of the object. More... | |
void | serializeTo (mrpt::serialization::CArchive &out) const override |
Pure virtual method for writing (serializing) to an abstract archive. More... | |
void | serializeFrom (mrpt::serialization::CArchive &in, uint8_t serial_version) override |
Pure virtual method for reading (deserializing) from an abstract archive. More... | |
PLY Import virtual methods to implement in base classes | |
void | PLY_import_set_vertex_count (const size_t N) override |
In a base class, reserve memory to prepare subsequent calls to PLY_import_set_vertex. More... | |
PLY Import virtual methods to implement in base classes | |
void | PLY_import_set_face_count ([[maybe_unused]] 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 Import virtual methods to implement in base classes | |
virtual void | PLY_import_set_face_count (const size_t N)=0 |
In a base class, reserve memory to prepare subsequent calls to PLY_import_set_face. 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 void | serializeTo (CSchemeArchiveBase &out) const |
Virtual method for writing (serializing) to an abstract schema based archive. More... | |
virtual void | serializeFrom (CSchemeArchiveBase &in) |
Virtual method for reading (deserializing) from an abstract schema based archive. More... | |
Protected Attributes | |
mrpt::aligned_std_vector< uint32_t > | pointWeight |
The points weights. More... | |
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... | |
RTTI stuff | |
using | Ptr = std::shared_ptr< mrpt::maps ::CWeightedPointsMap > |
using | ConstPtr = std::shared_ptr< const mrpt::maps ::CWeightedPointsMap > |
using | UniquePtr = std::unique_ptr< mrpt::maps ::CWeightedPointsMap > |
using | ConstUniquePtr = std::unique_ptr< const mrpt::maps ::CWeightedPointsMap > |
static const mrpt::rtti::TRuntimeClassId | runtimeClassId |
static constexpr const char * | className = "mrpt::maps" "::" "CWeightedPointsMap" |
static const mrpt::rtti::TRuntimeClassId * | _GetBaseClass () |
static constexpr auto | getClassName () |
static const mrpt::rtti::TRuntimeClassId & | GetRuntimeClassIdStatic () |
static std::shared_ptr< CObject > | CreateObject () |
template<typename... Args> | |
static Ptr | Create (Args &&... args) |
template<typename Alloc , typename... Args> | |
static Ptr | CreateAlloc (const Alloc &alloc, Args &&... args) |
template<typename... Args> | |
static UniquePtr | CreateUnique (Args &&... args) |
virtual const mrpt::rtti::TRuntimeClassId * | GetRuntimeClass () const override |
Returns information about the class of an object in runtime. More... | |
virtual mrpt::rtti::CObject * | clone () const override |
Returns a deep copy (clone) of the object, indepently of its class. More... | |
Pure virtual interfaces to be implemented by any class derived | |
from CPointsMap | |
template<class Derived > | |
struct | detail::loadFromRangeImpl |
template<class Derived > | |
struct | detail::pointmap_traits |
void | reserve (size_t newLength) override |
Reserves memory for a given number of points: the size of the map does not change, it only reserves the memory. More... | |
void | resize (size_t newLength) override |
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... | |
void | setSize (size_t newLength) override |
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 | insertPointFast (float x, float y, float z=0) override |
The virtual method for insertPoint() without calling mark_as_modified() More... | |
void | getPointAllFieldsFast (const size_t index, std::vector< float > &point_data) const override |
Get all the data fields for one point as a vector: [X Y Z WEIGHT] Unlike getPointAllFields(), this method does not check for index out of bounds. More... | |
void | setPointAllFieldsFast (const size_t index, const std::vector< float > &point_data) override |
Set all the data fields for one point as a vector: [X Y Z WEIGHT] Unlike setPointAllFields(), this method does not check for index out of bounds. More... | |
void | loadFromRangeScan (const mrpt::obs::CObservation2DRangeScan &rangeScan, const mrpt::poses::CPose3D *robotPose=nullptr) override |
See CPointsMap::loadFromRangeScan() More... | |
void | loadFromRangeScan (const mrpt::obs::CObservation3DRangeScan &rangeScan, const mrpt::poses::CPose3D *robotPose=nullptr) override |
See CPointsMap::loadFromRangeScan() More... | |
void | impl_copyFrom (const CPointsMap &obj) override |
Virtual assignment operator, copies as much common data (XYZ, color,...) as possible from the source map into this one. More... | |
void | addFrom_classSpecific (const CPointsMap &anotherMap, const size_t nPreviousPoints) override |
Auxiliary method called from within addFrom() automatically, to finish the copying of class-specific data. More... | |
Map Definition Interface stuff (see * mrpt::maps::TMetricMapInitializer) @{ | |
static const size_t | m_private_map_register_id = mrpt::maps::internal::TMetricMapTypesRegistry::Instance().doRegister( "mrpt::maps::CWeightedPointsMap,weightedPointsMap" , & mrpt::maps::CWeightedPointsMap ::MapDefinition, & mrpt::maps::CWeightedPointsMap ::internal_CreateFromMapDefinition) |
ID used to initialize class registration (just ignore it) More... | |
static mrpt::maps::TMetricMapInitializer * | MapDefinition () |
Returns default map definition initializer. More... | |
static CWeightedPointsMap * | CreateFromMapDefinition (const mrpt::maps::TMetricMapInitializer &def) |
Constructor from a map definition structure: initializes the map and * its parameters accordingly. More... | |
static mrpt::maps::CMetricMap * | internal_CreateFromMapDefinition (const mrpt::maps::TMetricMapInitializer &def) |
using mrpt::maps::CWeightedPointsMap::ConstPtr = std::shared_ptr<const mrpt::maps :: CWeightedPointsMap > |
Definition at line 31 of file CWeightedPointsMap.h.
using mrpt::maps::CWeightedPointsMap::ConstUniquePtr = std::unique_ptr<const mrpt::maps :: CWeightedPointsMap > |
Definition at line 31 of file CWeightedPointsMap.h.
using mrpt::maps::CWeightedPointsMap::Ptr = std::shared_ptr< mrpt::maps :: CWeightedPointsMap > |
A type for the associated smart pointer
Definition at line 31 of file CWeightedPointsMap.h.
|
inherited |
Definition at line 87 of file KDTreeCapable.h.
using mrpt::maps::CWeightedPointsMap::UniquePtr = std::unique_ptr< mrpt::maps :: CWeightedPointsMap > |
Definition at line 31 of file CWeightedPointsMap.h.
|
default |
Default constructor.
|
inline |
Definition at line 36 of file CWeightedPointsMap.h.
References impl_copyFrom().
|
inline |
Definition at line 37 of file CWeightedPointsMap.h.
References impl_copyFrom().
|
staticprotected |
|
virtualinherited |
Adds all the points from anotherMap to this map, without fusing.
This operation can be also invoked via the "+=" operator, for example:
Definition at line 1638 of file CPointsMap.cpp.
References mrpt::maps::CPointsMap::addFrom_classSpecific(), mrpt::maps::CPointsMap::m_x, mrpt::maps::CPointsMap::m_y, mrpt::maps::CPointsMap::m_z, mrpt::maps::CPointsMap::mark_as_modified(), mrpt::maps::CPointsMap::resize(), and mrpt::maps::CPointsMap::size().
Referenced by mrpt::maps::CPointsMap::operator+=().
|
overrideprotectedvirtual |
Auxiliary method called from within addFrom() automatically, to finish the copying of class-specific data.
Implements mrpt::maps::CPointsMap.
Definition at line 116 of file CWeightedPointsMap.cpp.
References pointWeight, and mrpt::maps::CPointsMap::size().
|
inherited |
Remove from the map the points marked in a bool's array as "true".
std::exception | If mask size is not equal to points count. |
Definition at line 1663 of file CPointsMap.cpp.
References ASSERT_EQUAL_, mrpt::maps::CPointsMap::getPointAllFieldsFast(), mrpt::maps::CPointsMap::mark_as_modified(), mrpt::maps::CPointsMap::resize(), mrpt::maps::CPointsMap::setPointAllFieldsFast(), and mrpt::maps::CPointsMap::size().
Referenced by mrpt::graphslam::deciders::CRangeScanOps< GRAPH_T >::decimatePointsMap(), mrpt::maps::CPointCloudFilterByDistance::filter(), and mrpt::maps::CPointsMap::internal_insertObservation().
|
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 282 of file CMetricMap.h.
|
protectedinherited |
Helper method for ::copyFrom()
Definition at line 1720 of file CPointsMap.cpp.
References mrpt::math::KDTreeCapable< CPointsMap >::kdtree_mark_as_outdated(), mrpt::maps::CPointsMap::m_largestDistanceFromOrigin, mrpt::maps::CPointsMap::m_largestDistanceFromOriginIsUpdated, mrpt::maps::CPointsMap::m_x, mrpt::maps::CPointsMap::m_y, mrpt::maps::CPointsMap::m_z, MRPT_END, MRPT_START, and mrpt::maps::CPointsMap::resize().
|
inherited |
Computes the bounding box of all the points, or (0,0 ,0,0, 0,0) if there are no points.
Results are cached unless the map is somehow modified to avoid repeated calculations.
Definition at line 914 of file CPointsMap.cpp.
References mrpt::maps::CPointsMap::m_bb_max_x, mrpt::maps::CPointsMap::m_bb_max_y, mrpt::maps::CPointsMap::m_bb_max_z, mrpt::maps::CPointsMap::m_bb_min_x, mrpt::maps::CPointsMap::m_bb_min_y, mrpt::maps::CPointsMap::m_bb_min_z, mrpt::maps::CPointsMap::m_boundingBoxIsUpdated, mrpt::maps::CPointsMap::m_x, mrpt::maps::CPointsMap::m_y, mrpt::maps::CPointsMap::m_z, MRPT_END, and MRPT_START.
Referenced by mrpt::maps::CPointsMap::boundingBox(), mrpt::maps::CPointsMap::compute3DDistanceToMesh(), mrpt::maps::CPointsMap::determineMatching3D(), mrpt::maps::CPointsMap::getAs3DObject(), and mrpt::maps::CPointsMap::kdtree_get_bbox().
|
inlineinherited |
Definition at line 918 of file CPointsMap.h.
References mrpt::maps::CPointsMap::boundingBox(), mrpt::math::TPoint3D_data< T >::x, mrpt::math::TPoint3D_data< T >::y, and mrpt::math::TPoint3D_data< T >::z.
|
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
obs | The observation. |
Definition at line 161 of file CMetricMap.cpp.
|
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
sf | The observations. |
Definition at line 85 of file CMetricMap.cpp.
References mrpt::obs::CSensoryFrame::begin(), and mrpt::obs::CSensoryFrame::end().
|
inherited |
Replace each point by (pose compounding operator).
Definition at line 545 of file CPointsMap.cpp.
References mrpt::poses::CPose3D::composePoint().
Referenced by mrpt::maps::CHeightGridMap2D_Base::dem_internal_insertObservation(), and TEST_F().
|
inherited |
Replace each point by (pose compounding operator).
Definition at line 563 of file CPointsMap.cpp.
References mrpt::poses::CPose3D::composePoint().
|
inherited |
Copy all the points from "other" map to "this", replacing each point by (pose compounding operator).
Definition at line 579 of file CPointsMap.cpp.
|
inherited |
Erase all the contents of the map.
Definition at line 30 of file CMetricMap.cpp.
Referenced by mrpt::maps::CHeightGridMap2D_MRF::CHeightGridMap2D_MRF(), mrpt::maps::CReflectivityGridMap2D::clear(), mrpt::maps::CHeightGridMap2D::clear(), mrpt::maps::CRandomFieldGridMap2D::clear(), mrpt::apps::MonteCarloLocalization_Base::do_pf_localization(), mrpt::maps::CPointsMap::extractCylinder(), mrpt::maps::CPointsMap::extractPoints(), mrpt::ros1bridge::fromROS(), mrpt::opengl::CAngularObservationMesh::generatePointCloud(), mrpt::maps::COccupancyGridMap2D::getAsPointCloud(), mrpt::nav::CReactiveNavigationSystem3D::loggingGetWSObstaclesAndShape(), mrpt::hmtslam::CLSLAM_RBPF_2DLASER::prediction_and_update_pfOptimalProposal(), mrpt::vision::projectMatchedFeatures(), run_rnav_test(), mrpt::maps::CPointsMap::setFromPCLPointCloud(), mrpt::maps::CColouredPointsMap::setFromPCLPointCloudRGB(), mrpt::maps::CPointsMapXYZI::setFromPCLPointCloudXYZI(), mrpt::maps::CRandomFieldGridMap2D::setSize(), and mrpt::nav::PlannerTPS_VirtualBase::transformPointcloudWithSquareClipping().
|
inherited |
Delete points which are more far than "maxRange" away from the given "point".
Definition at line 255 of file CPointsMap.cpp.
References mrpt::math::size(), mrpt::square(), mrpt::math::TPoint2D_data< T >::x, and mrpt::math::TPoint2D_data< T >::y.
|
inherited |
Delete points out of the given "z" axis range have been removed.
Definition at line 237 of file CPointsMap.cpp.
References mrpt::math::size().
|
overridevirtual |
Returns a deep copy (clone) of the object, indepently of its class.
Implements mrpt::rtti::CObject.
|
inherited |
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).
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. |
Definition at line 1254 of file CPointsMap.cpp.
References mrpt::maps::CPointsMap::boundingBox(), mrpt::d2f(), mrpt::math::distance(), mrpt::tfest::TMatchingPair::errorSquareAfterTransformation, mrpt::math::KDTreeCapable< CPointsMap >::kdTreeNClosestPoint3DWithIdx(), MRPT_END, MRPT_START, mrpt::tfest::TMatchingPair::other_idx, mrpt::tfest::TMatchingPair::other_x, mrpt::tfest::TMatchingPair::other_y, mrpt::tfest::TMatchingPair::other_z, mrpt::maps::CPointsMap::size(), mrpt::tfest::TMatchingPair::this_idx, mrpt::tfest::TMatchingPair::this_x, mrpt::tfest::TMatchingPair::this_y, and mrpt::tfest::TMatchingPair::this_z.
|
overridevirtualinherited |
Computes the ratio in [0,1] of correspondences between "this" and the "otherMap" map, whose 6D pose relative to "this" is "otherMapPose" In the case of a multi-metric map, this returns the average between the maps.
This method always return 0 for grid maps.
otherMap | [IN] The other map to compute the matching with. |
otherMapPose | [IN] The 6D pose of the other map as seen from "this". |
params | [IN] Matching parameters |
Reimplemented from mrpt::maps::CMetricMap.
Definition at line 795 of file CPointsMap.cpp.
References mrpt::maps::TMatchingExtraResults::correspondencesRatio, mrpt::maps::CPointsMap::determineMatching3D(), mrpt::maps::CMetricMap::getAsSimplePointsMap(), mrpt::maps::TMatchingRatioParams::maxDistForCorr, and params.
|
inherited |
Computes the log-likelihood of a given observation given an arbitrary robot 3D pose.
See: Maps and observations compatibility matrix
takenFrom | The robot's pose the observation is supposed to be taken from. |
obs | The observation. |
Definition at line 170 of file CMetricMap.cpp.
Referenced by mrpt::maps::CMultiMetricMapPDF::PF_SLAM_computeObservationLikelihoodForParticle().
|
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.
|
inherited |
Returns the sum of the log-likelihoods of each individual observation within a mrpt::obs::CSensoryFrame.
See: Maps and observations compatibility matrix
takenFrom | The robot's pose the observation is supposed to be taken from. |
sf | The set of observations in a CSensoryFrame. |
Definition at line 66 of file CMetricMap.cpp.
Referenced by mrpt::hmtslam::CLSLAM_RBPF_2DLASER::auxiliarComputeObservationLikelihood().
|
inlinestatic |
Definition at line 31 of file CWeightedPointsMap.h.
|
inlinestatic |
Definition at line 31 of file CWeightedPointsMap.h.
|
static |
Constructor from a map definition structure: initializes the map and * its parameters accordingly.
Definition at line 28 of file CWeightedPointsMap.cpp.
|
static |
|
inlinestatic |
Definition at line 31 of file CWeightedPointsMap.h.
|
inlineinherited |
CRTP helper method.
Definition at line 100 of file KDTreeCapable.h.
|
inlineinherited |
CRTP helper method.
Definition at line 105 of file KDTreeCapable.h.
|
overridevirtualinherited |
Computes the matching between this and another 2D point map, which includes finding:
The algorithm is:
This method is the most time critical one into ICP-like algorithms.
otherMap | [IN] The other map to compute the matching with. |
otherMapPose | [IN] The pose of the other map as seen from "this". |
params | [IN] Parameters for the determination of pairings. |
correspondences | [OUT] The detected matchings pairs. |
extraResults | [OUT] Other results. |
Reimplemented from mrpt::maps::CMetricMap.
Definition at line 275 of file CPointsMap.cpp.
References ASSERT_, ASSERT_ABOVE_, ASSERT_BELOW_, ASSERTMSG_, mrpt::d2f(), mrpt::tfest::TMatchingPair::errorSquareAfterTransformation, mrpt::tfest::TMatchingPairList::filterUniqueRobustPairs(), IS_DERIVED, MRPT_END, MRPT_START, mrpt::tfest::TMatchingPair::other_idx, mrpt::tfest::TMatchingPair::other_x, mrpt::tfest::TMatchingPair::other_y, mrpt::tfest::TMatchingPair::other_z, params, mrpt::poses::CPose2D::phi(), mrpt::math::size(), mrpt::math::internal::ProvideStaticResize< Derived >::size(), mrpt::square(), mrpt::tfest::TMatchingPair::this_idx, mrpt::tfest::TMatchingPair::this_x, mrpt::tfest::TMatchingPair::this_y, mrpt::tfest::TMatchingPair::this_z, mrpt::poses::CPoseOrPoint< DERIVEDCLASS, DIM >::x(), and mrpt::poses::CPoseOrPoint< DERIVEDCLASS, DIM >::y().
Referenced by mrpt::maps::CPointsMap::fuseWith().
|
overridevirtualinherited |
Computes the matchings between this and another 3D points map - method used in 3D-ICP.
This method finds the set of point pairs in each map.
The method is the most time critical one into ICP-like algorithms.
The algorithm is:
otherMap | [IN] The other map to compute the matching with. |
otherMapPose | [IN] The pose of the other map as seen from "this". |
params | [IN] Parameters for the determination of pairings. |
correspondences | [OUT] The detected matchings pairs. |
extraResults | [OUT] Other results. |
Reimplemented from mrpt::maps::CMetricMap.
Definition at line 1038 of file CPointsMap.cpp.
References ASSERT_, ASSERT_ABOVE_, ASSERT_BELOW_, ASSERTMSG_, mrpt::maps::CPointsMap::boundingBox(), CLASS_ID, mrpt::poses::CPose3D::composePoint(), mrpt::d2f(), mrpt::rtti::TRuntimeClassId::derivedFrom(), mrpt::tfest::TMatchingPair::errorSquareAfterTransformation, mrpt::tfest::TMatchingPairList::filterUniqueRobustPairs(), mrpt::maps::CMetricMap::GetRuntimeClass(), mrpt::math::KDTreeCapable< CPointsMap >::kdTreeClosestPoint3D(), mrpt::maps::CPointsMap::m_x, mrpt::maps::CPointsMap::m_y, mrpt::maps::CPointsMap::m_z, MRPT_END, MRPT_START, mrpt::tfest::TMatchingPair::other_idx, mrpt::tfest::TMatchingPair::other_x, mrpt::tfest::TMatchingPair::other_y, mrpt::tfest::TMatchingPair::other_z, params, mrpt::maps::CPointsMap::size(), mrpt::square(), mrpt::tfest::TMatchingPair::this_idx, mrpt::tfest::TMatchingPair::this_x, mrpt::tfest::TMatchingPair::this_y, and mrpt::tfest::TMatchingPair::this_z.
Referenced by mrpt::maps::CPointsMap::compute3DMatchingRatio().
|
inlineinherited |
Makes a deep copy of the object and returns a smart pointer to it.
Definition at line 204 of file CObject.h.
References mrpt::rtti::CObject::clone().
Referenced by mrpt::obs::CRawlog::insert().
|
inlineinherited |
STL-like method to check whether the map is empty:
Definition at line 887 of file CPointsMap.h.
References mrpt::maps::CPointsMap::isEmpty().
Referenced by mrpt::maps::CHeightGridMap2D_Base::dem_internal_insertObservation().
|
inlineinherited |
Enable/disable the filter-by-height functionality.
Definition at line 951 of file CPointsMap.h.
References mrpt::maps::CPointsMap::m_heightfilter_enabled.
|
inherited |
Extracts the points in the map within a cylinder in 3D defined the provided radius and zmin/zmax values.
Definition at line 1213 of file CPointsMap.cpp.
References mrpt::maps::CMetricMap::clear(), mrpt::maps::CPointsMap::insertPoint(), mrpt::maps::CPointsMap::m_x, mrpt::maps::CPointsMap::m_y, mrpt::maps::CPointsMap::m_z, mrpt::square(), mrpt::math::TPoint2D_data< T >::x, and mrpt::math::TPoint2D_data< T >::y.
|
inherited |
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 1230 of file CPointsMap.cpp.
References mrpt::maps::CMetricMap::clear(), G, mrpt::maps::CPointsMap::insertPointRGB(), mrpt::maps::CPointsMap::m_x, mrpt::maps::CPointsMap::m_y, mrpt::maps::CPointsMap::m_z, R, mrpt::math::TPoint3D_data< T >::x, mrpt::math::TPoint3D_data< T >::y, and mrpt::math::TPoint3D_data< T >::z.
|
inherited |
Insert the contents of another map into this one, fusing the previous content with the new one.
This means that points very close to existing ones will be "fused", rather than "added". This prevents the unbounded increase in size of these class of maps. NOTICE that "otherMap" is neither translated nor rotated here, so if this is desired it must done before calling this method.
otherMap | The other map whose points are to be inserted into this one. |
minDistForFuse | Minimum distance (in meters) between two points, each one in a map, to be considered the same one and be fused rather than added. |
notFusedPoints | If a pointer is supplied, this list will contain at output a list with a "bool" value per point in "this" map. This will be false/true according to that point having been fused or not. |
Definition at line 2029 of file CPointsMap.cpp.
References ASSERT_, mrpt::maps::CPointsMap::determineMatching2D(), mrpt::maps::CPointsMap::getPoint(), mrpt::maps::CPointsMap::getPointWeight(), mrpt::maps::CPointsMap::insertPointFast(), mrpt::maps::CPointsMap::m_x, mrpt::maps::CPointsMap::m_y, mrpt::maps::CPointsMap::m_z, mrpt::maps::CPointsMap::mark_as_modified(), params, mrpt::maps::CPointsMap::reserve(), mrpt::maps::CPointsMap::setPointWeight(), mrpt::maps::CPointsMap::size(), mrpt::square(), mrpt::math::TPoint3D_data< T >::x, mrpt::math::TPoint3D_data< T >::y, and mrpt::math::TPoint3D_data< T >::z.
Referenced by mrpt::maps::CPointsMap::internal_insertObservation().
|
inlineinherited |
Returns a copy of the 2D/3D points as a std::vector of float coordinates.
If decimation is greater than 1, only 1 point out of that number will be saved in the output, effectively performing a subsampling of the points.
VECTOR | can be std::vector<float or double> or any row/column Eigen::Array or Eigen::Matrix (this includes mrpt::math::CVectorFloat and mrpt::math::CVectorDouble). |
Definition at line 571 of file CPointsMap.h.
References ASSERT_, mrpt::maps::CPointsMap::m_x, mrpt::maps::CPointsMap::m_y, mrpt::maps::CPointsMap::m_z, MRPT_END, and MRPT_START.
Referenced by mrpt::maps::CPointsMap::getAllPoints().
|
inlineinherited |
Gets all points as a STL-like container.
CONTAINER | Any 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 599 of file CPointsMap.h.
References mrpt::maps::CPointsMap::getAllPoints().
|
inherited |
Returns a copy of the 2D/3D points as a std::vector of float coordinates.
If decimation is greater than 1, only 1 point out of that number will be saved in the output, effectively performing a subsampling of the points.
Definition at line 839 of file CPointsMap.cpp.
References ASSERT_, mrpt::maps::CPointsMap::m_x, mrpt::maps::CPointsMap::m_y, MRPT_END, and MRPT_START.
|
inlineinherited |
Definition at line 622 of file CPointsMap.h.
References mrpt::maps::CPointsMap::getAllPoints().
|
overridevirtualinherited |
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 766 of file CPointsMap.cpp.
References mrpt::maps::CPointsMap::boundingBox(), mrpt::img::cmNONE, mrpt::maps::CPointsMap::TRenderOptions::color, mrpt::maps::CPointsMap::TRenderOptions::colormap, mrpt::opengl::CPointCloudColoured::Create(), mrpt::opengl::CPointCloud::Create(), mrpt::maps::TMapGenericParams::enableSaveAs3DObject, mrpt::maps::CMetricMap::genericMapParams, MRPT_END, MRPT_START, mrpt::maps::CPointsMap::TRenderOptions::point_size, mrpt::maps::CPointsMap::renderOptions, and mrpt::math::TPoint3D_data< T >::z.
Referenced by TEST_F().
|
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 295 of file CMetricMap.h.
Referenced by mrpt::maps::CPointsMap::compute3DMatchingRatio(), and mrpt::maps::CMetricMap::getAsSimplePointsMap().
|
inlineinherited |
Definition at line 299 of file CMetricMap.h.
References mrpt::maps::CMetricMap::getAsSimplePointsMap().
|
inlinestatic |
Definition at line 31 of file CWeightedPointsMap.h.
|
inlineinherited |
Get the min/max Z levels for points to be actually inserted in the map.
Definition at line 970 of file CPointsMap.h.
References mrpt::maps::CPointsMap::m_heightfilter_z_max, and mrpt::maps::CPointsMap::m_heightfilter_z_min.
|
inherited |
This method returns the largest distance from the origin to any of the points, such as a sphere centered at the origin with this radius cover ALL the points in the map (the results are buffered, such as, if the map is not modified, the second call will be much faster than the first one).
Definition at line 816 of file CPointsMap.cpp.
References mrpt::maps::CPointsMap::m_largestDistanceFromOrigin, mrpt::maps::CPointsMap::m_largestDistanceFromOriginIsUpdated, mrpt::maps::CPointsMap::m_x, mrpt::maps::CPointsMap::m_y, mrpt::maps::CPointsMap::m_z, and mrpt::square().
|
inlineinherited |
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 903 of file CPointsMap.h.
References mrpt::maps::CPointsMap::m_largestDistanceFromOrigin, and mrpt::maps::CPointsMap::m_largestDistanceFromOriginIsUpdated.
|
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.
|
inlineinherited |
Use to convert this MRPT point cloud object into a PCL point cloud object (PointCloud<PointXYZ>).
Usage example:
Definition at line 1003 of file CPointsMap.h.
References mrpt::maps::CPointsMap::m_x, mrpt::maps::CPointsMap::m_y, mrpt::maps::CPointsMap::m_z, and mrpt::maps::CPointsMap::size().
Referenced by mrpt::maps::CPointsMapXYZI::getPCLPointCloudXYZI(), and mrpt::maps::CColouredPointsMap::getPCLPointCloudXYZRGB().
|
inherited |
Access to a given point from map, as a 2D point.
First index is 0.
Throws | std::exception on index out of bound. |
Definition at line 192 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(), mrpt::maps::CPointsMap::fuseWith(), mrpt::maps::CPointsMap::getPoint(), mrpt::maps::CPointsMap::getPointRGB(), mrpt::opengl::PointCloudAdapter< mrpt::maps::CPointsMapXYZI >::getPointXYZ_RGBu8(), mrpt::maps::CPointsMap::internal_insertObservation(), ransac_data_assoc_run(), TEST(), and mrpt::ros1bridge::toROS().
|
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 186 of file CPointsMap.cpp.
References ASSERT_BELOW_.
|
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 205 of file CPointsMap.cpp.
References ASSERT_BELOW_.
|
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 199 of file CPointsMap.cpp.
References ASSERT_BELOW_.
|
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 453 of file CPointsMap.h.
References mrpt::maps::CPointsMap::getPoint(), mrpt::math::TPoint2D_data< T >::x, and mrpt::math::TPoint2D_data< T >::y.
|
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 458 of file CPointsMap.h.
References mrpt::maps::CPointsMap::getPoint(), mrpt::math::TPoint3D_data< T >::x, mrpt::math::TPoint3D_data< T >::y, and mrpt::math::TPoint3D_data< T >::z.
|
inlineinherited |
Get all the data fields for one point as a vector: depending on the implementation class this can be [X Y Z] or [X Y Z R G B], etc...
Definition at line 705 of file CPointsMap.h.
References ASSERT_BELOW_, mrpt::maps::CPointsMap::getPointAllFieldsFast(), and mrpt::maps::CPointsMap::size().
|
inlineoverridevirtual |
Get all the data fields for one point as a vector: [X Y Z WEIGHT] Unlike getPointAllFields(), this method does not check for index out of bounds.
Implements mrpt::maps::CPointsMap.
Definition at line 69 of file CWeightedPointsMap.h.
References mrpt::maps::CPointsMap::m_x, mrpt::maps::CPointsMap::m_y, mrpt::maps::CPointsMap::m_z, and pointWeight.
|
inlineinherited |
Just like getPoint() but without checking out-of-bound index and without returning the point weight, just XYZ.
Definition at line 480 of file CPointsMap.h.
References mrpt::maps::CPointsMap::m_x, mrpt::maps::CPointsMap::m_y, and mrpt::maps::CPointsMap::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 mrpt::maps::CPointsMap::insertAnotherMap().
|
inlinevirtualinherited |
Access to a given point from map, and its colors, if the map defines them (othersise, R=G=B=1.0).
First index is 0.
Throws | std::exception on index out of bound. |
Reimplemented in mrpt::maps::CPointsMapXYZI, and mrpt::maps::CColouredPointsMap.
Definition at line 469 of file CPointsMap.h.
References G, mrpt::maps::CPointsMap::getPoint(), and R.
|
inherited |
Provides a direct access to points buffer, or nullptr if there is no points in the map.
Definition at line 216 of file CPointsMap.cpp.
References mrpt::math::size().
Referenced by mrpt::nav::CReactiveNavigationSystem::checkCollisionWithLatestObstacles(), mrpt::nav::CReactiveNavigationSystem3D::implementSenseObstacles(), mrpt::maps::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >::insertPointCloud(), mrpt::maps::CPointsMap::internal_insertObservation(), mrpt::nav::PlannerTPS_VirtualBase::spaceTransformer(), mrpt::nav::PlannerTPS_VirtualBase::spaceTransformerOneDirectionOnly(), mrpt::nav::CReactiveNavigationSystem::STEP3_WSpaceToTPSpace(), and mrpt::nav::PlannerTPS_VirtualBase::transformPointcloudWithSquareClipping().
|
inlineinherited |
Provides a direct access to a read-only reference of the internal point buffer.
Definition at line 545 of file CPointsMap.h.
References mrpt::maps::CPointsMap::m_x.
Referenced by mrpt::maps::COccupancyGridMap3D::insertPointCloud().
|
inlineinherited |
Provides a direct access to a read-only reference of the internal point buffer.
Definition at line 551 of file CPointsMap.h.
References mrpt::maps::CPointsMap::m_y.
Referenced by mrpt::maps::COccupancyGridMap3D::insertPointCloud().
|
inlineinherited |
Provides a direct access to a read-only reference of the internal point buffer.
Definition at line 557 of file CPointsMap.h.
References mrpt::maps::CPointsMap::m_z.
Referenced by mrpt::maps::COccupancyGridMap3D::insertPointCloud(), and TEST().
|
inlineoverride |
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).
Definition at line 129 of file CWeightedPointsMap.h.
References pointWeight.
|
inlinevirtualinherited |
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).
Definition at line 531 of file CPointsMap.h.
Referenced by mrpt::maps::CPointsMap::fuseWith().
|
overridevirtual |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::maps::CPointsMap.
|
static |
|
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.
|
inlinevirtualinherited |
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 488 of file CPointsMap.h.
|
inlineprotectedinherited |
Can be called by a derived class before preparing an event for publishing with publishEvent to determine if there is no one subscribed, so it can save the wasted time preparing an event that will be not read.
Definition at line 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(), mrpt::opengl::COpenGLViewport::render(), and mrpt::opengl::COpenGLViewport::renderNormalSceneMode().
|
overrideprotectedvirtual |
Virtual assignment operator, copies as much common data (XYZ, color,...) as possible from the source map into this one.
Implements mrpt::maps::CPointsMap.
Definition at line 101 of file CWeightedPointsMap.cpp.
References pointWeight.
Referenced by CWeightedPointsMap(), and operator=().
|
inherited |
Insert the contents of another map into this one with some geometric transformation, without fusing close points.
otherMap | The other map whose points are to be inserted into this one. |
otherPose | The pose of the other map in the coordinates of THIS map |
Definition at line 1689 of file CPointsMap.cpp.
References mrpt::maps::CPointsMap::addFrom_classSpecific(), mrpt::poses::CPose3D::composePoint(), mrpt::maps::CPointsMap::getPointFast(), mrpt::maps::CPointsMap::mark_as_modified(), mrpt::maps::CPointsMap::resize(), mrpt::maps::CPointsMap::setPointFast(), mrpt::maps::CPointsMap::size(), mrpt::math::TPoint3D_data< T >::x, mrpt::math::TPoint3D_data< T >::y, and mrpt::math::TPoint3D_data< T >::z.
Referenced by mrpt::maps::CPointsMap::internal_insertObservation(), and mrpt::nav::CReactiveNavigationSystem3D::loggingGetWSObstaclesAndShape().
|
inherited |
Insert the observation information into this map.
This method must be implemented in derived classes. See: Maps and observations compatibility matrix
obs | The observation |
robotPose | The 3D pose of the robot mobile base in the map reference system, or NULL (default) if you want to use the origin. |
Definition at line 93 of file CMetricMap.cpp.
Referenced by ICPTests::align2scans(), mrpt::maps::COccupancyGridMap2D::computeObservationLikelihood_likelihoodField_Thrun(), mrpt::graphslam::deciders::CRangeScanOps< GRAPH_T >::getICPEdge(), CAngularObservationMesh_fnctr::operator()(), TEST(), and mrpt::graphslam::CGraphSlamEngine< GRAPH_T >::updateMapVisualization().
|
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().
|
inlineinherited |
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 639 of file CPointsMap.h.
References mrpt::maps::CPointsMap::insertPointFast(), and mrpt::maps::CPointsMap::mark_as_modified().
Referenced by mrpt::slam::CGridMapAligner::AlignPDF_robustMatch(), mrpt::maps::CPointsMap::extractCylinder(), mrpt::ros1bridge::fromROS(), mrpt::maps::COccupancyGridMap2D::getAsPointCloud(), mrpt::maps::CPointsMap::insertPoint(), mrpt::maps::CPointsMap::insertPointRGB(), run_pc_filter_test(), mrpt::maps::CColouredPointsMap::setFromPCLPointCloudRGB(), and mrpt::maps::CPointsMapXYZI::setFromPCLPointCloudXYZI().
|
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 645 of file CPointsMap.h.
References mrpt::d2f(), mrpt::maps::CPointsMap::insertPoint(), mrpt::math::TPoint3D_data< T >::x, mrpt::math::TPoint3D_data< T >::y, and mrpt::math::TPoint3D_data< T >::z.
|
overridevirtual |
The virtual method for insertPoint() without calling mark_as_modified()
Implements mrpt::maps::CPointsMap.
Definition at line 92 of file CWeightedPointsMap.cpp.
|
inlinevirtualinherited |
overload (RGB data is ignored in classes without color information)
Definition at line 650 of file CPointsMap.h.
References mrpt::maps::CPointsMap::insertPoint().
Referenced by mrpt::maps::CPointsMap::extractPoints().
|
overrideprotectedvirtual |
Clear the map, erasing all the points.
Implements mrpt::maps::CMetricMap.
Definition at line 225 of file CWeightedPointsMap.cpp.
References mrpt::vector_strong_clear().
|
overridevirtualinherited |
Internal method called by computeObservationLikelihood()
Implements mrpt::maps::CMetricMap.
Definition at line 1457 of file CPointsMap.cpp.
References mrpt::poses::CPose2D::asTPose(), mrpt::obs::CObservation2DRangeScan::buildAuxPointsMap(), mrpt::maps::CPointsMap::TLikelihoodOptions::decimation, mrpt::obs::CObservationVelodyneScan::generatePointCloud(), mrpt::maps::CPointsMap::internal_computeObservationLikelihoodPointCloud3D(), IS_CLASS, mrpt::poses::CPose3D::isHorizontal(), mrpt::math::KDTreeCapable< CPointsMap >::kdTreeClosestPoint2D(), mrpt::keep_min(), mrpt::maps::CPointsMap::likelihoodOptions, mrpt::maps::CPointsMap::m_x, mrpt::maps::CPointsMap::TLikelihoodOptions::max_corr_distance, mrpt::math::TPose2D::phi, mrpt::obs::CObservationPointCloud::pointcloud, mrpt::maps::CPointsMap::TLikelihoodOptions::sigma_dist, mrpt::maps::CPointsMap::size(), mrpt::square(), mrpt::math::TPose2D::x, mrpt::poses::CPoseOrPoint< DERIVEDCLASS, DIM >::x(), and mrpt::math::TPose2D::y.
|
inherited |
Definition at line 1417 of file CPointsMap.cpp.
References mrpt::poses::CPose3D::composePoint(), mrpt::maps::CPointsMap::TLikelihoodOptions::decimation, mrpt::math::KDTreeCapable< CPointsMap >::kdTreeClosestPoint3D(), mrpt::keep_min(), mrpt::maps::CPointsMap::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 mrpt::maps::CPointsMap::internal_computeObservationLikelihood().
|
static |
Definition at line 48 of file CWeightedPointsMap.cpp.
References mrpt::maps::CWeightedPointsMap::TMapDefinition::insertionOpts, and mrpt::maps::CWeightedPointsMap::TMapDefinition::likelihoodOpts.
|
overrideprotectedvirtualinherited |
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 1747 of file CPointsMap.cpp.
References mrpt::obs::gnss::a1, mrpt::obs::gnss::a2, mrpt::maps::CPointsMap::TInsertionOptions::addToExistingPointsMap, mrpt::maps::CPointsMap::applyDeletionMask(), ASSERT_, mrpt::poses::CPose3D::composePoint(), mrpt::maps::CPointsMap::TInsertionOptions::disableDeletion, mrpt::maps::CPointsMap::fuseWith(), mrpt::maps::CPointsMap::TInsertionOptions::fuseWithExisting, mrpt::obs::CObservationVelodyneScan::generatePointCloud(), mrpt::maps::CPointsMap::getPoint(), mrpt::maps::CPointsMap::getPointsBuffer(), mrpt::maps::CPointsMap::TInsertionOptions::horizontalTolerance, mrpt::maps::CPointsMap::insertAnotherMap(), mrpt::maps::CPointsMap::insertionOptions, mrpt::maps::CPointsMap::insertPointFast(), IS_CLASS, mrpt::maps::CPointsMap::TInsertionOptions::isPlanarMap, mrpt::obs::CObservation2DRangeScan::isPlanarScan(), mrpt::maps::CSimplePointsMap::loadFromRangeScan(), mrpt::maps::CPointsMap::loadFromRangeScan(), mrpt::maps::CPointsMap::loadFromVelodyneScan(), mrpt::maps::CPointsMap::mark_as_modified(), mrpt::maps::CPointsMap::TInsertionOptions::minDistBetweenLaserPoints, MRPT_END, MRPT_START, mrpt::math::CPolygon::PointIntoPolygon(), mrpt::maps::CPointsMap::reserve(), mrpt::round(), mrpt::obs::CObservationRange::sensorConeApperture, mrpt::math::CPolygon::setAllVertices(), mrpt::maps::CPointsMap::size(), mrpt::math::TPoint3D_data< T >::x, mrpt::math::TPoint3D_data< T >::y, and mrpt::math::TPoint3D_data< T >::z.
|
overridevirtualinherited |
Returns true if the map is empty/no observation has been inserted.
Implements mrpt::maps::CMetricMap.
Definition at line 589 of file CPointsMap.cpp.
Referenced by mrpt::maps::CPointsMap::empty().
|
inlineinherited |
Return whether filter-by-height is enabled.
Definition at line 956 of file CPointsMap.h.
References mrpt::maps::CPointsMap::m_heightfilter_enabled.
|
inlineinherited |
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 1065 of file CPointsMap.h.
References mrpt::maps::CPointsMap::m_x, mrpt::maps::CPointsMap::m_y, mrpt::maps::CPointsMap::m_z, and mrpt::maps::CPointsMap::size().
|
inlineinherited |
Definition at line 1090 of file CPointsMap.h.
References mrpt::maps::CPointsMap::boundingBox().
|
inlineinherited |
Must return the number of data points.
Definition at line 1049 of file CPointsMap.h.
References mrpt::maps::CPointsMap::size().
|
inlineinherited |
Returns the dim'th component of the idx'th point in the class:
Definition at line 1051 of file CPointsMap.h.
References mrpt::maps::CPointsMap::m_x, mrpt::maps::CPointsMap::m_y, and mrpt::maps::CPointsMap::m_z.
|
inlineprotectedinherited |
To be called by child classes when KD tree data changes.
Definition at line 714 of file KDTreeCapable.h.
Referenced by mrpt::maps::CPointsMap::base_copyFrom(), and mrpt::maps::CPointsMap::mark_as_modified().
|
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:
x0 | The X coordinate of the query. |
y0 | The Y coordinate of the query. |
out_x | The X coordinate of the found closest correspondence. |
out_y | The Y coordinate of the found closest correspondence. |
out_dist_sqr | The square distance between the query and the returned point. |
Definition at line 136 of file KDTreeCapable.h.
Referenced by mrpt::maps::CPointsMap::internal_computeObservationLikelihood().
|
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.
|
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.
|
inlineinherited |
Like kdTreeClosestPoint2D, but just return the square error from some point to its closest neighbor.
Definition at line 199 of file KDTreeCapable.h.
Referenced by mrpt::maps::CPointsMap::squareDistanceToClosestCorrespondence().
|
inlineinherited |
Definition at line 206 of file KDTreeCapable.h.
|
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:
x0 | The X coordinate of the query. |
y0 | The Y coordinate of the query. |
z0 | The Z coordinate of the query. |
out_x | The X coordinate of the found closest correspondence. |
out_y | The Y coordinate of the found closest correspondence. |
out_z | The Z coordinate of the found closest correspondence. |
out_dist_sqr | The square distance between the query and the returned point. |
Definition at line 405 of file KDTreeCapable.h.
Referenced by mrpt::maps::CPointsMap::determineMatching3D(), and mrpt::maps::CPointsMap::internal_computeObservationLikelihoodPointCloud3D().
|
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 433 of file KDTreeCapable.h.
|
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 455 of file KDTreeCapable.h.
|
inlineinherited |
Definition at line 708 of file KDTreeCapable.h.
|
inlineinherited |
Definition at line 707 of file KDTreeCapable.h.
|
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:
x0 | The X coordinate of the query. |
y0 | The Y coordinate of the query. |
N | The number of closest points to search. |
out_x | The vector containing the X coordinates of the correspondences. |
out_y | The vector containing the Y coordinates of the correspondences. |
out_dist_sqr | The vector containing the square distance between the query and the returned points. |
Definition at line 296 of file KDTreeCapable.h.
|
inlineinherited |
Definition at line 326 of file KDTreeCapable.h.
|
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:
x0 | The X coordinate of the query. |
y0 | The Y coordinate of the query. |
N | The number of closest points to search. |
out_idx | The indexes of the found closest correspondence. |
out_dist_sqr | The square distance between the query and the returned point. |
Definition at line 358 of file KDTreeCapable.h.
|
inlineinherited |
Definition at line 378 of file KDTreeCapable.h.
|
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:
x0 | The X coordinate of the query. |
y0 | The Y coordinate of the query. |
z0 | The Z coordinate of the query. |
N | The number of closest points to search. |
out_x | The vector containing the X coordinates of the correspondences. |
out_y | The vector containing the Y coordinates of the correspondences. |
out_z | The vector containing the Z coordinates of the correspondences. |
out_dist_sqr | The vector containing the square distance between the query and the returned points. |
Definition at line 489 of file KDTreeCapable.h.
|
inlineinherited |
Definition at line 576 of file KDTreeCapable.h.
|
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:
x0 | The X coordinate of the query. |
y0 | The Y coordinate of the query. |
z0 | The Z coordinate of the query. |
N | The number of closest points to search. |
out_idx | The indexes of the found closest correspondence. |
out_dist_sqr | The square distance between the query and the returned point. |
Definition at line 679 of file KDTreeCapable.h.
|
inlineinherited |
Definition at line 699 of file KDTreeCapable.h.
|
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:
x0 | The X coordinate of the query. |
y0 | The Y coordinate of the query. |
z0 | The Z coordinate of the query. |
N | The number of closest points to search. |
out_x | The vector containing the X coordinates of the correspondences. |
out_y | The vector containing the Y coordinates of the correspondences. |
out_z | The vector containing the Z coordinates of the correspondences. |
out_idx | The vector containing the indexes of the correspondences. |
out_dist_sqr | The vector containing the square distance between the query and the returned points. |
Definition at line 544 of file KDTreeCapable.h.
Referenced by mrpt::maps::CPointsMap::compute3DDistanceToMesh().
|
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:
x0 | The X coordinate of the query. |
y0 | The Y coordinate of the query. |
maxRadiusSqr | The square of the desired search radius. |
out_indices_dist | The output list, with pairs of indeces/squared distances for the found correspondences. |
Definition at line 644 of file KDTreeCapable.h.
|
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:
x0 | The X coordinate of the query. |
y0 | The Y coordinate of the query. |
z0 | The Z coordinate of the query. |
maxRadiusSqr | The square of the desired search radius. |
out_indices_dist | The output list, with pairs of indeces/squared distances for the found correspondences. |
Definition at line 609 of file KDTreeCapable.h.
|
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:
x0 | The X coordinate of the query. |
y0 | The Y coordinate of the query. |
out_x1 | The X coordinate of the first correspondence. |
out_y1 | The Y coordinate of the first correspondence. |
out_x2 | The X coordinate of the second correspondence. |
out_y2 | The Y coordinate of the second correspondence. |
out_dist_sqr1 | The square distance between the query and the first returned point. |
out_dist_sqr2 | The square distance between the query and the second returned point. |
Definition at line 231 of file KDTreeCapable.h.
Referenced by mrpt::maps::CPointsMap::squareDistanceToClosestCorrespondence().
|
inlineinherited |
Definition at line 262 of file KDTreeCapable.h.
|
inlineinherited |
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 370 of file CPointsMap.h.
References mrpt::maps::CPointsMap::load2Dor3D_from_text_file().
|
inherited |
2D or 3D generic implementation of load2D_from_text_file and load3D_from_text_file
Definition at line 100 of file CPointsMap.cpp.
References mrpt::containers::clear(), mrpt::system::os::fclose(), mrpt::system::os::fopen(), MRPT_END, and MRPT_START.
Referenced by mrpt::maps::CPointsMap::load2D_from_text_file(), and mrpt::maps::CPointsMap::load3D_from_text_file().
|
inlineinherited |
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 379 of file CPointsMap.h.
References mrpt::maps::CPointsMap::load2Dor3D_from_text_file().
|
inherited |
Loads from a PLY file.
[in] | filename | The filename to open. It can be either in binary or text format. |
[out] | file_comments | If provided (!=nullptr) the list of comment strings stored in the file will be returned. |
[out] | file_obj_info | If provided (!=nullptr) the list of "object info" strings stored in the file will be returned. |
Definition at line 1844 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.
|
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.
std::exception | Some 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::apps::MonteCarloLocalization_Base::do_pf_localization(), mrpt::maps::CMetricMap::loadFromSimpleMap(), mrpt::apps::CGridMapAlignerApp::run(), and run_test_pf_localization().
|
overridevirtual |
See CPointsMap::loadFromRangeScan()
Implements mrpt::maps::CPointsMap.
Definition at line 316 of file CWeightedPointsMap.cpp.
References mrpt::maps::detail::loadFromRangeImpl< Derived >::templ_loadFromRangeScan().
|
overridevirtual |
See CPointsMap::loadFromRangeScan()
Implements mrpt::maps::CPointsMap.
Definition at line 324 of file CWeightedPointsMap.cpp.
References mrpt::maps::detail::loadFromRangeImpl< Derived >::templ_loadFromRangeScan().
|
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 106 of file CMetricMap.h.
References mrpt::maps::CMetricMap::loadFromProbabilisticPosesAndObservations().
Referenced by mrpt::maps::CRandomFieldGridMap2D::internal_clear(), and mrpt::ros1bridge::MapHdl::loadMap().
|
inherited |
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.
scan | The 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. |
robotPose | Default 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). |
Definition at line 2119 of file CPointsMap.cpp.
References mrpt::maps::CPointsMap::TInsertionOptions::addToExistingPointsMap, ASSERT_EQUAL_, mrpt::poses::CPose3D::getHomogeneousMatrix(), mrpt::maps::CPointsMap::insertionOptions, mrpt::obs::CObservationVelodyneScan::TPointCloud::intensity, mrpt::maps::CPointsMap::mark_as_modified(), mrpt::obs::CObservationVelodyneScan::point_cloud, mrpt::maps::CPointsMap::resize(), mrpt::obs::CObservationVelodyneScan::sensorPose, mrpt::maps::CPointsMap::setPointRGB(), mrpt::obs::CObservationVelodyneScan::TPointCloud::size(), mrpt::maps::CPointsMap::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 mrpt::maps::CPointsMap::internal_insertObservation().
|
static |
Returns default map definition initializer.
See * mrpt::maps::TMetricMapInitializer
Definition at line 28 of file CWeightedPointsMap.cpp.
|
inlineinherited |
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 1107 of file CPointsMap.h.
References mrpt::math::KDTreeCapable< CPointsMap >::kdtree_mark_as_outdated(), mrpt::maps::CPointsMap::m_boundingBoxIsUpdated, and mrpt::maps::CPointsMap::m_largestDistanceFromOriginIsUpdated.
Referenced by mrpt::maps::CPointsMap::addFrom(), mrpt::maps::CPointsMap::applyDeletionMask(), mrpt::maps::CPointsMap::fuseWith(), mrpt::maps::CPointsMap::insertAnotherMap(), mrpt::maps::CPointsMap::insertPoint(), mrpt::maps::CPointsMap::internal_insertObservation(), mrpt::maps::CPointsMap::loadFromVelodyneScan(), mrpt::maps::CPointsMap::setAllPointsTemplate(), and mrpt::maps::CPointsMap::setPoint().
|
inlineinherited |
This operator is synonymous with addFrom.
Definition at line 347 of file CPointsMap.h.
References mrpt::maps::CPointsMap::addFrom().
|
inline |
Definition at line 41 of file CWeightedPointsMap.h.
References impl_copyFrom().
|
inline |
Definition at line 46 of file CWeightedPointsMap.h.
References impl_copyFrom().
|
inlineoverrideprotectedvirtualinherited |
In a base class, return the number of faces.
Implements mrpt::opengl::PLY_Exporter.
Definition at line 1167 of file CPointsMap.h.
|
overrideprotectedvirtualinherited |
In a base class, will be called after PLY_export_get_vertex_count() once for each exported point.
pt_color | Will be nullptr if the loaded file does not provide color info. |
Implements mrpt::opengl::PLY_Exporter.
Reimplemented in mrpt::maps::CPointsMapXYZI.
Definition at line 1625 of file CPointsMap.cpp.
References mrpt::maps::CPointsMap::m_x, mrpt::maps::CPointsMap::m_y, mrpt::maps::CPointsMap::m_z, mrpt::math::TPoint3D_data< T >::x, mrpt::math::TPoint3D_data< T >::y, and mrpt::math::TPoint3D_data< T >::z.
|
overrideprotectedvirtualinherited |
In a base class, return the number of vertices.
Implements mrpt::opengl::PLY_Exporter.
Definition at line 1620 of file CPointsMap.cpp.
References mrpt::maps::CPointsMap::size().
|
protectedpure virtualinherited |
In a base class, reserve memory to prepare subsequent calls to PLY_import_set_face.
|
inlineoverrideprotectedinherited |
In a base class, reserve memory to prepare subsequent calls to PLY_import_set_face.
Definition at line 1152 of file CPointsMap.h.
|
overrideprotectedvirtualinherited |
In a base class, will be called after PLY_import_set_vertex_count() once for each loaded point.
pt_color | Will be nullptr if the loaded file does not provide color info. |
Implements mrpt::opengl::PLY_Importer.
Reimplemented in mrpt::maps::CPointsMapXYZI.
Definition at line 1612 of file CPointsMap.cpp.
References mrpt::maps::CPointsMap::setPoint(), mrpt::math::TPoint3D_data< T >::x, mrpt::math::TPoint3D_data< T >::y, and mrpt::math::TPoint3D_data< T >::z.
|
overrideprotectedvirtual |
In a base class, reserve memory to prepare subsequent calls to PLY_import_set_vertex.
Implements mrpt::opengl::PLY_Importer.
Definition at line 336 of file CWeightedPointsMap.cpp.
|
protectedinherited |
Called when you want this object to emit an event to all the observers currently subscribed to this object.
Definition at line 57 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(), mrpt::opengl::COpenGLViewport::render(), and mrpt::opengl::COpenGLViewport::renderNormalSceneMode().
|
overridevirtual |
Reserves memory for a given number of points: the size of the map does not change, it only reserves the memory.
This is useful for situations where it is approximately known the final size of the map. This method is more efficient than constantly increasing the size of the buffers. Refer to the STL C++ library's "reserve" methods.
Implements mrpt::maps::CPointsMap.
Definition at line 62 of file CWeightedPointsMap.cpp.
References reserve().
Referenced by reserve().
|
overridevirtual |
Resizes all point buffers so they can hold the given number of points: newly created points are set to default values, and old contents are not changed.
Implements mrpt::maps::CPointsMap.
Definition at line 73 of file CWeightedPointsMap.cpp.
Referenced by mrpt::opengl::PointCloudAdapter< mrpt::maps::CWeightedPointsMap >::resize().
|
inherited |
Save to a text file.
Each line will contain "X Y" point coordinates. Returns false if any error occured, true elsewere.
Definition at line 66 of file CPointsMap.cpp.
References mrpt::system::os::fclose(), mrpt::system::os::fopen(), and mrpt::system::os::fprintf().
|
inherited |
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 83 of file CPointsMap.cpp.
References mrpt::system::os::fclose(), mrpt::system::os::fopen(), and mrpt::system::os::fprintf().
Referenced by mrpt::maps::CPointsMap::saveMetricMapRepresentationToFile().
|
inlineoverridevirtualinherited |
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 402 of file CPointsMap.h.
References mrpt::maps::CPointsMap::save3D_to_text_file().
|
inherited |
Saves to a PLY file.
[in] | filename | The filename to be saved. |
[in] | file_comments | If provided (!=nullptr) the list of comment strings stored in the file will be returned. |
[in] | file_obj_info | If provided (!=nullptr) the list of "object info" strings stored in the file will be returned. |
Definition at line 1945 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::TPoint3D_data< T >::x, TVertex::x, mrpt::math::TPoint3D_data< T >::y, TVertex::y, mrpt::math::TPoint3D_data< T >::z, and TVertex::z.
|
overrideprotectedvirtual |
Pure virtual method for reading (deserializing) from an abstract archive.
Users don't call this method directly. Instead, use stream >> object;
.
in | The input binary stream where the object data must read from. |
version | The version of the object stored in the stream: use this version number in your code to know how to read the incoming data. |
std::exception | On any I/O error |
Implements mrpt::serialization::CSerializable.
Definition at line 154 of file CWeightedPointsMap.cpp.
References MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION, mrpt::serialization::CArchive::ReadBufferFixEndianness(), and resize().
|
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.
|
overrideprotectedvirtual |
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.
Implements mrpt::serialization::CSerializable.
Definition at line 132 of file CWeightedPointsMap.cpp.
|
overrideprotectedvirtual |
Pure virtual method for writing (serializing) to an abstract archive.
Users don't call this method directly. Instead, use stream << object;
.
std::exception | On any I/O error |
Implements mrpt::serialization::CSerializable.
Definition at line 133 of file CWeightedPointsMap.cpp.
References out.
|
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.
|
inlineinherited |
Set all the points at once from vectors with X,Y and Z coordinates.
Definition at line 686 of file CPointsMap.h.
References mrpt::maps::CPointsMap::setAllPointsTemplate().
Referenced by mrpt::detectors::CFaceDetection::experimental_viewFacePointsAndEigenVects(), mrpt::detectors::CFaceDetection::experimental_viewFacePointsScanned(), and mrpt::detectors::CFaceDetection::experimental_viewRegions().
|
inlineinherited |
Set all the points at once from vectors with X and Y coordinates (Z=0).
Definition at line 695 of file CPointsMap.h.
References mrpt::maps::CPointsMap::setAllPointsTemplate().
|
inlineinherited |
Set all the points at once from vectors with X,Y and Z coordinates (if Z is not provided, it will be set to all zeros).
VECTOR | can be mrpt::math::CVectorFloat or std::vector<float> or any other column or row Eigen::Matrix. |
Definition at line 663 of file CPointsMap.h.
References ASSERT_, ASSERT_EQUAL_, mrpt::maps::CPointsMap::mark_as_modified(), mrpt::maps::CPointsMap::setPointFast(), and mrpt::maps::CPointsMap::setSize().
Referenced by mrpt::maps::CPointsMap::setAllPoints().
|
inlineinherited |
Loads a PCL point cloud into this MRPT class (note: this method ignores potential RGB information, see CColouredPointsMap::setFromPCLPointCloudRGB() ).
Usage example:
Definition at line 1032 of file CPointsMap.h.
References mrpt::maps::CMetricMap::clear(), mrpt::maps::CPointsMap::insertPointFast(), and mrpt::maps::CPointsMap::reserve().
|
inlineinherited |
Set the min/max Z levels for points to be actually inserted in the map (only if enableFilterByHeight() was called before).
Definition at line 963 of file CPointsMap.h.
References mrpt::maps::CPointsMap::m_heightfilter_z_max, and mrpt::maps::CPointsMap::m_heightfilter_z_min.
|
inlineinherited |
Changes a given point from map, with Z defaulting to 0 if not provided.
Throws | std::exception on index out of bound. |
Definition at line 492 of file CPointsMap.h.
References ASSERT_BELOW_, mrpt::maps::CPointsMap::mark_as_modified(), mrpt::maps::CPointsMap::setPointFast(), and mrpt::maps::CPointsMap::size().
Referenced by mrpt::maps::CPointsMap::PLY_import_set_vertex(), ransac_data_assoc_run(), mrpt::maps::CPointsMap::setPoint(), and mrpt::maps::CPointsMap::setPointRGB().
|
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 499 of file CPointsMap.h.
References mrpt::d2f(), mrpt::maps::CPointsMap::setPoint(), mrpt::math::TPoint2D_data< T >::x, and mrpt::math::TPoint2D_data< T >::y.
|
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 504 of file CPointsMap.h.
References mrpt::d2f(), mrpt::maps::CPointsMap::setPoint(), mrpt::math::TPoint3D_data< T >::x, mrpt::math::TPoint3D_data< T >::y, and mrpt::math::TPoint3D_data< T >::z.
|
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 509 of file CPointsMap.h.
References mrpt::maps::CPointsMap::setPoint().
|
inlineinherited |
Set all the data fields for one point as a vector: depending on the implementation class this can be [X Y Z] or [X Y Z R G B], etc...
Unlike setPointAllFields(), this method does not check for index out of bounds
Definition at line 718 of file CPointsMap.h.
References ASSERT_BELOW_, mrpt::maps::CPointsMap::setPointAllFieldsFast(), and mrpt::maps::CPointsMap::size().
|
inlineoverridevirtual |
Set all the data fields for one point as a vector: [X Y Z WEIGHT] Unlike setPointAllFields(), this method does not check for index out of bounds.
Implements mrpt::maps::CPointsMap.
Definition at line 84 of file CWeightedPointsMap.h.
References ASSERTDEB_, mrpt::maps::CPointsMap::m_x, mrpt::maps::CPointsMap::m_y, mrpt::maps::CPointsMap::m_z, and pointWeight.
|
inlineinherited |
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.
Definition at line 161 of file CPointsMap.h.
References mrpt::maps::CPointsMap::m_x, mrpt::maps::CPointsMap::m_y, and mrpt::maps::CPointsMap::m_z.
Referenced by mrpt::maps::CPointsMap::insertAnotherMap(), mrpt::maps::CPointsMap::setAllPointsTemplate(), mrpt::opengl::PointCloudAdapter< mrpt::maps::CSimplePointsMap >::setInvalidPoint(), mrpt::opengl::PointCloudAdapter< mrpt::maps::CColouredPointsMap >::setInvalidPoint(), mrpt::opengl::PointCloudAdapter< mrpt::maps::CPointsMap >::setInvalidPoint(), mrpt::maps::CPointsMap::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().
|
inlinevirtualinherited |
overload (RGB data is ignored in classes without color information)
Definition at line 514 of file CPointsMap.h.
References mrpt::maps::CPointsMap::setPoint().
Referenced by mrpt::maps::CPointsMap::loadFromVelodyneScan().
|
inlineoverride |
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).
Definition at line 122 of file CWeightedPointsMap.h.
References pointWeight.
|
inlinevirtualinherited |
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).
Definition at line 524 of file CPointsMap.h.
Referenced by mrpt::maps::CPointsMap::fuseWith().
|
overridevirtual |
Resizes all point buffers so they can hold the given number of points, erasing all previous contents and leaving all points to default values.
Implements mrpt::maps::CPointsMap.
Definition at line 84 of file CWeightedPointsMap.cpp.
|
inlineinherited |
Save the point cloud as a PCL PCD file, in either ASCII or binary format.
Definition at line 440 of file CPointsMap.h.
References mrpt::maps::CPointsMap::m_x.
Referenced by mrpt::maps::CPointsMap::addFrom(), addFrom_classSpecific(), mrpt::maps::CPointsMapXYZI::addFrom_classSpecific(), mrpt::maps::CColouredPointsMap::addFrom_classSpecific(), mrpt::maps::CPointsMap::applyDeletionMask(), mrpt::maps::CPointsMap::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(), mrpt::maps::CPointsMap::determineMatching3D(), mrpt::maps::CPointCloudFilterByDistance::filter(), mrpt::ros1bridge::fromROS(), mrpt::maps::CPointsMap::fuseWith(), mrpt::maps::CPointsMap::getPCLPointCloud(), mrpt::maps::CPointsMapXYZI::getPCLPointCloudXYZI(), mrpt::maps::CColouredPointsMap::getPCLPointCloudXYZRGB(), mrpt::maps::CPointsMap::getPointAllFields(), mrpt::maps::CPointsMap::insertAnotherMap(), mrpt::maps::COctoMapBase< octomap::OcTree, octomap::OcTreeNode >::internal_build_PointCloud_for_observation(), mrpt::maps::CPointsMap::internal_computeObservationLikelihood(), mrpt::maps::CColouredOctoMap::internal_insertObservation(), mrpt::maps::CPointsMap::internal_insertObservation(), mrpt::maps::CPointsMap::kdtree_distance(), mrpt::maps::CPointsMap::kdtree_get_point_count(), mrpt::maps::CPointsMap::loadFromVelodyneScan(), mrpt::maps::CPointsMap::PLY_export_get_vertex_count(), ransac_data_assoc_run(), run_pc_filter_test(), mrpt::maps::CPointsMap::setPoint(), mrpt::maps::CPointsMap::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(), TEST(), and mrpt::ros1bridge::toROS().
|
overridevirtualinherited |
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 871 of file CPointsMap.cpp.
References ASSERT_, mrpt::math::closestFromPointToLine(), mrpt::math::KDTreeCapable< CPointsMap >::kdTreeClosestPoint2DsqrError(), mrpt::math::KDTreeCapable< CPointsMap >::kdTreeTwoClosestPoint2D(), and mrpt::square().
Referenced by mrpt::maps::CPointsMap::squareDistanceToClosestCorrespondenceT().
|
inlineinherited |
Definition at line 210 of file CPointsMap.h.
References mrpt::d2f(), mrpt::maps::CPointsMap::squareDistanceToClosestCorrespondence(), mrpt::math::TPoint2D_data< T >::x, and mrpt::math::TPoint2D_data< T >::y.
|
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.
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.
|
friend |
Definition at line 111 of file CWeightedPointsMap.h.
|
friend |
Definition at line 113 of file CWeightedPointsMap.h.
|
static |
Definition at line 31 of file CWeightedPointsMap.h.
|
inherited |
Common params to all maps.
Definition at line 274 of file CMetricMap.h.
Referenced by mrpt::maps::internal::TMetricMapTypesRegistry::factoryMapObjectFromDefinition(), mrpt::maps::CWirelessPowerGridMap2D::getAs3DObject(), mrpt::maps::CGasConcentrationGridMap2D::getAs3DObject(), mrpt::maps::CReflectivityGridMap2D::getAs3DObject(), mrpt::maps::CHeightGridMap2D::getAs3DObject(), mrpt::maps::CRandomFieldGridMap2D::getAs3DObject(), mrpt::maps::CLandmarksMap::getAs3DObject(), mrpt::maps::CPointsMap::getAs3DObject(), mrpt::maps::CGasConcentrationGridMap2D::serializeFrom(), mrpt::maps::CWirelessPowerGridMap2D::serializeFrom(), mrpt::maps::CReflectivityGridMap2D::serializeFrom(), mrpt::maps::CHeightGridMap2D::serializeFrom(), mrpt::maps::CWirelessPowerGridMap2D::serializeTo(), mrpt::maps::CGasConcentrationGridMap2D::serializeTo(), mrpt::maps::CReflectivityGridMap2D::serializeTo(), and mrpt::maps::CHeightGridMap2D::serializeTo().
|
inherited |
The options used when inserting observations in the map.
Definition at line 272 of file CPointsMap.h.
Referenced by mrpt::maps::COccupancyGridMap2D::computeObservationLikelihood_likelihoodField_Thrun(), internal_build_points_map_from_scan2D(), mrpt::maps::CPointsMap::internal_insertObservation(), mrpt::maps::COccupancyGridMap3D::internal_insertObservationScan2D(), mrpt::maps::CPointsMap::loadFromVelodyneScan(), mrpt::hmtslam::CLSLAM_RBPF_2DLASER::prediction_and_update_pfOptimalProposal(), mrpt::slam::CMetricMapBuilderICP::processObservation(), and run_rnav_test().
|
inherited |
Parameters to tune the ANN searches.
Definition at line 114 of file KDTreeCapable.h.
|
inherited |
Definition at line 308 of file CPointsMap.h.
Referenced by mrpt::maps::CPointsMap::internal_computeObservationLikelihood(), and mrpt::maps::CPointsMap::internal_computeObservationLikelihoodPointCloud3D().
|
mutableprotectedinherited |
Definition at line 1132 of file CPointsMap.h.
Referenced by mrpt::maps::CPointsMap::boundingBox().
|
mutableprotectedinherited |
Definition at line 1132 of file CPointsMap.h.
Referenced by mrpt::maps::CPointsMap::boundingBox().
|
mutableprotectedinherited |
Definition at line 1132 of file CPointsMap.h.
Referenced by mrpt::maps::CPointsMap::boundingBox().
|
mutableprotectedinherited |
Definition at line 1132 of file CPointsMap.h.
Referenced by mrpt::maps::CPointsMap::boundingBox().
|
mutableprotectedinherited |
Definition at line 1132 of file CPointsMap.h.
Referenced by mrpt::maps::CPointsMap::boundingBox().
|
mutableprotectedinherited |
Definition at line 1132 of file CPointsMap.h.
Referenced by mrpt::maps::CPointsMap::boundingBox().
|
mutableprotectedinherited |
Definition at line 1131 of file CPointsMap.h.
Referenced by mrpt::maps::CPointsMap::boundingBox(), and mrpt::maps::CPointsMap::mark_as_modified().
|
protectedinherited |
Whether or not (default=not) filter the input points by height.
Definition at line 1180 of file CPointsMap.h.
Referenced by mrpt::maps::CPointsMap::enableFilterByHeight(), and mrpt::maps::CPointsMap::isFilterByHeightEnabled().
|
protectedinherited |
Definition at line 1176 of file CPointsMap.h.
Referenced by mrpt::maps::CPointsMap::getHeightFilterLevels(), and mrpt::maps::CPointsMap::setHeightFilterLevels().
|
protectedinherited |
The minimum and maximum height for a certain laser scan to be inserted into this map.
Definition at line 1176 of file CPointsMap.h.
Referenced by mrpt::maps::CPointsMap::getHeightFilterLevels(), and mrpt::maps::CPointsMap::setHeightFilterLevels().
|
mutableprotectedinherited |
Auxiliary variables used in "getLargestDistanceFromOrigin".
Definition at line 1124 of file CPointsMap.h.
Referenced by mrpt::maps::CPointsMap::base_copyFrom(), mrpt::maps::CPointsMap::getLargestDistanceFromOrigin(), and mrpt::maps::CPointsMap::getLargestDistanceFromOriginNoRecompute().
|
mutableprotectedinherited |
Auxiliary variables used in "getLargestDistanceFromOrigin".
Definition at line 1129 of file CPointsMap.h.
Referenced by mrpt::maps::CPointsMap::base_copyFrom(), mrpt::maps::CPointsMap::getLargestDistanceFromOrigin(), mrpt::maps::CPointsMap::getLargestDistanceFromOriginNoRecompute(), and mrpt::maps::CPointsMap::mark_as_modified().
|
static |
ID used to initialize class registration (just ignore it)
Definition at line 155 of file CWeightedPointsMap.h.
|
protectedinherited |
Cache of sin/cos values for the latest 2D scan geometries.
Definition at line 1119 of file CPointsMap.h.
|
protectedinherited |
The point coordinates.
Definition at line 1116 of file CPointsMap.h.
Referenced by mrpt::maps::CPointsMap::addFrom(), mrpt::maps::CPointsMap::base_copyFrom(), mrpt::maps::CPointsMap::boundingBox(), mrpt::maps::CPointsMap::determineMatching3D(), mrpt::maps::CPointsMap::extractCylinder(), mrpt::maps::CPointsMap::extractPoints(), mrpt::maps::CPointsMap::fuseWith(), mrpt::maps::CPointsMap::getAllPoints(), mrpt::maps::CPointsMap::getLargestDistanceFromOrigin(), mrpt::maps::CPointsMap::getPCLPointCloud(), mrpt::maps::CPointsMapXYZI::getPointAllFieldsFast(), mrpt::maps::CSimplePointsMap::getPointAllFieldsFast(), getPointAllFieldsFast(), mrpt::maps::CColouredPointsMap::getPointAllFieldsFast(), mrpt::maps::CPointsMap::getPointFast(), mrpt::maps::CPointsMap::getPointsBufferRef_x(), mrpt::maps::CPointsMap::internal_computeObservationLikelihood(), mrpt::maps::CPointsMap::kdtree_distance(), mrpt::maps::CPointsMap::kdtree_get_pt(), mrpt::maps::CPointsMap::PLY_export_get_vertex(), mrpt::maps::CPointsMapXYZI::setPointAllFieldsFast(), mrpt::maps::CSimplePointsMap::setPointAllFieldsFast(), setPointAllFieldsFast(), mrpt::maps::CColouredPointsMap::setPointAllFieldsFast(), mrpt::maps::CPointsMap::setPointFast(), and mrpt::maps::CPointsMap::size().
|
protectedinherited |
Definition at line 1116 of file CPointsMap.h.
Referenced by mrpt::maps::CPointsMap::addFrom(), mrpt::maps::CPointsMap::base_copyFrom(), mrpt::maps::CPointsMap::boundingBox(), mrpt::maps::CPointsMap::determineMatching3D(), mrpt::maps::CPointsMap::extractCylinder(), mrpt::maps::CPointsMap::extractPoints(), mrpt::maps::CPointsMap::fuseWith(), mrpt::maps::CPointsMap::getAllPoints(), mrpt::maps::CPointsMap::getLargestDistanceFromOrigin(), mrpt::maps::CPointsMap::getPCLPointCloud(), mrpt::maps::CPointsMapXYZI::getPointAllFieldsFast(), mrpt::maps::CSimplePointsMap::getPointAllFieldsFast(), getPointAllFieldsFast(), mrpt::maps::CColouredPointsMap::getPointAllFieldsFast(), mrpt::maps::CPointsMap::getPointFast(), mrpt::maps::CPointsMap::getPointsBufferRef_y(), mrpt::maps::CPointsMap::kdtree_distance(), mrpt::maps::CPointsMap::kdtree_get_pt(), mrpt::maps::CPointsMap::PLY_export_get_vertex(), mrpt::maps::CPointsMapXYZI::setPointAllFieldsFast(), mrpt::maps::CSimplePointsMap::setPointAllFieldsFast(), setPointAllFieldsFast(), mrpt::maps::CColouredPointsMap::setPointAllFieldsFast(), and mrpt::maps::CPointsMap::setPointFast().
|
protectedinherited |
Definition at line 1116 of file CPointsMap.h.
Referenced by mrpt::maps::CPointsMap::addFrom(), mrpt::maps::CPointsMap::base_copyFrom(), mrpt::maps::CPointsMap::boundingBox(), mrpt::maps::CPointsMap::determineMatching3D(), mrpt::maps::CPointsMap::extractCylinder(), mrpt::maps::CPointsMap::extractPoints(), mrpt::maps::CPointsMap::fuseWith(), mrpt::maps::CPointsMap::getAllPoints(), mrpt::maps::CPointsMap::getLargestDistanceFromOrigin(), mrpt::maps::CPointsMap::getPCLPointCloud(), mrpt::maps::CPointsMapXYZI::getPointAllFieldsFast(), mrpt::maps::CSimplePointsMap::getPointAllFieldsFast(), getPointAllFieldsFast(), mrpt::maps::CColouredPointsMap::getPointAllFieldsFast(), mrpt::maps::CPointsMap::getPointFast(), mrpt::maps::CPointsMap::getPointsBufferRef_z(), mrpt::maps::CPointsMap::kdtree_distance(), mrpt::maps::CPointsMap::kdtree_get_pt(), mrpt::maps::CPointsMap::PLY_export_get_vertex(), mrpt::maps::CPointsMapXYZI::setPointAllFieldsFast(), mrpt::maps::CSimplePointsMap::setPointAllFieldsFast(), setPointAllFieldsFast(), mrpt::maps::CColouredPointsMap::setPointAllFieldsFast(), and mrpt::maps::CPointsMap::setPointFast().
|
protected |
The points weights.
Definition at line 136 of file CWeightedPointsMap.h.
Referenced by addFrom_classSpecific(), getPointAllFieldsFast(), getPointWeight(), impl_copyFrom(), mrpt::maps::detail::pointmap_traits< CWeightedPointsMap >::internal_loadFromRangeScan2D_postPushBack(), mrpt::maps::detail::pointmap_traits< CWeightedPointsMap >::internal_loadFromRangeScan3D_postPushBack(), setPointAllFieldsFast(), and setPointWeight().
|
inherited |
Definition at line 331 of file CPointsMap.h.
Referenced by mrpt::maps::CPointsMap::getAs3DObject(), and TEST_F().
|
staticprotected |
Definition at line 31 of file CWeightedPointsMap.h.
Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020 |