pcl::DavidSDKGrabber Class Reference
Module io

Grabber for davidSDK structured light compliant devices. More...

`#include <pcl/io/davidsdk_grabber.h>`

Inheritance diagram for pcl::DavidSDKGrabber:

## Public Member Functions

| DavidSDKGrabber ()
| Constructor. More...
virtual | ~DavidSDKGrabber () throw ()
| Destructor inherited from the Grabber interface. More...
david::ServerInfo | connect (const std::string &address="127.0.0.1", 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 ()
| Constructor. More...
virtual | ~Grabber () throw ()
| virtual desctructor. More...
template<typename T >
boost::signals2::connection | registerCallback (const boost::function< T > &callback)
| registers a callback function/method to a signal with the corresponding signature More...
template<typename T >
bool | providesCallback () const
| indicates whether a signal with given parameter-type exists or not 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
template<typename T >
int | num_slots () const
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

boost::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...
boost::mutex | fps_mutex_
| Mutual exclusion for FPS computation. More...
Protected Attributes inherited from pcl::Grabber
std::map< std::string, 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_

## Detailed Description

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.

Author
  Victor Lamoine (victo.nosp@m.r.la.nosp@m.moine.nosp@m.@gma.nosp@m.il.co.nosp@m.m)

Definition at line 66 of file davidsdk_grabber.h.

## Constructor & Destructor Documentation

## DavidSDKGrabber()

pcl::DavidSDKGrabber::DavidSDKGrabber | ( |  | ) |

Constructor.

## ~DavidSDKGrabber()

virtual pcl::DavidSDKGrabber::~DavidSDKGrabber | ( |  | ) |
throw | ( |
| ) |  |

virtual

Destructor inherited from the Grabber interface.

It never throws.

## Member Function Documentation

## calibrate()

bool pcl::DavidSDKGrabber::calibrate | ( | double | grid_size | ) |

Calibrate the scanner.

Parameters

  [in] | grid_size | Size of the calibration grid in millimeters

Returns
  True if successful, false otherwise

More information here.
Also see ImportCalibration.
and ExportCalibration.

Warning
  You MUST perform calibration each time you modify the camera/projector focus or move the camera relatively to the projector.

## connect()

david::ServerInfo pcl::DavidSDKGrabber::connect | ( | const std::string & | address = `"127.0.0.1"`,
|  | uint16_t | port = `david::DAVID_SDK_DefaultPort`
| ) |  |

Connect client

Parameters

  [in] | address |
  [in] | port |

Returns
  Server info

## disconnect()

void pcl::DavidSDKGrabber::disconnect | ( | const bool | stop_server | ) |

Disconnect client

Parameters

  [in] | stop_server |

## getFileFormat()

std::string pcl::DavidSDKGrabber::getFileFormat | ( |  | ) |

Get file_format_.

Returns
  the file format

## getFramesPerSecond()

float pcl::DavidSDKGrabber::getFramesPerSecond | ( |  | ) | const

virtual

Obtain the number of frames per second (FPS)

Implements pcl::Grabber.

## getLocalPath()

std::string pcl::DavidSDKGrabber::getLocalPath | ( |  | ) |

Get local_path_ path directory.

Returns
  the path

## getName()

std::string pcl::DavidSDKGrabber::getName | ( |  | ) | const

virtual

Get class name.

Returns
  A string containing the class name

Implements pcl::Grabber.

## getRemotePath()

std::string pcl::DavidSDKGrabber::getRemotePath | ( |  | ) |

Get remote_path_ path directory.

Returns
  the path

## grabSingleCloud()

bool pcl::DavidSDKGrabber::grabSingleCloud | ( | pcl::PointCloud< pcl::PointXYZ > & | cloud | ) |

Capture a single point cloud and store it.

Parameters

  [out] | cloud | The cloud to be filled

Returns
  True if successful, false otherwise

Warning
  Calls DeleteAllMeshes()

## grabSingleMesh()

bool pcl::DavidSDKGrabber::grabSingleMesh | ( | pcl::PolygonMesh & | mesh | ) |

Capture a single mesh and store it.

Parameters

  [out] | mesh | The mesh to be filled

Returns
  True if successful, false otherwise

Warning
  Calls DeleteAllMeshes()

## isConnected()

bool pcl::DavidSDKGrabber::isConnected | ( |  | ) | const

Check if the client is connected.

Returns
  True if connected, false otherwise

## isRunning()

bool pcl::DavidSDKGrabber::isRunning | ( |  | ) | const

virtual

Check if the data acquisition is still running.

Returns
  True if running, false otherwise

Implements pcl::Grabber.

## processGrabbing()

void pcl::DavidSDKGrabber::processGrabbing | ( |  | ) |

protected

Continuously asks for images and or point clouds/meshes data from the device and publishes them if available.

## setFileFormatToOBJ()

void pcl::DavidSDKGrabber::setFileFormatToOBJ | ( |  | ) |

Set file_format_ to "obj".

## setFileFormatToPLY()

void pcl::DavidSDKGrabber::setFileFormatToPLY | ( |  | ) |

Set file_format_ to "ply".

Warning
  This format is NOT available with trial versions of the davidSDK server!

## setFileFormatToSTL()

void pcl::DavidSDKGrabber::setFileFormatToSTL | ( |  | ) |

Set file_format_ to "stl".

## setLocalAndRemotePaths()

void pcl::DavidSDKGrabber::setLocalAndRemotePaths | ( | std::string | local_path,
|  | std::string | remote_path
| ) |  |

Set local_path_ and remote_path_ directory paths.

Parameters

  [in] | local_path |
  [in] | remote_path | If the path is empty, using default value ("C:/temp")

## setLocalPath()

void pcl::DavidSDKGrabber::setLocalPath | ( | std::string | path | ) |

Set local_path_ path directory for scanning files.

Parameters

  [in] | path | The directory path

If the path is empty, using default value ("C:/temp")

## setRemotePath()

void pcl::DavidSDKGrabber::setRemotePath | ( | std::string | path | ) |

Set remote_path_ path directory for scanning files.

Parameters

  [in] | path | The directory path

If the string is empty, remote_path_ = local_path_

## start()

void pcl::DavidSDKGrabber::start | ( |  | ) |

virtual

Start the point cloud and or image acquisition.

Implements pcl::Grabber.

## stop()

void pcl::DavidSDKGrabber::stop | ( |  | ) |

virtual

Stop the data acquisition.

Implements pcl::Grabber.

## Member Data Documentation

## client_connected_

bool pcl::DavidSDKGrabber::client_connected_

protected

Whether the client is connected.

Definition at line 240 of file davidsdk_grabber.h.

## david_

david::Client pcl::DavidSDKGrabber::david_

davidSDK client

Definition at line 218 of file davidsdk_grabber.h.

## file_format_

std::string pcl::DavidSDKGrabber::file_format_

protected

Export file extension, available formats are STL, OBJ, PLY.

Definition at line 255 of file davidsdk_grabber.h.

## fps_mutex_

boost::mutex pcl::DavidSDKGrabber::fps_mutex_

mutable protected

Mutual exclusion for FPS computation.

Definition at line 261 of file davidsdk_grabber.h.

## frequency_

pcl::EventFrequency pcl::DavidSDKGrabber::frequency_

protected

processGrabbing capture/processing frequency

Definition at line 258 of file davidsdk_grabber.h.

## grabber_thread_

boost::thread pcl::DavidSDKGrabber::grabber_thread_

protected

Grabber thread.

Definition at line 222 of file davidsdk_grabber.h.

## image_signal_

boost::signals2::signal<sig_cb_davidsdk_image>* pcl::DavidSDKGrabber::image_signal_

protected

Boost image signal.

Definition at line 231 of file davidsdk_grabber.h.

## local_path_

std::string pcl::DavidSDKGrabber::local_path_

protected

Local path of directory where the scanning file will be located.

Note
  Default value is `C:/temp`

Definition at line 247 of file davidsdk_grabber.h.

## mesh_image_signal_

boost::signals2::signal<sig_cb_davidsdk_mesh_image>* pcl::DavidSDKGrabber::mesh_image_signal_

protected

Boost mesh + image signal.

Definition at line 237 of file davidsdk_grabber.h.

## mesh_signal_

boost::signals2::signal<sig_cb_davidsdk_mesh>* pcl::DavidSDKGrabber::mesh_signal_

protected

Boost mesh signal.

Definition at line 228 of file davidsdk_grabber.h.

## point_cloud_image_signal_

boost::signals2::signal<sig_cb_davidsdk_point_cloud_image>* pcl::DavidSDKGrabber::point_cloud_image_signal_

protected

Boost image + point cloud signal.

Definition at line 234 of file davidsdk_grabber.h.

## point_cloud_signal_

boost::signals2::signal<sig_cb_davidsdk_point_cloud>* pcl::DavidSDKGrabber::point_cloud_signal_

protected

Boost point cloud signal.

Definition at line 225 of file davidsdk_grabber.h.

## remote_path_

std::string pcl::DavidSDKGrabber::remote_path_

protected

Remote path of directory where the scanning file will be located.

Note
  If this is empty, the local_path_ will be used instead Default value is `C:/temp`

Definition at line 252 of file davidsdk_grabber.h.

## running_

bool pcl::DavidSDKGrabber::running_

protected

Whether an davidSDK device is running or not.

Definition at line 243 of file davidsdk_grabber.h.

The documentation for this class was generated from the following file:

- /build/pcl-qv3n_B/pcl-1.8.1+dfsg1/io/include/pcl/io/davidsdk_grabber.h