pcl::PCDGrabber< PointT > Class Template Reference

`#include <pcl/io/pcd_grabber.h>`

Inheritance diagram for pcl::PCDGrabber< PointT >:

## Public Member Functions

| PCDGrabber (const std::string &pcd_path, float frames_per_second=0, bool repeat=false)
| PCDGrabber (const std::vector< std::string > &pcd_files, float frames_per_second=0, bool repeat=false)
virtual | ~PCDGrabber () throw ()
| Virtual destructor. More...
const boost::shared_ptr< const pcl::PointCloud< PointT > > | operator[] (size_t idx) const
| operator[] Returns the idx-th cloud in the dataset, without bounds checking. More...
size_t | size () const
| size Returns the number of clouds currently loaded by the grabber More...
Public Member Functions inherited from pcl::PCDGrabberBase
| PCDGrabberBase (const std::string &pcd_file, float frames_per_second, bool repeat)
| Constructor taking just one PCD file or one TAR file containing multiple PCD files. More...
| PCDGrabberBase (const std::vector< std::string > &pcd_files, float frames_per_second, bool repeat)
| Constructor taking a list of paths to PCD files, that are played in the order they appear in the list. More...
| PCDGrabberBase (const PCDGrabberBase &src)
| Copy constructor. More...
PCDGrabberBase & | operator= (const PCDGrabberBase &src)
| Copy operator. More...
virtual | ~PCDGrabberBase () throw ()
| Virtual destructor. More...
virtual void | start ()
| Starts playing the list of PCD files if frames_per_second is > 0. More...
virtual void | stop ()
| Stops playing the list of PCD files if frames_per_second is > 0. More...
virtual void | trigger ()
| Triggers a callback with new data. More...
virtual bool | isRunning () const
| Indicates whether the grabber is streaming or not. More...
virtual std::string | getName () const
virtual void | rewind ()
| Rewinds to the first PCD file in the list. More...
virtual float | getFramesPerSecond () const
| Returns the frames_per_second. More...
bool | isRepeatOn () const
| Returns whether the repeat flag is on. More...
bool | getCloudAt (size_t idx, pcl::PCLPointCloud2 &blob, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation) const
| Get cloud (in ROS form) at a particular location. More...
size_t | numFrames () const
| Returns the size. More...
Public Member Functions inherited from pcl::Grabber
| Grabber ()
| Constructor. More...
virtual | ~Grabber () throw ()
| virtual desctructor. More...
template<typename T >
boost::signals2::connection | registerCallback (const boost::function< T > &callback)
| registers a callback function/method to a signal with the corresponding signature More...
template<typename T >
bool | providesCallback () const
| indicates whether a signal with given parameter-type exists or not More...
Public Member Functions inherited from pcl::FileGrabber< PointT >
virtual | ~FileGrabber ()
| Empty destructor. More...
virtual const boost::shared_ptr< const pcl::PointCloud< PointT > > | at (size_t idx) const
| at Returns the idx-th cloud in the dataset, with bounds checking More...

## Protected Member Functions

virtual void | publish (const pcl::PCLPointCloud2 &blob, const Eigen::Vector4f &origin, const Eigen::Quaternionf &orientation, const std::string &file_name) const
Protected Member Functions inherited from pcl::Grabber
virtual void | signalsChanged ()
template<typename T >
boost::signals2::signal< T > * | find_signal () const
template<typename T >
int | num_slots () const
template<typename T >
void | disconnect_all_slots ()
template<typename T >
void | block_signal ()
template<typename T >
void | unblock_signal ()
void | block_signals ()
void | unblock_signals ()
template<typename T >
boost::signals2::signal< T > * | createSignal ()

## Protected Attributes

boost::signals2::signal< void(const boost::shared_ptr< const pcl::PointCloud< PointT > > &)> * | signal_
boost::signals2::signal< void(const std::string &)> * | file_name_signal_
boost::signals2::signal< void(const boost::shared_ptr< openni_wrapper::DepthImage > &)> * | depth_image_signal_
boost::signals2::signal< void(const boost::shared_ptr< openni_wrapper::Image > &)> * | image_signal_
boost::signals2::signal< void(const boost::shared_ptr< openni_wrapper::Image > &, const boost::shared_ptr< openni_wrapper::DepthImage > &, float constant)> * | image_depth_image_signal_
Protected Attributes inherited from pcl::Grabber
std::map< std::string, boost::signals2::signal_base * > | signals_
std::map< std::string, std::vector< boost::signals2::connection > > | connections_
std::map< std::string, std::vector< boost::signals2::shared_connection_block > > | shared_connections_

## Detailed Description

### template<typename PointT>
class pcl::PCDGrabber< PointT >

Definition at line 156 of file pcd_grabber.h.

## Constructor & Destructor Documentation

## PCDGrabber() [1/2]

template<typename PointT >

pcl::PCDGrabber< PointT >::PCDGrabber | ( | const std::string & | pcd_path,
|  | float | frames_per_second = `0`,
|  | bool | repeat = `false`
| ) |  |

Definition at line 192 of file pcd_grabber.h.

References pcl::PCDGrabber< PointT >::depth_image_signal_, pcl::PCDGrabber< PointT >::file_name_signal_, pcl::PCDGrabber< PointT >::image_depth_image_signal_, pcl::PCDGrabber< PointT >::image_signal_, and pcl::PCDGrabber< PointT >::signal_.

## PCDGrabber() [2/2]

template<typename PointT >

pcl::PCDGrabber< PointT >::PCDGrabber | ( | const std::vector< std::string > & | pcd_files,
|  | float | frames_per_second = `0`,
|  | bool | repeat = `false`
| ) |  |

Definition at line 206 of file pcd_grabber.h.

References pcl::PCDGrabber< PointT >::depth_image_signal_, pcl::PCDGrabber< PointT >::file_name_signal_, pcl::PCDGrabber< PointT >::image_depth_image_signal_, pcl::PCDGrabber< PointT >::image_signal_, and pcl::PCDGrabber< PointT >::signal_.

## ~PCDGrabber()

template<typename PointT >

virtual pcl::PCDGrabber< PointT >::~PCDGrabber | ( |  | ) |
throw | ( |
| ) |  |

inline virtual

Virtual destructor.

Definition at line 163 of file pcd_grabber.h.

## Member Function Documentation

## operator[]()

template<typename PointT >

const boost::shared_ptr< const pcl::PointCloud< PointT > > pcl::PCDGrabber< PointT >::operator[] | ( | size_t | idx | ) | const

virtual

operator[] Returns the idx-th cloud in the dataset, without bounds checking.

Note that in the future, this could easily be modified to do caching

Parameters

  [in] | idx | The frame to load

Implements pcl::FileGrabber< PointT >.

Definition at line 220 of file pcd_grabber.h.

References pcl::fromPCLPointCloud2(), pcl::PCDGrabberBase::getCloudAt(), pcl::PointCloud< PointT >::sensor_orientation_, and pcl::PointCloud< PointT >::sensor_origin_.

## publish()

template<typename PointT >

void pcl::PCDGrabber< PointT >::publish | ( | const pcl::PCLPointCloud2 & | blob,
|  | const Eigen::Vector4f & | origin,
|  | const Eigen::Quaternionf & | orientation,
|  | const std::string & | file_name
| ) |  | const

protected virtual

Implements pcl::PCDGrabberBase.

Definition at line 242 of file pcd_grabber.h.

References pcl::PCDGrabber< PointT >::depth_image_signal_, pcl::PCDGrabber< PointT >::file_name_signal_, pcl::fromPCLPointCloud2(), pcl::getFieldIndex(), pcl::PointCloud< PointT >::height, pcl::PCDGrabber< PointT >::image_depth_image_signal_, pcl::PCDGrabber< PointT >::image_signal_, pcl::PointCloud< PointT >::isOrganized(), pcl::PointCloud< PointT >::points, pcl::PointCloud< PointT >::sensor_orientation_, pcl::PointCloud< PointT >::sensor_origin_, pcl::PCDGrabber< PointT >::signal_, and pcl::PointCloud< PointT >::width.

## size()

template<typename PointT >

size_t pcl::PCDGrabber< PointT >::size | ( |  | ) | const

virtual

size Returns the number of clouds currently loaded by the grabber

Implements pcl::FileGrabber< PointT >.

Definition at line 235 of file pcd_grabber.h.

References pcl::PCDGrabberBase::numFrames().

## Member Data Documentation

## depth_image_signal_

template<typename PointT >

boost::signals2::signal<void (const boost::shared_ptr<openni_wrapper::DepthImage>&)>* pcl::PCDGrabber< PointT >::depth_image_signal_

protected

Definition at line 184 of file pcd_grabber.h.

Referenced by pcl::PCDGrabber< PointT >::PCDGrabber(), and pcl::PCDGrabber< PointT >::publish().

## file_name_signal_

template<typename PointT >

boost::signals2::signal<void (const std::string&)>* pcl::PCDGrabber< PointT >::file_name_signal_

protected

Definition at line 181 of file pcd_grabber.h.

Referenced by pcl::PCDGrabber< PointT >::PCDGrabber(), and pcl::PCDGrabber< PointT >::publish().

## image_depth_image_signal_

template<typename PointT >

boost::signals2::signal<void (const boost::shared_ptr<openni_wrapper::Image>&, const boost::shared_ptr<openni_wrapper::DepthImage>&, float constant)>* pcl::PCDGrabber< PointT >::image_depth_image_signal_

protected

Definition at line 186 of file pcd_grabber.h.

Referenced by pcl::PCDGrabber< PointT >::PCDGrabber(), and pcl::PCDGrabber< PointT >::publish().

## image_signal_

template<typename PointT >

boost::signals2::signal<void (const boost::shared_ptr<openni_wrapper::Image>&)>* pcl::PCDGrabber< PointT >::image_signal_

protected

Definition at line 185 of file pcd_grabber.h.

Referenced by pcl::PCDGrabber< PointT >::PCDGrabber(), and pcl::PCDGrabber< PointT >::publish().

## signal_

template<typename PointT >

boost::signals2::signal<void (const boost::shared_ptr<const pcl::PointCloud<PointT> >&)>* pcl::PCDGrabber< PointT >::signal_

protected

Definition at line 180 of file pcd_grabber.h.

Referenced by pcl::PCDGrabber< PointT >::PCDGrabber(), and pcl::PCDGrabber< PointT >::publish().

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

- /build/pcl-OilVEB/pcl-1.8.1+dfsg1/io/include/pcl/io/pcd_grabber.h