40 #ifndef PCL_IO_DINAST_GRABBER_
41 #define PCL_IO_DINAST_GRABBER_
43 #include <pcl/point_types.h>
44 #include <pcl/point_cloud.h>
45 #include <pcl/io/grabber.h>
46 #include <pcl/common/time.h>
47 #include <pcl/console/print.h>
48 #include <libusb-1.0/libusb.h>
49 #include <boost/circular_buffer.hpp>
60 typedef void (sig_cb_dinast_point_cloud) (
const boost::shared_ptr<const pcl::PointCloud<pcl::PointXYZI> >&);
82 {
return (std::string (
"DinastGrabber")); }
96 getFramesPerSecond ()
const;
107 onInit (
const int device_id);
115 setupDevice (
int device_position,
116 const int id_vendor = 0x18d1,
117 const int id_product = 0x1402);
124 USBRxControlData (
const unsigned char req_code,
125 unsigned char *buffer,
133 USBTxControlData (
const unsigned char req_code,
134 unsigned char *buffer,
154 getXYZIPointCloud ();
159 captureThreadFunction ();
199 enum { CMD_READ_START=0xC7, CMD_READ_STOP=0xC8, CMD_GET_VERSION=0xDC, CMD_SEND_DATA=0xDE };
215 #endif // PCL_IO_DINAST_GRABBER_
struct libusb_device_handle * device_handle_
the actual device_handle for the camera
boost::signals2::signal< sig_cb_dinast_point_cloud > * point_cloud_signal_
int image_height_
Height of image.
unsigned char bulk_ep_
Bulk endpoint address value.
double fov_
diagonal Field of View
unsigned char * raw_buffer_
Temporary USB read buffer, since we read two RGB16 images at a time size is the double of two images ...
libusb_context * context_
The libusb context.
bool second_image_
Since there is no header after the first image, we need to save the state.
int image_width_
Width of image.
boost::circular_buffer< unsigned char > g_buffer_
Global circular buffer.
virtual std::string getName() const
Returns the name of the concrete subclass, DinastGrabber.
Grabber interface for PCL 1.x device drivers.
boost::mutex capture_mutex_
int sync_packet_size_
Length of a sync packet.
boost::shared_ptr< PointCloud< PointT > > Ptr
int image_size_
Total size of image.
boost::thread capture_thread_
Grabber for DINAST devices (i.e., IPA-1002, IPA-1110, IPA-2001)