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);
107 getName () const override;
113 isRunning () const override;
117 getFramesPerSecond () const override;
123 return (device_->hasDataLeft ());
178 bool running_{
false};
179 unsigned image_width_{0};
180 unsigned image_height_{0};
181 unsigned depth_width_{0};
182 unsigned depth_height_{0};
186 boost::signals2::signal<sig_cb_openni_image >* image_signal_{};
187 boost::signals2::signal<sig_cb_openni_depth_image >* depth_image_signal_{};
188 boost::signals2::signal<sig_cb_openni_ir_image >* ir_image_signal_{};
189 boost::signals2::signal<sig_cb_openni_image_depth_image>* image_depth_image_signal_{};
190 boost::signals2::signal<sig_cb_openni_ir_depth_image>* ir_depth_image_signal_{};
191 boost::signals2::signal<sig_cb_openni_point_cloud >* point_cloud_signal_{};
192 boost::signals2::signal<sig_cb_openni_point_cloud_i >* point_cloud_i_signal_{};
193 boost::signals2::signal<sig_cb_openni_point_cloud_rgb >* point_cloud_rgb_signal_{};
194 boost::signals2::signal<sig_cb_openni_point_cloud_rgba >* point_cloud_rgba_signal_{};
pcl::shared_ptr< DepthImage > Ptr
pcl::shared_ptr< DeviceONI > Ptr
pcl::shared_ptr< IRImage > Ptr
pcl::shared_ptr< Image > Ptr
Grabber interface for PCL 1.x device drivers.
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
void(const pcl::PointCloud< pcl::PointXYZRGB >::ConstPtr &) sig_cb_openni_point_cloud_rgb
void(const openni_wrapper::IRImage::Ptr &) sig_cb_openni_ir_image
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
void(const openni_wrapper::DepthImage::Ptr &) sig_cb_openni_depth_image
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
~ONIGrabber() noexcept override
destructor never throws an exception
std::string rgb_frame_id_
void imageDepthImageCallback(const openni_wrapper::Image::Ptr &image, const openni_wrapper::DepthImage::Ptr &depth_image)
internal callback that handles synchronized image + depth streams
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
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
pcl::PointCloud< pcl::PointXYZ >::Ptr convertToXYZPointCloud(const openni_wrapper::DepthImage::Ptr &depth) const
internal method to assemble a point cloud object
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
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
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
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
shared_ptr< PointCloud< PointT > > Ptr
shared_ptr< const PointCloud< PointT > > ConstPtr
#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.