Point Cloud Library (PCL)  1.8.1-dev
List of all members | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
pcl::DavidSDKGrabber Class Reference

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

pcl::DavidSDKGrabber::DavidSDKGrabber ( )

Constructor.

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

Destructor inherited from the Grabber interface.

It never throws.

Member Function Documentation

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

Calibrate the scanner.

Parameters
[in]grid_sizeSize 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.
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
void pcl::DavidSDKGrabber::disconnect ( const bool  stop_server)

Disconnect client

Parameters
[in]stop_server
std::string pcl::DavidSDKGrabber::getFileFormat ( )

Get file_format_.

Returns
the file format
float pcl::DavidSDKGrabber::getFramesPerSecond ( ) const
virtual

Obtain the number of frames per second (FPS)

Implements pcl::Grabber.

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

Get local_path_ path directory.

Returns
the path
std::string pcl::DavidSDKGrabber::getName ( ) const
virtual

Get class name.

Returns
A string containing the class name

Implements pcl::Grabber.

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

Get remote_path_ path directory.

Returns
the path
bool pcl::DavidSDKGrabber::grabSingleCloud ( pcl::PointCloud< pcl::PointXYZ > &  cloud)

Capture a single point cloud and store it.

Parameters
[out]cloudThe cloud to be filled
Returns
True if successful, false otherwise
Warning
Calls DeleteAllMeshes()
bool pcl::DavidSDKGrabber::grabSingleMesh ( pcl::PolygonMesh mesh)

Capture a single mesh and store it.

Parameters
[out]meshThe mesh to be filled
Returns
True if successful, false otherwise
Warning
Calls DeleteAllMeshes()
bool pcl::DavidSDKGrabber::isConnected ( ) const

Check if the client is connected.

Returns
True if connected, false otherwise
bool pcl::DavidSDKGrabber::isRunning ( ) const
virtual

Check if the data acquisition is still running.

Returns
True if running, false otherwise

Implements pcl::Grabber.

void pcl::DavidSDKGrabber::processGrabbing ( )
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".

Warning
This format is NOT available with trial versions of the davidSDK server!
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.

Parameters
[in]local_path
[in]remote_pathIf the path is empty, using default value ("C:/temp")
void pcl::DavidSDKGrabber::setLocalPath ( std::string  path)

Set local_path_ path directory for scanning files.

Parameters
[in]pathThe 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.

Parameters
[in]pathThe directory path

If the string is empty, remote_path_ = local_path_

void pcl::DavidSDKGrabber::start ( )
virtual

Start the point cloud and or image acquisition.

Implements pcl::Grabber.

void pcl::DavidSDKGrabber::stop ( )
virtual

Stop the data acquisition.

Implements pcl::Grabber.

Member Data Documentation

bool pcl::DavidSDKGrabber::client_connected_
protected

Whether the client is connected.

Definition at line 240 of file davidsdk_grabber.h.

david::Client pcl::DavidSDKGrabber::david_

davidSDK client

Definition at line 218 of file davidsdk_grabber.h.

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.

boost::mutex pcl::DavidSDKGrabber::fps_mutex_
mutableprotected

Mutual exclusion for FPS computation.

Definition at line 261 of file davidsdk_grabber.h.

pcl::EventFrequency pcl::DavidSDKGrabber::frequency_
protected

processGrabbing capture/processing frequency

Definition at line 258 of file davidsdk_grabber.h.

boost::thread pcl::DavidSDKGrabber::grabber_thread_
protected

Grabber thread.

Definition at line 222 of file davidsdk_grabber.h.

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

Boost image signal.

Definition at line 231 of file davidsdk_grabber.h.

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.

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.

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

Boost mesh signal.

Definition at line 228 of file davidsdk_grabber.h.

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.

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.

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.

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: