Point Cloud Library (PCL)
1.14.1-dev
|
#include <pcl/io/real_sense_grabber.h>
Classes | |
struct | Mode |
A descriptor for capturing mode. More... | |
Public Types | |
enum | TemporalFilteringType { RealSense_None = 0 , RealSense_Median = 1 , RealSense_Average = 2 } |
using | Ptr = shared_ptr< RealSenseGrabber > |
using | ConstPtr = shared_ptr< const RealSenseGrabber > |
using | sig_cb_real_sense_point_cloud = void(const pcl::PointCloud< pcl::PointXYZ >::ConstPtr &) |
using | sig_cb_real_sense_point_cloud_rgba = void(const pcl::PointCloud< pcl::PointXYZRGBA >::ConstPtr &) |
Public Member Functions | |
RealSenseGrabber (const std::string &device_id="", const Mode &mode=Mode(), bool strict=false) | |
Create a grabber for a RealSense device. More... | |
virtual | ~RealSenseGrabber () noexcept |
virtual void | start () |
For devices that are streaming, the streams are started by calling this method. More... | |
virtual void | stop () |
For devices that are streaming, the streams are stopped. More... | |
virtual bool | isRunning () const |
Indicates whether the grabber is streaming or not. More... | |
virtual std::string | getName () const |
returns the name of the concrete subclass. More... | |
virtual float | getFramesPerSecond () const |
returns fps. More... | |
void | setConfidenceThreshold (unsigned int threshold) |
Set the confidence threshold for depth data. More... | |
void | enableTemporalFiltering (TemporalFilteringType type, std::size_t window_size) |
Enable temporal filtering of the depth data received from the device. More... | |
void | disableTemporalFiltering () |
Disable temporal filtering. More... | |
const std::string & | getDeviceSerialNumber () const |
Get the serial number of device captured by the grabber. More... | |
std::vector< Mode > | getAvailableModes (bool only_depth=false) const |
Get a list of capturing modes supported by the PXC device controlled by this grabber. More... | |
void | setMode (const Mode &mode, bool strict=false) |
Set desired capturing mode. More... | |
const Mode & | getMode () const |
Get currently active capturing mode. More... | |
Public Member Functions inherited from pcl::Grabber | |
Grabber ()=default | |
Default ctor. More... | |
Grabber (const Grabber &)=delete | |
No copy ctor since Grabber can't be copied. More... | |
Grabber & | operator= (const Grabber &)=delete |
No copy assign operator since Grabber can't be copied. More... | |
Grabber (Grabber &&)=default | |
Move ctor. More... | |
Grabber & | operator= (Grabber &&)=default |
Move assign operator. More... | |
virtual | ~Grabber () noexcept=default |
virtual destructor. More... | |
template<typename T > | |
boost::signals2::connection | registerCallback (const std::function< T > &callback) |
registers a callback function/method to a signal with the corresponding signature More... | |
template<typename T > | |
bool | providesCallback () const noexcept |
indicates whether a signal with given parameter-type exists or not More... | |
bool | toggle () |
For devices that are streaming, stopped streams are started and running stream are stopped. More... | |
Additional Inherited Members | |
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 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_ |
Definition at line 68 of file real_sense_grabber.h.
using pcl::RealSenseGrabber::ConstPtr = shared_ptr<const RealSenseGrabber> |
Definition at line 74 of file real_sense_grabber.h.
using pcl::RealSenseGrabber::Ptr = shared_ptr<RealSenseGrabber> |
Definition at line 73 of file real_sense_grabber.h.
using pcl::RealSenseGrabber::sig_cb_real_sense_point_cloud = void(const pcl::PointCloud<pcl::PointXYZ>::ConstPtr&) |
Definition at line 76 of file real_sense_grabber.h.
using pcl::RealSenseGrabber::sig_cb_real_sense_point_cloud_rgba = void(const pcl::PointCloud<pcl::PointXYZRGBA>::ConstPtr&) |
Definition at line 77 of file real_sense_grabber.h.
Enumerator | |
---|---|
RealSense_None | |
RealSense_Median | |
RealSense_Average |
Definition at line 119 of file real_sense_grabber.h.
pcl::RealSenseGrabber::RealSenseGrabber | ( | const std::string & | device_id = "" , |
const Mode & | mode = Mode() , |
||
bool | strict = false |
||
) |
Create a grabber for a RealSense device.
The grabber "captures" the device, making it impossible for other grabbers to interact with it. The device is "released" when the grabber is destructed.
This will throw pcl::io::IOException if there are no free devices that match the supplied device_id.
[in] | device_id | device identifier, which can be a serial number, a zero-based index (with '#' prefix), or an empty string (to select the first available device) |
[in] | mode | desired framerate and stream resolution (see Mode). If the default is supplied, then the mode closest to VGA at 30 Hz will be chosen. |
[in] | strict | if set to true , an exception will be thrown if device does not support exactly the mode requested. Otherwise the closest available mode is selected. |
|
virtualnoexcept |
void pcl::RealSenseGrabber::disableTemporalFiltering | ( | ) |
Disable temporal filtering.
void pcl::RealSenseGrabber::enableTemporalFiltering | ( | TemporalFilteringType | type, |
std::size_t | window_size | ||
) |
Enable temporal filtering of the depth data received from the device.
The window size parameter is not relevant for RealSense_None
filtering type.
std::vector<Mode> pcl::RealSenseGrabber::getAvailableModes | ( | bool | only_depth = false | ) | const |
Get a list of capturing modes supported by the PXC device controlled by this grabber.
[in] | only_depth | list depth-only modes |
const std::string& pcl::RealSenseGrabber::getDeviceSerialNumber | ( | ) | const |
Get the serial number of device captured by the grabber.
|
virtual |
|
inline |
Get currently active capturing mode.
Definition at line 214 of file real_sense_grabber.h.
|
inlinevirtual |
returns the name of the concrete subclass.
Implements pcl::Grabber.
Definition at line 159 of file real_sense_grabber.h.
|
virtual |
Indicates whether the grabber is streaming or not.
This value is not defined for triggered devices.
Implements pcl::Grabber.
void pcl::RealSenseGrabber::setConfidenceThreshold | ( | unsigned int | threshold | ) |
Set the confidence threshold for depth data.
Valid range is [0..15]. Discarded points will have their coordinates set to NaNs).
void pcl::RealSenseGrabber::setMode | ( | const Mode & | mode, |
bool | strict = false |
||
) |
Set desired capturing mode.
|
virtual |
For devices that are streaming, the streams are started by calling this method.
Trigger-based devices, just trigger the device once for each call of start.
Implements pcl::Grabber.
|
virtual |
For devices that are streaming, the streams are stopped.
This method has no effect for triggered devices.
Implements pcl::Grabber.