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.
#include <mrpt/slam/CWeightedPointsMap.h>

Public Member Functions | |
| CWeightedPointsMap () | |
| Default constructor. | |
| virtual | ~CWeightedPointsMap () |
| Destructor. | |
| virtual void | setPointWeight (size_t index, unsigned long w) |
| Sets the point weight, which is ignored in all classes but those which actually store that field (Note: No checks are done for out-of-bounds index). | |
| virtual unsigned int | getPointWeight (size_t index) const |
| Gets the point weight, which is ignored in all classes (defaults to 1) but in those which actually store that field (Note: No checks are done for out-of-bounds index). | |
Protected Member Functions | |
| virtual void | internal_clear () |
| Clear the map, erasing all the points. | |
PLY Import virtual methods to implement in base classes | |
| virtual void | PLY_import_set_vertex_count (const size_t N) |
| In a base class, reserve memory to prepare subsequent calls to PLY_import_set_vertex. | |
Protected Attributes | |
| std::vector< uint32_t > | pointWeight |
| The points weights. | |
RTTI stuff | |
| typedef CWeightedPointsMapPtr | SmartPtr |
| static mrpt::utils::CLASSINIT | _init_CWeightedPointsMap |
| static mrpt::utils::TRuntimeClassId | classCWeightedPointsMap |
| static const mrpt::utils::TRuntimeClassId * | classinfo |
| static const mrpt::utils::TRuntimeClassId * | _GetBaseClass () |
| virtual const mrpt::utils::TRuntimeClassId * | GetRuntimeClass () const |
| Returns information about the class of an object in runtime. | |
| virtual mrpt::utils::CObject * | duplicate () const |
| Returns a copy of the object, indepently of its class. | |
| static mrpt::utils::CObject * | CreateObject () |
| static CWeightedPointsMapPtr | Create () |
Pure virtual interfaces to be implemented by any class derived from CPointsMap | |
| struct | detail::loadFromRangeImpl |
| struct | detail::pointmap_traits |
| virtual void | reserve (size_t newLength) |
| Reserves memory for a given number of points: the size of the map does not change, it only reserves the memory. | |
| virtual void | resize (size_t newLength) |
| Resizes all point buffers so they can hold the given number of points: newly created points are set to default values, and old contents are not changed. | |
| virtual void | setSize (size_t newLength) |
| Resizes all point buffers so they can hold the given number of points, *erasing* all previous contents and leaving all points to default values. | |
| virtual void | setPointFast (size_t index, float x, float y, float z) |
| Changes the coordinates of the given point (0-based index), *without* checking for out-of-bounds and *without* calling mark_as_modified() | |
| virtual void | insertPointFast (float x, float y, float z=0) |
| The virtual method for insertPoint() *without* calling mark_as_modified() | |
| virtual void | copyFrom (const CPointsMap &obj) |
| Virtual assignment operator, to be implemented in derived classes. | |
| virtual void | getPointAllFieldsFast (const size_t index, std::vector< float > &point_data) const |
| Get all the data fields for one point as a vector: [X Y Z WEIGHT] Unlike getPointAllFields(), this method does not check for index out of bounds. | |
| virtual void | setPointAllFieldsFast (const size_t index, const std::vector< float > &point_data) |
| Set all the data fields for one point as a vector: [X Y Z WEIGHT] Unlike setPointAllFields(), this method does not check for index out of bounds. | |
| virtual void | loadFromRangeScan (const CObservation2DRangeScan &rangeScan, const CPose3D *robotPose=NULL) |
| See CPointsMap::loadFromRangeScan() | |
| virtual void | loadFromRangeScan (const CObservation3DRangeScan &rangeScan, const CPose3D *robotPose=NULL) |
| See CPointsMap::loadFromRangeScan() | |
| virtual void | addFrom_classSpecific (const CPointsMap &anotherMap, const size_t nPreviousPoints) |
| Auxiliary method called from within addFrom() automatically, to finish the copying of class-specific data. | |
A typedef for the associated smart pointer
Definition at line 54 of file CWeightedPointsMap.h.
| mrpt::slam::CWeightedPointsMap::CWeightedPointsMap | ( | ) |
Default constructor.
| virtual mrpt::slam::CWeightedPointsMap::~CWeightedPointsMap | ( | ) | [virtual] |
Destructor.
| static const mrpt::utils::TRuntimeClassId* mrpt::slam::CWeightedPointsMap::_GetBaseClass | ( | ) | [static, protected] |
Reimplemented from mrpt::slam::CPointsMap.
| virtual void mrpt::slam::CWeightedPointsMap::addFrom_classSpecific | ( | const CPointsMap & | anotherMap, |
| const size_t | nPreviousPoints | ||
| ) | [protected, virtual] |
Auxiliary method called from within addFrom() automatically, to finish the copying of class-specific data.
Implements mrpt::slam::CPointsMap.
| virtual void mrpt::slam::CWeightedPointsMap::copyFrom | ( | const CPointsMap & | obj | ) | [virtual] |
Virtual assignment operator, to be implemented in derived classes.
Implements mrpt::slam::CPointsMap.
| static CWeightedPointsMapPtr mrpt::slam::CWeightedPointsMap::Create | ( | ) | [static] |
| static mrpt::utils::CObject* mrpt::slam::CWeightedPointsMap::CreateObject | ( | ) | [static] |
| virtual mrpt::utils::CObject* mrpt::slam::CWeightedPointsMap::duplicate | ( | ) | const [virtual] |
Returns a copy of the object, indepently of its class.
Implements mrpt::utils::CObject.
| virtual void mrpt::slam::CWeightedPointsMap::getPointAllFieldsFast | ( | const size_t | index, |
| std::vector< float > & | point_data | ||
| ) | const [inline, virtual] |
Get all the data fields for one point as a vector: [X Y Z WEIGHT] Unlike getPointAllFields(), this method does not check for index out of bounds.
Implements mrpt::slam::CPointsMap.
Definition at line 96 of file CWeightedPointsMap.h.
| virtual unsigned int mrpt::slam::CWeightedPointsMap::getPointWeight | ( | size_t | index | ) | const [inline, virtual] |
Gets the point weight, which is ignored in all classes (defaults to 1) but in those which actually store that field (Note: No checks are done for out-of-bounds index).
Reimplemented from mrpt::slam::CPointsMap.
Definition at line 143 of file CWeightedPointsMap.h.
| virtual const mrpt::utils::TRuntimeClassId* mrpt::slam::CWeightedPointsMap::GetRuntimeClass | ( | ) | const [virtual] |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::slam::CPointsMap.
| virtual void mrpt::slam::CWeightedPointsMap::insertPointFast | ( | float | x, |
| float | y, | ||
| float | z = 0 |
||
| ) | [virtual] |
The virtual method for insertPoint() *without* calling mark_as_modified()
Implements mrpt::slam::CPointsMap.
| virtual void mrpt::slam::CWeightedPointsMap::internal_clear | ( | ) | [protected, virtual] |
Clear the map, erasing all the points.
Implements mrpt::slam::CMetricMap.
| virtual void mrpt::slam::CWeightedPointsMap::loadFromRangeScan | ( | const CObservation2DRangeScan & | rangeScan, |
| const CPose3D * | robotPose = NULL |
||
| ) | [virtual] |
See CPointsMap::loadFromRangeScan()
Implements mrpt::slam::CPointsMap.
| virtual void mrpt::slam::CWeightedPointsMap::loadFromRangeScan | ( | const CObservation3DRangeScan & | rangeScan, |
| const CPose3D * | robotPose = NULL |
||
| ) | [virtual] |
See CPointsMap::loadFromRangeScan()
Implements mrpt::slam::CPointsMap.
| virtual void mrpt::slam::CWeightedPointsMap::PLY_import_set_vertex_count | ( | const size_t | N | ) | [protected, virtual] |
In a base class, reserve memory to prepare subsequent calls to PLY_import_set_vertex.
Implements mrpt::utils::PLY_Importer.
| virtual void mrpt::slam::CWeightedPointsMap::reserve | ( | size_t | newLength | ) | [virtual] |
Reserves memory for a given number of points: the size of the map does not change, it only reserves the memory.
This is useful for situations where it is approximately known the final size of the map. This method is more efficient than constantly increasing the size of the buffers. Refer to the STL C++ library's "reserve" methods.
Implements mrpt::slam::CPointsMap.
| virtual void mrpt::slam::CWeightedPointsMap::resize | ( | size_t | newLength | ) | [virtual] |
Resizes all point buffers so they can hold the given number of points: newly created points are set to default values, and old contents are not changed.
Implements mrpt::slam::CPointsMap.
| virtual void mrpt::slam::CWeightedPointsMap::setPointAllFieldsFast | ( | const size_t | index, |
| const std::vector< float > & | point_data | ||
| ) | [inline, virtual] |
Set all the data fields for one point as a vector: [X Y Z WEIGHT] Unlike setPointAllFields(), this method does not check for index out of bounds.
Implements mrpt::slam::CPointsMap.
Definition at line 108 of file CWeightedPointsMap.h.
References ASSERTDEB_, and Eigen::internal::y.
| virtual void mrpt::slam::CWeightedPointsMap::setPointFast | ( | size_t | index, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) | [virtual] |
Changes the coordinates of the given point (0-based index), *without* checking for out-of-bounds and *without* calling mark_as_modified()
Implements mrpt::slam::CPointsMap.
| virtual void mrpt::slam::CWeightedPointsMap::setPointWeight | ( | size_t | index, |
| unsigned long | w | ||
| ) | [inline, virtual] |
Sets the point weight, which is ignored in all classes but those which actually store that field (Note: No checks are done for out-of-bounds index).
Reimplemented from mrpt::slam::CPointsMap.
Definition at line 141 of file CWeightedPointsMap.h.
| virtual void mrpt::slam::CWeightedPointsMap::setSize | ( | size_t | newLength | ) | [virtual] |
Resizes all point buffers so they can hold the given number of points, *erasing* all previous contents and leaving all points to default values.
Implements mrpt::slam::CPointsMap.
friend struct detail::loadFromRangeImpl [friend] |
Reimplemented from mrpt::slam::CPointsMap.
Definition at line 132 of file CWeightedPointsMap.h.
friend struct detail::pointmap_traits [friend] |
Reimplemented from mrpt::slam::CPointsMap.
Definition at line 133 of file CWeightedPointsMap.h.
mrpt::utils::CLASSINIT mrpt::slam::CWeightedPointsMap::_init_CWeightedPointsMap [static, protected] |
Definition at line 54 of file CWeightedPointsMap.h.
Definition at line 54 of file CWeightedPointsMap.h.
Definition at line 54 of file CWeightedPointsMap.h.
std::vector<uint32_t> mrpt::slam::CWeightedPointsMap::pointWeight [protected] |
The points weights.
Definition at line 146 of file CWeightedPointsMap.h.
| Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Sun Oct 16 12:16:33 UTC 2011 |