Point Cloud Library (PCL)
1.14.1-dev
|
Grabber for davidSDK structured light compliant devices. More...
#include <pcl/io/davidsdk_grabber.h>
Public Member Functions | |
DavidSDKGrabber () | |
Constructor. More... | |
virtual | ~DavidSDKGrabber () noexcept |
Destructor inherited from the Grabber interface. More... | |
david::ServerInfo | connect (const std::string &address="127.0.0.1", std::uint16_t port=david::DAVID_SDK_DefaultPort) |
Connect client More... | |
void | disconnect (const bool stop_server) |
Disconnect client More... | |
void | start () |
Start the point cloud and or image acquisition. More... | |
void | stop () |
Stop the data acquisition. More... | |
bool | isRunning () const |
Check if the data acquisition is still running. More... | |
bool | isConnected () const |
Check if the client is connected. More... | |
std::string | getName () const |
Get class name. More... | |
std::string | getLocalPath () |
Get local_path_ path directory. More... | |
std::string | getRemotePath () |
Get remote_path_ path directory. More... | |
void | setFileFormatToOBJ () |
Set file_format_ to "obj". More... | |
void | setFileFormatToPLY () |
Set file_format_ to "ply". More... | |
void | setFileFormatToSTL () |
Set file_format_ to "stl". More... | |
std::string | getFileFormat () |
Get file_format_. More... | |
void | setLocalPath (std::string path) |
Set local_path_ path directory for scanning files. More... | |
void | setRemotePath (std::string path) |
Set remote_path_ path directory for scanning files. More... | |
void | setLocalAndRemotePaths (std::string local_path, std::string remote_path) |
Set local_path_ and remote_path_ directory paths. More... | |
bool | calibrate (double grid_size) |
Calibrate the scanner. More... | |
bool | grabSingleCloud (pcl::PointCloud< pcl::PointXYZ > &cloud) |
Capture a single point cloud and store it. More... | |
bool | grabSingleMesh (pcl::PolygonMesh &mesh) |
Capture a single mesh and store it. More... | |
float | getFramesPerSecond () const |
Obtain the number of frames per second (FPS) 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... | |
Public Attributes | |
david::Client | david_ |
davidSDK client More... | |
Protected Member Functions | |
void | processGrabbing () |
Continuously asks for images and or point clouds/meshes data from the device and publishes them if available. More... | |
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 | |
std::thread | grabber_thread_ |
Grabber thread. More... | |
boost::signals2::signal< sig_cb_davidsdk_point_cloud > * | point_cloud_signal_ |
Boost point cloud signal. More... | |
boost::signals2::signal< sig_cb_davidsdk_mesh > * | mesh_signal_ |
Boost mesh signal. More... | |
boost::signals2::signal< sig_cb_davidsdk_image > * | image_signal_ |
Boost image signal. More... | |
boost::signals2::signal< sig_cb_davidsdk_point_cloud_image > * | point_cloud_image_signal_ |
Boost image + point cloud signal. More... | |
boost::signals2::signal< sig_cb_davidsdk_mesh_image > * | mesh_image_signal_ |
Boost mesh + image signal. More... | |
bool | client_connected_ |
Whether the client is connected. More... | |
bool | running_ |
Whether an davidSDK device is running or not. More... | |
std::string | local_path_ |
Local path of directory where the scanning file will be located. More... | |
std::string | remote_path_ |
Remote path of directory where the scanning file will be located. More... | |
std::string | file_format_ |
Export file extension, available formats are STL, OBJ, PLY. More... | |
pcl::EventFrequency | frequency_ |
processGrabbing capture/processing frequency More... | |
std::mutex | fps_mutex_ |
Mutual exclusion for FPS computation. More... | |
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_ |
Grabber for davidSDK structured light compliant devices.
The davidSDK SDK allows to use a structured light scanner to fetch clouds/meshes.
The purpose of this grabber is NOT to provide all davidSDK functionalities but rather provide a PCL-unified interface to the sensor for basic operations.
Please consult the David-3d wiki for more information.
Definition at line 66 of file davidsdk_grabber.h.
pcl::DavidSDKGrabber::DavidSDKGrabber | ( | ) |
Constructor.
|
virtualnoexcept |
Destructor inherited from the Grabber interface.
It never throws.
bool pcl::DavidSDKGrabber::calibrate | ( | double | grid_size | ) |
Calibrate the scanner.
[in] | grid_size | Size of the calibration grid in millimeters |
More information here.
Also see ImportCalibration.
and ExportCalibration.
david::ServerInfo pcl::DavidSDKGrabber::connect | ( | const std::string & | address = "127.0.0.1" , |
std::uint16_t | port = david::DAVID_SDK_DefaultPort |
||
) |
void pcl::DavidSDKGrabber::disconnect | ( | const bool | stop_server | ) |
Disconnect client
[in] | stop_server |
std::string pcl::DavidSDKGrabber::getFileFormat | ( | ) |
Get file_format_.
|
virtual |
Obtain the number of frames per second (FPS)
Implements pcl::Grabber.
std::string pcl::DavidSDKGrabber::getLocalPath | ( | ) |
Get local_path_ path directory.
|
virtual |
std::string pcl::DavidSDKGrabber::getRemotePath | ( | ) |
Get remote_path_ path directory.
bool pcl::DavidSDKGrabber::grabSingleCloud | ( | pcl::PointCloud< pcl::PointXYZ > & | cloud | ) |
Capture a single point cloud and store it.
[out] | cloud | The cloud to be filled |
bool pcl::DavidSDKGrabber::grabSingleMesh | ( | pcl::PolygonMesh & | mesh | ) |
Capture a single mesh and store it.
[out] | mesh | The mesh to be filled |
bool pcl::DavidSDKGrabber::isConnected | ( | ) | const |
Check if the client is connected.
|
virtual |
Check if the data acquisition is still running.
Implements pcl::Grabber.
|
protected |
Continuously asks for images and or point clouds/meshes data from the device and publishes them if available.
void pcl::DavidSDKGrabber::setFileFormatToOBJ | ( | ) |
Set file_format_ to "obj".
void pcl::DavidSDKGrabber::setFileFormatToPLY | ( | ) |
Set file_format_ to "ply".
void pcl::DavidSDKGrabber::setFileFormatToSTL | ( | ) |
Set file_format_ to "stl".
void pcl::DavidSDKGrabber::setLocalAndRemotePaths | ( | std::string | local_path, |
std::string | remote_path | ||
) |
Set local_path_ and remote_path_ directory paths.
[in] | local_path | |
[in] | remote_path | If the path is empty, using default value ("C:/temp") |
void pcl::DavidSDKGrabber::setLocalPath | ( | std::string | path | ) |
Set local_path_ path directory for scanning files.
[in] | path | The directory path |
If the path is empty, using default value ("C:/temp")
void pcl::DavidSDKGrabber::setRemotePath | ( | std::string | path | ) |
Set remote_path_ path directory for scanning files.
[in] | path | The directory path |
If the string is empty, remote_path_ = local_path_
|
virtual |
Start the point cloud and or image acquisition.
Implements pcl::Grabber.
|
virtual |
Stop the data acquisition.
Implements pcl::Grabber.
|
protected |
Whether the client is connected.
Definition at line 234 of file davidsdk_grabber.h.
david::Client pcl::DavidSDKGrabber::david_ |
davidSDK client
Definition at line 212 of file davidsdk_grabber.h.
|
protected |
Export file extension, available formats are STL, OBJ, PLY.
Definition at line 249 of file davidsdk_grabber.h.
|
mutableprotected |
Mutual exclusion for FPS computation.
Definition at line 255 of file davidsdk_grabber.h.
|
protected |
processGrabbing capture/processing frequency
Definition at line 252 of file davidsdk_grabber.h.
|
protected |
Grabber thread.
Definition at line 216 of file davidsdk_grabber.h.
|
protected |
Boost image signal.
Definition at line 225 of file davidsdk_grabber.h.
|
protected |
Local path of directory where the scanning file will be located.
C:/temp
Definition at line 241 of file davidsdk_grabber.h.
|
protected |
Boost mesh + image signal.
Definition at line 231 of file davidsdk_grabber.h.
|
protected |
Boost mesh signal.
Definition at line 222 of file davidsdk_grabber.h.
|
protected |
Boost image + point cloud signal.
Definition at line 228 of file davidsdk_grabber.h.
|
protected |
Boost point cloud signal.
Definition at line 219 of file davidsdk_grabber.h.
|
protected |
Remote path of directory where the scanning file will be located.
C:/temp
Definition at line 246 of file davidsdk_grabber.h.
|
protected |
Whether an davidSDK device is running or not.
Definition at line 237 of file davidsdk_grabber.h.