Point Cloud Library (PCL) 1.12.0
Loading...
Searching...
No Matches
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
pcl::PCDGrabber< PointT > Class Template Reference

#include <pcl/io/pcd_grabber.h>

+ Inheritance diagram for pcl::PCDGrabber< PointT >:
+ Collaboration diagram for pcl::PCDGrabber< PointT >:

Public Types

using Ptr = shared_ptr<PCDGrabber>
 
using ConstPtr = shared_ptr<const PCDGrabber>
 

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)
 
 ~PCDGrabber () noexcept
 Virtual destructor.
 
const pcl::PointCloud< PointT >::ConstPtr operator[] (std::size_t idx) const override
 operator[] Returns the idx-th cloud in the dataset, without bounds checking.
 
std::size_t size () const override
 size Returns the number of clouds currently loaded by the grabber
 
- 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.
 
 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.
 
 ~PCDGrabberBase () noexcept
 Virtual destructor.
 
void start () override
 Starts playing the list of PCD files if frames_per_second is > 0.
 
void stop () override
 Stops playing the list of PCD files if frames_per_second is > 0.
 
virtual void trigger ()
 Triggers a callback with new data.
 
bool isRunning () const override
 Indicates whether the grabber is streaming or not.
 
std::string getName () const override
 
virtual void rewind ()
 Rewinds to the first PCD file in the list.
 
float getFramesPerSecond () const override
 Returns the frames_per_second.
 
bool isRepeatOn () const
 Returns whether the repeat flag is on.
 
bool getCloudAt (std::size_t idx, pcl::PCLPointCloud2 &blob, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation) const
 Get cloud (in ROS form) at a particular location.
 
std::size_t numFrames () const
 Returns the size.
 
- Public Member Functions inherited from pcl::Grabber
 Grabber ()=default
 Default ctor.
 
 Grabber (const Grabber &)=delete
 No copy ctor since Grabber can't be copied.
 
Grabberoperator= (const Grabber &)=delete
 No copy assign operator since Grabber can't be copied.
 
 Grabber (Grabber &&)=default
 Move ctor.
 
Grabberoperator= (Grabber &&)=default
 Move assign operator.
 
virtual ~Grabber () noexcept=default
 virtual destructor.
 
template<typename T >
boost::signals2::connection registerCallback (const std::function< T > &callback)
 registers a callback function/method to a signal with the corresponding signature
 
template<typename T >
bool providesCallback () const noexcept
 indicates whether a signal with given parameter-type exists or not
 
bool toggle ()
 For devices that are streaming, stopped streams are started and running stream are stopped.
 
- Public Member Functions inherited from pcl::FileGrabber< PointT >
virtual ~FileGrabber ()
 Empty destructor.
 
virtual const pcl::PointCloud< PointT >::ConstPtr at (std::size_t idx) const
 at Returns the idx-th cloud in the dataset, with bounds checking
 

Protected Member Functions

void publish (const pcl::PCLPointCloud2 &blob, const Eigen::Vector4f &origin, const Eigen::Quaternionf &orientation, const std::string &file_name) const override
 
- Protected Member Functions inherited from pcl::Grabber
virtual void signalsChanged ()
 
template<typename T >
boost::signals2::signal< T > * find_signal () const noexcept
 
template<typename T >
int num_slots () const noexcept
 
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 typename pcl::PointCloud< PointT >::ConstPtr &)> signal_ )
 
boost::signals2::signal< void(const std::string &)> file_name_signal_ )
 
boost::signals2::signal< void(const openni_wrapper::DepthImage::Ptr &)> depth_image_signal_ )
 
boost::signals2::signal< void(const openni_wrapper::Image::Ptr &)> image_signal_ )
 
boost::signals2::signal< void(const openni_wrapper::Image::Ptr &, const openni_wrapper::DepthImage::Ptr &, float constant)> image_depth_image_signal_ )
 
- Protected Attributes inherited from pcl::Grabber
std::map< std::string, std::unique_ptr< 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 139 of file pcd_grabber.h.

Member Typedef Documentation

◆ ConstPtr

template<typename PointT >
using pcl::PCDGrabber< PointT >::ConstPtr = shared_ptr<const PCDGrabber>

Definition at line 143 of file pcd_grabber.h.

◆ Ptr

template<typename PointT >
using pcl::PCDGrabber< PointT >::Ptr = shared_ptr<PCDGrabber>

Definition at line 142 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 )

◆ 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 )

◆ ~PCDGrabber()

template<typename PointT >
pcl::PCDGrabber< PointT >::~PCDGrabber ( )
inlinenoexcept

Virtual destructor.

Definition at line 149 of file pcd_grabber.h.

Member Function Documentation

◆ operator[]()

template<typename PointT >
const pcl::PointCloud< PointT >::ConstPtr pcl::PCDGrabber< PointT >::operator[] ( std::size_t idx) const
overridevirtual

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]idxThe frame to load

Implements pcl::FileGrabber< PointT >.

Definition at line 206 of file pcd_grabber.h.

References pcl::ConstCloudIterator< PointT >::ConstCloudIterator(), and pcl::fromPCLPointCloud2().

◆ 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
overrideprotectedvirtual

◆ size()

template<typename PointT >
std::size_t pcl::PCDGrabber< PointT >::size ( ) const
overridevirtual

size Returns the number of clouds currently loaded by the grabber

Implements pcl::FileGrabber< PointT >.

Definition at line 221 of file pcd_grabber.h.

Member Data Documentation

◆ depth_image_signal_

template<typename PointT >
boost::signals2::signal<void (const openni_wrapper::DepthImage::Ptr&)> pcl::PCDGrabber< PointT >::depth_image_signal_)
protected

◆ file_name_signal_

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

◆ image_depth_image_signal_

template<typename PointT >
boost::signals2::signal<void (const openni_wrapper::Image::Ptr&, const openni_wrapper::DepthImage::Ptr&, float constant)> pcl::PCDGrabber< PointT >::image_depth_image_signal_)
protected

◆ image_signal_

template<typename PointT >
boost::signals2::signal<void (const openni_wrapper::Image::Ptr&)> pcl::PCDGrabber< PointT >::image_signal_)
protected

◆ signal_

template<typename PointT >
boost::signals2::signal<void (const typename pcl::PointCloud<PointT>::ConstPtr&)> pcl::PCDGrabber< PointT >::signal_)
protected

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