Point Cloud Library (PCL)
1.9.1
|
WorldModel maintains a 3D point cloud that can be queried and updated via helper functions. More...
Public Types | |
typedef boost::shared_ptr < WorldModel< PointT > > | Ptr |
typedef boost::shared_ptr < const WorldModel< PointT > > | ConstPtr |
typedef pcl::PointCloud< PointT > | PointCloud |
typedef PointCloud::Ptr | PointCloudPtr |
typedef PointCloud::ConstPtr | PointCloudConstPtr |
typedef pcl::ConditionAnd < PointT >::Ptr | ConditionAndPtr |
typedef pcl::ConditionOr < PointT >::Ptr | ConditionOrPtr |
typedef pcl::FieldComparison < PointT >::ConstPtr | FieldComparisonConstPtr |
typedef pcl::traits::fieldList < PointT >::type | FieldList |
Public Member Functions | |
WorldModel () | |
Default constructor for the WorldModel. More... | |
void | reset () |
Clear the world. More... | |
void | addSlice (const PointCloudPtr new_cloud) |
Append a new point cloud (slice) to the world. More... | |
void | getExistingData (const double previous_origin_x, const double previous_origin_y, const double previous_origin_z, const double offset_x, const double offset_y, const double offset_z, const double volume_x, const double volume_y, const double volume_z, pcl::PointCloud< PointT > &existing_slice) |
Retrieve existing data from the world model, after a shift. More... | |
void | setSliceAsNans (const double origin_x, const double origin_y, const double origin_z, const double offset_x, const double offset_y, const double offset_z, const int size_x, const int size_y, const int size_z) |
Give nan values to the slice of the world. More... | |
void | cleanWorldFromNans () |
Remove points with nan values from the world. More... | |
PointCloudPtr | getWorld () |
Returns the world as a point cloud. More... | |
size_t | getWorldSize () |
Returns the number of points contained in the world. More... | |
void | getWorldAsCubes (double size, std::vector< PointCloudPtr > &cubes, std::vector< Eigen::Vector3f, Eigen::aligned_allocator< Eigen::Vector3f > > &transforms, double overlap=0.0) |
Returns the world as two vectors of cubes of size "size" (pointclouds) and transforms. More... | |
WorldModel maintains a 3D point cloud that can be queried and updated via helper functions.
The world is represented as a point cloud.
When new points are added to the world, we replace old ones by the newest ones. This is achieved by setting old points to nan (for speed)
Definition at line 64 of file world_model.h.
typedef pcl::ConditionAnd<PointT>::Ptr pcl::kinfuLS::WorldModel< PointT >::ConditionAndPtr |
Definition at line 75 of file world_model.h.
typedef pcl::ConditionOr<PointT>::Ptr pcl::kinfuLS::WorldModel< PointT >::ConditionOrPtr |
Definition at line 76 of file world_model.h.
typedef boost::shared_ptr<const WorldModel<PointT> > pcl::kinfuLS::WorldModel< PointT >::ConstPtr |
Definition at line 69 of file world_model.h.
typedef pcl::FieldComparison<PointT>::ConstPtr pcl::kinfuLS::WorldModel< PointT >::FieldComparisonConstPtr |
Definition at line 77 of file world_model.h.
typedef pcl::traits::fieldList<PointT>::type pcl::kinfuLS::WorldModel< PointT >::FieldList |
Definition at line 79 of file world_model.h.
typedef pcl::PointCloud<PointT> pcl::kinfuLS::WorldModel< PointT >::PointCloud |
Definition at line 71 of file world_model.h.
typedef PointCloud::ConstPtr pcl::kinfuLS::WorldModel< PointT >::PointCloudConstPtr |
Definition at line 73 of file world_model.h.
typedef PointCloud::Ptr pcl::kinfuLS::WorldModel< PointT >::PointCloudPtr |
Definition at line 72 of file world_model.h.
typedef boost::shared_ptr<WorldModel<PointT> > pcl::kinfuLS::WorldModel< PointT >::Ptr |
Definition at line 68 of file world_model.h.
|
inline |
Default constructor for the WorldModel.
Definition at line 83 of file world_model.h.
void pcl::kinfuLS::WorldModel< PointT >::addSlice | ( | const PointCloudPtr | new_cloud | ) |
Append a new point cloud (slice) to the world.
[in] | new_cloud | the point cloud to add to the world |
Definition at line 46 of file world_model.hpp.
|
inline |
Remove points with nan values from the world.
Definition at line 139 of file world_model.h.
void pcl::kinfuLS::WorldModel< PointT >::getExistingData | ( | const double | previous_origin_x, |
const double | previous_origin_y, | ||
const double | previous_origin_z, | ||
const double | offset_x, | ||
const double | offset_y, | ||
const double | offset_z, | ||
const double | volume_x, | ||
const double | volume_y, | ||
const double | volume_z, | ||
pcl::PointCloud< PointT > & | existing_slice | ||
) |
Retrieve existing data from the world model, after a shift.
[in] | previous_origin_x | global origin of the cube on X axis, before the shift |
[in] | previous_origin_y | global origin of the cube on Y axis, before the shift |
[in] | previous_origin_z | global origin of the cube on Z axis, before the shift |
[in] | offset_x | shift on X, in indices |
[in] | offset_y | shift on Y, in indices |
[in] | offset_z | shift on Z, in indices |
[in] | volume_x | size of the cube, X axis, in indices |
[in] | volume_y | size of the cube, Y axis, in indices |
[in] | volume_z | size of the cube, Z axis, in indices |
[out] | existing_slice | the extracted point cloud representing the slice |
Definition at line 60 of file world_model.hpp.
References pcl::Filter< PointT >::filter(), pcl::ComparisonOps::GE, pcl::ComparisonOps::LT, pcl::PointCloud< PointT >::points, pcl::ConditionalRemoval< PointT >::setCondition(), pcl::PCLBase< PointT >::setInputCloud(), pcl::ConditionalRemoval< PointT >::setKeepOrganized(), and pcl::transformPointCloud().
|
inline |
Returns the world as a point cloud.
Definition at line 148 of file world_model.h.
void pcl::kinfuLS::WorldModel< PointT >::getWorldAsCubes | ( | double | size, |
std::vector< PointCloudPtr > & | cubes, | ||
std::vector< Eigen::Vector3f, Eigen::aligned_allocator< Eigen::Vector3f > > & | transforms, | ||
double | overlap = 0.0 |
||
) |
Returns the world as two vectors of cubes of size "size" (pointclouds) and transforms.
[in] | size | the size of a 3D cube. |
[out] | cubes | a vector of point clouds representing each cube (in their original world coordinates). |
[out] | transforms | a vector containing the xyz position of each cube in world coordinates. |
[in] | overlap | optional overlap (in percent) between each cube (useful to create overlapped meshes). |
Definition at line 133 of file world_model.hpp.
References pcl::Filter< PointT >::filter(), pcl::ComparisonOps::GE, pcl::getMinMax3D(), pcl::ComparisonOps::LT, pcl::removeNaNFromPointCloud(), pcl::ConditionalRemoval< PointT >::setCondition(), pcl::PCLBase< PointT >::setInputCloud(), and pcl::ConditionalRemoval< PointT >::setKeepOrganized().
|
inline |
Returns the number of points contained in the world.
Definition at line 155 of file world_model.h.
|
inline |
Clear the world.
Definition at line 91 of file world_model.h.
void pcl::kinfuLS::WorldModel< PointT >::setSliceAsNans | ( | const double | origin_x, |
const double | origin_y, | ||
const double | origin_z, | ||
const double | offset_x, | ||
const double | offset_y, | ||
const double | offset_z, | ||
const int | size_x, | ||
const int | size_y, | ||
const int | size_z | ||
) |
Give nan values to the slice of the world.
[in] | origin_x | global origin of the cube on X axis, before the shift |
[in] | origin_y | global origin of the cube on Y axis, before the shift |
[in] | origin_z | global origin of the cube on Z axis, before the shift |
[in] | offset_x | shift on X, in indices |
[in] | offset_y | shift on Y, in indices |
[in] | offset_z | shift on Z, in indices |
[in] | size_x | size of the cube, X axis, in indices |
[in] | size_y | size of the cube, Y axis, in indices |
[in] | size_z | size of the cube, Z axis, in indices |
Definition at line 272 of file world_model.hpp.
References pcl::Filter< PointT >::filter(), pcl::ComparisonOps::GE, pcl::Filter< PointT >::getRemovedIndices(), pcl::ComparisonOps::LT, pcl::ConditionalRemoval< PointT >::setCondition(), pcl::PCLBase< PointT >::setInputCloud(), and pcl::ConditionalRemoval< PointT >::setKeepOrganized().