23#ifndef _LIBS_PCL_UTILS_POINTCLOUD_MANAGER_H_
24#define _LIBS_PCL_UTILS_POINTCLOUD_MANAGER_H_
26#include <core/exception.h>
27#include <core/threading/mutex_locker.h>
28#include <core/utils/lock_map.h>
29#include <core/utils/refptr.h>
30#include <pcl_utils/storage_adapter.h>
31#include <utils/time/time.h>
40template <
typename Po
intT>
52 template <
typename Po
intT>
57 template <
typename Po
intT>
65 template <
typename Po
intT>
76template <
typename Po
intT>
82 if (clouds_.find(
id) == clouds_.end()) {
85 throw Exception(
"Cloud %s already registered",
id);
89template <
typename Po
intT>
95 if (clouds_.find(
id) != clouds_.end()) {
101 if (strcmp(clouds_[
id]->get_typename(),
107 throw Exception(
"The desired point cloud is of a different type");
111 throw Exception(
"No point cloud with ID '%s' registered",
id);
115template <
typename Po
intT>
Base class for exceptions in Fawkes.
virtual ~PointCloudManager()
Destructor.
void remove_pointcloud(const char *id)
Remove the point cloud.
std::vector< std::string > get_pointcloud_list() const
Get list of point cloud IDs.
const pcl_utils::StorageAdapter * get_storage_adapter(const char *id)
Get a storage adapter.
bool exists_pointcloud(const char *id)
Check if point cloud exists.
const RefPtr< const pcl::PointCloud< PointT > > get_pointcloud(const char *id)
Get point cloud.
PointCloudManager()
Constructor.
const fawkes::LockMap< std::string, pcl_utils::StorageAdapter * > & get_pointclouds() const
Get map of point clouds.
void add_pointcloud(const char *id, RefPtr< pcl::PointCloud< PointT > > cloud)
Add point cloud.
RefPtr<> is a reference-counting shared smartpointer.
Adapter class for PCL point types.
const RefPtr< pcl::PointCloud< PointT > > cloud
The point cloud.
Fawkes library namespace.