Fawkes API  Fawkes Development Version
fawkes::pcl_utils::PointCloudStorageAdapter< PointT > Class Template Reference

Adapter class for PCL point types. More...

#include <>>

Inheritance diagram for fawkes::pcl_utils::PointCloudStorageAdapter< PointT >:

Public Member Functions

 PointCloudStorageAdapter (RefPtr< pcl::PointCloud< PointT > > cloud)
 Constructor. More...
 
 PointCloudStorageAdapter (const PointCloudStorageAdapter< PointT > *p)
 Copy constructor. More...
 
pcl::PointCloud< PointT >::Ptr cloud_ptr ()
 Get PCL shared pointer to cloud. More...
 
pcl::PointCloud< PointT >::ConstPtr cloud_const_ptr ()
 Get PCL const shared pointer to cloud. More...
 
virtual StorageAdapterclone () const
 Clone this storage adapter. More...
 
virtual void transform (const std::string &target_frame, const tf::Transformer &transformer)
 Transform point cloud. More...
 
virtual void transform (const std::string &target_frame, const Time &target_time, const std::string &fixed_frame, const tf::Transformer &transformer)
 Transform point cloud. More...
 
virtual const char * get_typename ()
 Get typename of storage adapter. More...
 
virtual size_t point_size () const
 Get size of a point. More...
 
virtual unsigned int width () const
 Get width of point cloud. More...
 
virtual unsigned int height () const
 Get height of point cloud. More...
 
virtual size_t num_points () const
 Get numer of points in point cloud. More...
 
virtual void * data_ptr () const
 Get pointer on data. More...
 
virtual std::string frame_id () const
 Get frame ID of point cloud. More...
 
virtual void get_time (fawkes::Time &time) const
 Get last capture time. More...
 
- Public Member Functions inherited from fawkes::pcl_utils::StorageAdapter
virtual ~StorageAdapter ()
 Virtual empty destructor. More...
 
template<typename PointT >
bool is_pointtype () const
 Check if storage adapter is for specified point type. More...
 
template<typename PointT >
PointCloudStorageAdapter< PointT > * as_pointtype ()
 Transform to specific PointCloudStorageAdapter. More...
 

Public Attributes

const RefPtr< pcl::PointCloud< PointT > > cloud
 The point cloud. More...
 

Detailed Description

template<typename PointT>
class fawkes::pcl_utils::PointCloudStorageAdapter< PointT >

Adapter class for PCL point types.

The adapter class is required to store point clouds of arbitrary point types.

Author
Tim Niemueller

Definition at line 38 of file storage_adapter.h.

Constructor & Destructor Documentation

◆ PointCloudStorageAdapter() [1/2]

template<typename PointT>
fawkes::pcl_utils::PointCloudStorageAdapter< PointT >::PointCloudStorageAdapter ( RefPtr< pcl::PointCloud< PointT > >  cloud)
inline

Constructor.

Parameters
cloudcloud to encapsulate.

Definition at line 77 of file storage_adapter.h.

◆ PointCloudStorageAdapter() [2/2]

template<typename PointT>
fawkes::pcl_utils::PointCloudStorageAdapter< PointT >::PointCloudStorageAdapter ( const PointCloudStorageAdapter< PointT > *  p)
inline

Copy constructor.

Parameters
pstorage adapter to copy

Definition at line 83 of file storage_adapter.h.

Member Function Documentation

◆ clone()

template<typename PointT >
StorageAdapter * fawkes::pcl_utils::PointCloudStorageAdapter< PointT >::clone ( ) const
virtual

Clone this storage adapter.

Returns
cloned copy

Implements fawkes::pcl_utils::StorageAdapter.

Definition at line 146 of file storage_adapter.h.

◆ cloud_const_ptr()

template<typename PointT>
pcl::PointCloud<PointT>::ConstPtr fawkes::pcl_utils::PointCloudStorageAdapter< PointT >::cloud_const_ptr ( )
inline

Get PCL const shared pointer to cloud.

Returns
PCL const shared pointer to cloud

Definition at line 98 of file storage_adapter.h.

References fawkes::pcl_utils::StorageAdapter::clone(), and fawkes::pcl_utils::StorageAdapter::transform().

◆ cloud_ptr()

template<typename PointT>
pcl::PointCloud<PointT>::Ptr fawkes::pcl_utils::PointCloudStorageAdapter< PointT >::cloud_ptr ( )
inline

Get PCL shared pointer to cloud.

Returns
PCL shared pointer to cloud

Definition at line 92 of file storage_adapter.h.

◆ data_ptr()

template<typename PointT>
virtual void* fawkes::pcl_utils::PointCloudStorageAdapter< PointT >::data_ptr ( ) const
inlinevirtual

Get pointer on data.

Returns
pointer on data

Implements fawkes::pcl_utils::StorageAdapter.

Definition at line 116 of file storage_adapter.h.

◆ frame_id()

template<typename PointT>
virtual std::string fawkes::pcl_utils::PointCloudStorageAdapter< PointT >::frame_id ( ) const
inlinevirtual

Get frame ID of point cloud.

Returns
Frame ID of point cloud.

Implements fawkes::pcl_utils::StorageAdapter.

Definition at line 117 of file storage_adapter.h.

References fawkes::pcl_utils::StorageAdapter::get_time().

◆ get_time()

template<typename PointT >
void fawkes::pcl_utils::PointCloudStorageAdapter< PointT >::get_time ( fawkes::Time time) const
virtual

Get last capture time.

Parameters
timeupon return contains last capture time

Implements fawkes::pcl_utils::StorageAdapter.

Definition at line 154 of file storage_adapter.h.

◆ get_typename()

template<typename PointT>
virtual const char* fawkes::pcl_utils::PointCloudStorageAdapter< PointT >::get_typename ( )
inlinevirtual

Get typename of storage adapter.

Returns
type name

Implements fawkes::pcl_utils::StorageAdapter.

Definition at line 111 of file storage_adapter.h.

◆ height()

template<typename PointT>
virtual unsigned int fawkes::pcl_utils::PointCloudStorageAdapter< PointT >::height ( ) const
inlinevirtual

Get height of point cloud.

Returns
height of point cloud

Implements fawkes::pcl_utils::StorageAdapter.

Definition at line 114 of file storage_adapter.h.

◆ num_points()

template<typename PointT>
virtual size_t fawkes::pcl_utils::PointCloudStorageAdapter< PointT >::num_points ( ) const
inlinevirtual

Get numer of points in point cloud.

Returns
number of points

Implements fawkes::pcl_utils::StorageAdapter.

Definition at line 115 of file storage_adapter.h.

◆ point_size()

template<typename PointT>
virtual size_t fawkes::pcl_utils::PointCloudStorageAdapter< PointT >::point_size ( ) const
inlinevirtual

Get size of a point.

Returns
size in bytes of a single point

Implements fawkes::pcl_utils::StorageAdapter.

Definition at line 112 of file storage_adapter.h.

◆ transform() [1/2]

template<typename PointT >
void fawkes::pcl_utils::PointCloudStorageAdapter< PointT >::transform ( const std::string &  target_frame,
const tf::Transformer transformer 
)
virtual

Transform point cloud.

Parameters
target_frameframe to transform to
transformertransformer to get transform from

Implements fawkes::pcl_utils::StorageAdapter.

Definition at line 162 of file storage_adapter.h.

◆ transform() [2/2]

template<typename PointT >
void fawkes::pcl_utils::PointCloudStorageAdapter< PointT >::transform ( const std::string &  target_frame,
const Time target_time,
const std::string &  fixed_frame,
const tf::Transformer transformer 
)
virtual

Transform point cloud.

Parameters
target_frameframe to transform to
target_timetime for which to transform
fixed_frameframe fixed over time
transformertransformer to get transform from

Implements fawkes::pcl_utils::StorageAdapter.

Definition at line 172 of file storage_adapter.h.

◆ width()

template<typename PointT>
virtual unsigned int fawkes::pcl_utils::PointCloudStorageAdapter< PointT >::width ( ) const
inlinevirtual

Get width of point cloud.

Returns
width of point cloud

Implements fawkes::pcl_utils::StorageAdapter.

Definition at line 113 of file storage_adapter.h.

Member Data Documentation

◆ cloud

template<typename PointT>
const RefPtr<pcl::PointCloud<PointT> > fawkes::pcl_utils::PointCloudStorageAdapter< PointT >::cloud

The point cloud.

Definition at line 87 of file storage_adapter.h.

Referenced by fawkes::PointCloudManager::get_pointcloud().


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