40 #include <pcl/io/grabber.h>
42 #include <pcl/point_cloud.h>
59 template <
typename T>
class Buffer;
63 class RealSenseDevice;
73 using Ptr = shared_ptr<RealSenseGrabber>;
74 using ConstPtr = shared_ptr<const RealSenseGrabber>;
102 Mode (
unsigned int depth_width,
unsigned int depth_height);
106 Mode (
unsigned int fps,
unsigned int depth_width,
unsigned int depth_height);
110 Mode (
unsigned int depth_width,
unsigned int depth_height,
unsigned int color_width,
unsigned int color_height);
113 Mode (
unsigned int fps,
unsigned int depth_width,
unsigned int depth_height,
unsigned int color_width,
unsigned int color_height);
122 RealSense_Median = 1,
123 RealSense_Average = 2,
161 return (std::string (
"RealSenseGrabber"));
216 return (mode_selected_);
225 createDepthBuffer ();
236 computeModeScore (
const Mode& mode);
239 boost::signals2::signal<sig_cb_real_sense_point_cloud>* point_cloud_signal_;
240 boost::signals2::signal<sig_cb_real_sense_point_cloud_rgba>* point_cloud_rgba_signal_;
242 std::shared_ptr<pcl::io::real_sense::RealSenseDevice> device_;
245 unsigned int confidence_threshold_;
247 TemporalFilteringType temporal_filtering_type_;
248 std::size_t temporal_filtering_window_size_;
251 Mode mode_requested_;
270 mutable std::mutex fps_mutex_;
275 std::shared_ptr<pcl::io::Buffer<unsigned short> > depth_buffer_;
A helper class to measure frequency of a certain event.
Grabber interface for PCL 1.x device drivers.
shared_ptr< const PointCloud< PointT > > ConstPtr
void(const pcl::PointCloud< pcl::PointXYZRGBA >::ConstPtr &) sig_cb_real_sense_point_cloud_rgba
void setMode(const Mode &mode, bool strict=false)
Set desired capturing mode.
void(const pcl::PointCloud< pcl::PointXYZ >::ConstPtr &) sig_cb_real_sense_point_cloud
void enableTemporalFiltering(TemporalFilteringType type, std::size_t window_size)
Enable temporal filtering of the depth data received from the device.
virtual ~RealSenseGrabber() noexcept
std::vector< Mode > getAvailableModes(bool only_depth=false) const
Get a list of capturing modes supported by the PXC device controlled by this grabber.
virtual float getFramesPerSecond() const
returns fps.
shared_ptr< RealSenseGrabber > Ptr
void disableTemporalFiltering()
Disable temporal filtering.
shared_ptr< const RealSenseGrabber > ConstPtr
const Mode & getMode() const
Get currently active capturing mode.
RealSenseGrabber(const std::string &device_id="", const Mode &mode=Mode(), bool strict=false)
Create a grabber for a RealSense device.
const std::string & getDeviceSerialNumber() const
Get the serial number of device captured by the grabber.
void setConfidenceThreshold(unsigned int threshold)
Set the confidence threshold for depth data.
Defines all the PCL implemented PointT point type structures.
Define methods for measuring time spent in code blocks.
Defines functions, macros and traits for allocating and using memory.
bool operator==(const PCLHeader &lhs, const PCLHeader &rhs)
A descriptor for capturing mode.
Mode(unsigned int fps, unsigned int depth_width, unsigned int depth_height)
Set desired framerate and depth resolution, the rest is "don't care".
Mode(unsigned int depth_width, unsigned int depth_height, unsigned int color_width, unsigned int color_height)
Set desired depth and color resolution, the rest is "don't care".
Mode(unsigned int fps)
Set desired framerate, the rest is "don't care".
Mode(unsigned int fps, unsigned int depth_width, unsigned int depth_height, unsigned int color_width, unsigned int color_height)
Set desired framerate, depth and color resolution.
unsigned int depth_height
Mode()
Set all fields to zero (i.e.
Mode(unsigned int depth_width, unsigned int depth_height)
Set desired depth resolution, the rest is "don't care".
unsigned int color_height