42 #include <pcl/point_types.h>
43 #include <pcl/point_cloud.h>
44 #include <pcl/io/grabber.h>
45 #include <pcl/common/time.h>
46 #include <pcl/console/print.h>
47 #include <libusb-1.0/libusb.h>
48 #include <boost/circular_buffer.hpp>
77 isRunning ()
const override;
84 {
return {
"DinastGrabber"}; }
98 getFramesPerSecond ()
const override;
109 onInit (
const int device_id);
117 setupDevice (
int device_position,
118 const int id_vendor = 0x18d1,
119 const int id_product = 0x1402);
127 USBRxControlData (
const unsigned char req_code,
128 unsigned char *buffer,
137 USBTxControlData (
const unsigned char req_code,
138 unsigned char *buffer,
158 getXYZIPointCloud ();
163 captureThreadFunction ();
166 int image_width_{320};
169 int image_height_{240};
172 int image_size_{image_width_ * image_height_};
175 int sync_packet_size_{512};
177 double dist_max_2d_{1. / (image_width_ / 2.)};
180 double fov_{64. * M_PI / 180.};
186 libusb_context *context_{
nullptr};
189 struct libusb_device_handle *device_handle_{
nullptr};
194 unsigned char *raw_buffer_{
nullptr} ;
200 unsigned char bulk_ep_{std::numeric_limits<unsigned char>::max ()};
203 enum { CMD_READ_START=0xC7, CMD_READ_STOP=0xC8, CMD_GET_VERSION=0xDC, CMD_SEND_DATA=0xDE };
205 unsigned char *image_{
nullptr};
208 bool second_image_{
false};
210 bool running_{
false};
shared_ptr< PointCloud< PointT > > Ptr
boost::circular_buffer< unsigned char > g_buffer_
Global circular buffer.
std::string getName() const override
Returns the name of the concrete subclass, DinastGrabber.
Grabber for DINAST devices (i.e., IPA-1002, IPA-1110, IPA-2001)
Grabber interface for PCL 1.x device drivers.
std::thread capture_thread_
shared_ptr< const PointCloud< PointT > > ConstPtr
boost::signals2::signal< sig_cb_dinast_point_cloud > * point_cloud_signal_
std::mutex capture_mutex_