41#include <pcl/pcl_config.h>
46#include <pcl/point_cloud.h>
47#include <pcl/io/grabber.h>
48#include <pcl/io/openni_camera/openni_driver.h>
49#include <pcl/io/openni_camera/openni_device_oni.h>
50#include <pcl/io/openni_camera/openni_image.h>
51#include <pcl/io/openni_camera/openni_depth_image.h>
52#include <pcl/io/openni_camera/openni_ir_image.h>
54#include <pcl/common/synchronizer.h>
86 ONIGrabber (
const std::string& file_name,
bool repeat,
bool stream);
123 return (
device_->hasDataLeft ());
pcl::shared_ptr< DepthImage > Ptr
pcl::shared_ptr< DeviceONI > Ptr
pcl::shared_ptr< IRImage > Ptr
pcl::shared_ptr< Image > Ptr
Grabber()=default
Default ctor.
std::string getName() const override
returns the name of the concrete subclass.
pcl::PointCloud< pcl::PointXYZI >::Ptr convertToXYZIPointCloud(const openni_wrapper::IRImage::Ptr &image, const openni_wrapper::DepthImage::Ptr &depth_image) const
internal method to assemble a point cloud object
bool isRunning() const override
Indicates whether the grabber is streaming or not.
bool hasDataLeft()
Check if there is any data left in the ONI file to process.
boost::signals2::signal< sig_cb_openni_point_cloud_rgb > * point_cloud_rgb_signal_
openni_wrapper::OpenNIDevice::CallbackHandle ir_callback_handle
ONIGrabber(const std::string &file_name, bool repeat, bool stream)
constructor
void(const pcl::PointCloud< pcl::PointXYZ >::ConstPtr &) sig_cb_openni_point_cloud
Synchronizer< openni_wrapper::Image::Ptr, openni_wrapper::DepthImage::Ptr > rgb_sync_
synchronizer object to synchronize image and depth streams
boost::signals2::signal< sig_cb_openni_depth_image > * depth_image_signal_
void(const pcl::PointCloud< pcl::PointXYZRGB >::ConstPtr &) sig_cb_openni_point_cloud_rgb
pcl::PointCloud< pcl::PointXYZRGB >::Ptr convertToXYZRGBPointCloud(const openni_wrapper::Image::Ptr &image, const openni_wrapper::DepthImage::Ptr &depth_image) const
internal method to assemble a point cloud object
void(const openni_wrapper::IRImage::Ptr &) sig_cb_openni_ir_image
openni_wrapper::OpenNIDevice::CallbackHandle image_callback_handle
openni_wrapper::DeviceONI::Ptr device_
the actual openni device
void irDepthImageCallback(const openni_wrapper::IRImage::Ptr &image, const openni_wrapper::DepthImage::Ptr &depth_image)
internal callback that handles synchronized IR + depth streams
boost::signals2::signal< sig_cb_openni_ir_depth_image > * ir_depth_image_signal_
void(const openni_wrapper::DepthImage::Ptr &) sig_cb_openni_depth_image
void start() override
For devices that are streaming, the streams are started by calling this method.
float getFramesPerSecond() const override
returns the frames pre second.
~ONIGrabber() noexcept override
destructor never throws an exception
std::string rgb_frame_id_
boost::signals2::signal< sig_cb_openni_image > * image_signal_
void imageDepthImageCallback(const openni_wrapper::Image::Ptr &image, const openni_wrapper::DepthImage::Ptr &depth_image)
internal callback that handles synchronized image + depth streams
Synchronizer< openni_wrapper::IRImage::Ptr, openni_wrapper::DepthImage::Ptr > ir_sync_
synchronizer object to synchronize IR and depth streams
void(const openni_wrapper::IRImage::Ptr &, const openni_wrapper::DepthImage::Ptr &, float) sig_cb_openni_ir_depth_image
void stop() override
For devices that are streaming, the streams are stopped.
boost::signals2::signal< sig_cb_openni_point_cloud > * point_cloud_signal_
void(const openni_wrapper::Image::Ptr &) sig_cb_openni_image
void(const pcl::PointCloud< pcl::PointXYZI >::ConstPtr &) sig_cb_openni_point_cloud_i
void irCallback(openni_wrapper::IRImage::Ptr ir_image, void *cookie)
internal OpenNI (openni_wrapper) callback that handles IR streams
openni_wrapper::OpenNIDevice::CallbackHandle depth_callback_handle
pcl::PointCloud< pcl::PointXYZRGBA >::Ptr convertToXYZRGBAPointCloud(const openni_wrapper::Image::Ptr &image, const openni_wrapper::DepthImage::Ptr &depth_image) const
internal method to assemble a point cloud object
boost::signals2::signal< sig_cb_openni_point_cloud_rgba > * point_cloud_rgba_signal_
void(const openni_wrapper::Image::Ptr &, const openni_wrapper::DepthImage::Ptr &, float) sig_cb_openni_image_depth_image
void(const pcl::PointCloud< pcl::PointXYZRGBA >::ConstPtr &) sig_cb_openni_point_cloud_rgba
boost::signals2::signal< sig_cb_openni_ir_image > * ir_image_signal_
void imageCallback(openni_wrapper::Image::Ptr image, void *cookie)
internal OpenNI (openni_wrapper) callback that handles image streams
std::string depth_frame_id_
void depthCallback(openni_wrapper::DepthImage::Ptr depth_image, void *cookie)
internal OpenNI (openni_wrapper) callback that handles depth streams
boost::signals2::signal< sig_cb_openni_image_depth_image > * image_depth_image_signal_
boost::signals2::signal< sig_cb_openni_point_cloud_i > * point_cloud_i_signal_
pcl::PointCloud< pcl::PointXYZ >::Ptr convertToXYZPointCloud(const openni_wrapper::DepthImage::Ptr &depth) const
internal method to assemble a point cloud object
shared_ptr< PointCloud< PointT > > Ptr
shared_ptr< const PointCloud< PointT > > ConstPtr
/brief This template class synchronizes two data streams of different types.
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
Defines functions, macros and traits for allocating and using memory.
Defines all the PCL and non-PCL macros used.
A point structure representing Euclidean xyz coordinates.
A point structure representing Euclidean xyz coordinates, and the RGBA color.
A point structure representing Euclidean xyz coordinates, and the RGB color.