Fawkes API  Fawkes Development Version
fawkes::PointCloudManager Class Reference

Point Cloud manager. More...

#include <>>

Classes

class  PointCloudStorageAdapter
 Adapter class for PCL point types. More...
 
class  StorageAdapter
 Adapter base class. More...
 

Public Member Functions

 PointCloudManager ()
 Constructor. More...
 
virtual ~PointCloudManager ()
 Destructor. More...
 
template<typename PointT >
void add_pointcloud (const char *id, RefPtr< pcl::PointCloud< PointT > > cloud)
 Add point cloud. More...
 
void remove_pointcloud (const char *id)
 Remove the point cloud. More...
 
template<typename PointT >
const RefPtr< const pcl::PointCloud< PointT > > get_pointcloud (const char *id)
 Get point cloud. More...
 
bool exists_pointcloud (const char *id)
 Check if point cloud exists. More...
 
template<typename PointT >
bool exists_pointcloud (const char *id)
 Check if point cloud of specified type exists. More...
 
std::vector< std::string > get_pointcloud_list () const
 Get list of point cloud IDs. More...
 
const fawkes::LockMap< std::string, StorageAdapter * > & get_pointclouds () const
 Get map of point clouds. More...
 
const StorageAdapterget_storage_adapter (const char *id)
 Get a storage adapter. More...
 

Detailed Description

Point Cloud manager.

This class manages a number of points clouds and acts as a hub to distribute them.

Author
Tim Niemueller

Definition at line 60 of file pointcloud_manager.h.

Constructor & Destructor Documentation

fawkes::PointCloudManager::PointCloudManager ( )

Constructor.

Definition at line 113 of file pointcloud_manager.cpp.

fawkes::PointCloudManager::~PointCloudManager ( )
virtual

Destructor.

Definition at line 118 of file pointcloud_manager.cpp.

Member Function Documentation

template<typename PointT >
void fawkes::PointCloudManager::add_pointcloud ( const char *  id,
RefPtr< pcl::PointCloud< PointT > >  cloud 
)

Add point cloud.

Parameters
idID of point cloud to add, must be unique
cloudrefptr to point cloud

Definition at line 168 of file pointcloud_manager.h.

Referenced by LaserPointCloudThread::bb_interface_created(), RobotinoIrPclThread::init(), LaserPointCloudThread::init(), OpenNiPclOnlyThread::init(), and TabletopObjectsThread::init().

bool fawkes::PointCloudManager::exists_pointcloud ( const char *  id)

Check if point cloud exists.

Parameters
idID of point cloud to check
Returns
true if the point cloud exists, false otherwise

Definition at line 148 of file pointcloud_manager.cpp.

Referenced by RosPointCloudAdapter::get_info().

template<typename PointT >
bool fawkes::PointCloudManager::exists_pointcloud ( const char *  id)

Check if point cloud of specified type exists.

Parameters
idID of point cloud to check
Returns
true if the point cloud exists, false otherwise

Definition at line 208 of file pointcloud_manager.h.

template<typename PointT >
const RefPtr< const pcl::PointCloud< PointT > > fawkes::PointCloudManager::get_pointcloud ( const char *  id)

Get point cloud.

Parameters
idID of point cloud to retrieve
Returns
point cloud
Exceptions
Exceptionthrown if point cloud for given ID does not exist

Definition at line 182 of file pointcloud_manager.h.

References fawkes::PointCloudManager::PointCloudStorageAdapter< PointT >::cloud.

Referenced by RosPointCloudAdapter::get_info(), and TabletopObjectsThread::init().

std::vector< std::string > fawkes::PointCloudManager::get_pointcloud_list ( ) const

Get list of point cloud IDs.

Returns
list of point cloud IDs

Definition at line 160 of file pointcloud_manager.cpp.

Referenced by RosPointCloudThread::init().

const fawkes::LockMap< std::string, PointCloudManager::StorageAdapter * > & fawkes::PointCloudManager::get_pointclouds ( ) const

Get map of point clouds.

Use with care. Do not use in ROS-enabled plugins unless you are aware of sensor_msgs and std_msgs incompatibilities between standalone PCL and ROS!

Returns
map from ID to storage adapter

Definition at line 181 of file pointcloud_manager.cpp.

const PointCloudManager::StorageAdapter * fawkes::PointCloudManager::get_storage_adapter ( const char *  id)

Get a storage adapter.

Use with care. Do not use in ROS-enabled plugins unless you are aware of sensor_msgs and std_msgs incompatibilities between standalone PCL and ROS!

Parameters
idID of point clouds whose storage adapter to retrieve
Returns
storage adapter for given ID
Exceptions
Exceptionthrown if ID is unknown

Definition at line 196 of file pointcloud_manager.cpp.

Referenced by RosPointCloudAdapter::get_data(), and RosPointCloudAdapter::get_info().

void fawkes::PointCloudManager::remove_pointcloud ( const char *  id)

The documentation for this class was generated from the following files: