Grabber for DINAST devices (i.e., IPA-1002, IPA-1110, IPA-2001)
More...
#include <pcl/io/dinast_grabber.h>
Grabber for DINAST devices (i.e., IPA-1002, IPA-1110, IPA-2001)
- Author
- Marco A. Gutierrez marco.nosp@m.g@un.nosp@m.ex.es
Definition at line 59 of file dinast_grabber.h.
◆ anonymous enum
Device command values.
Enumerator |
---|
CMD_READ_START | |
CMD_READ_STOP | |
CMD_GET_VERSION | |
CMD_SEND_DATA | |
Definition at line 203 of file dinast_grabber.h.
◆ pixel_size
Size of pixel.
Enumerator |
---|
RAW8 | |
RGB16 | |
RGB24 | |
RGB32 | |
Definition at line 183 of file dinast_grabber.h.
◆ DinastGrabber()
pcl::DinastGrabber::DinastGrabber |
( |
const int |
device_position = 1 | ) |
|
Constructor that sets up the grabber constants.
- Parameters
-
[in] | device_position | Number corresponding the device to grab |
◆ ~DinastGrabber()
pcl::DinastGrabber::~DinastGrabber |
( |
| ) |
|
|
overridenoexcept |
Destructor.
It never throws.
◆ captureThreadFunction()
void pcl::DinastGrabber::captureThreadFunction |
( |
| ) |
|
|
protected |
The function in charge of getting the data from the camera.
◆ checkHeader()
int pcl::DinastGrabber::checkHeader |
( |
| ) |
|
|
protected |
Check if we have a header in the global buffer, and return the position of the next valid image.
- Note
- If the image in the buffer is partial, return -1, as we have to wait until we add more data to it.
- Returns
- the position of the next valid image (i.e., right after a valid header) or -1 in case the buffer either doesn't have an image or has a partial image
◆ getDeviceVersion()
std::string pcl::DinastGrabber::getDeviceVersion |
( |
| ) |
|
Get the version number of the currently opened device.
◆ getFramesPerSecond()
float pcl::DinastGrabber::getFramesPerSecond |
( |
| ) |
const |
|
overridevirtual |
Obtain the number of frames per second (FPS).
Implements pcl::Grabber.
◆ getName()
std::string pcl::DinastGrabber::getName |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ getXYZIPointCloud()
Obtains XYZI Point Cloud from the image of the camera.
- Returns
- the point cloud from the image data
◆ isRunning()
bool pcl::DinastGrabber::isRunning |
( |
| ) |
const |
|
overridevirtual |
Check if the grabber is running.
- Returns
- true if grabber is running / streaming. False otherwise.
Implements pcl::Grabber.
◆ onInit()
void pcl::DinastGrabber::onInit |
( |
const int |
device_id | ) |
|
|
protected |
On initialization processing.
◆ readImage()
void pcl::DinastGrabber::readImage |
( |
| ) |
|
|
protected |
Read image data and leaves it on image_.
◆ setupDevice()
void pcl::DinastGrabber::setupDevice |
( |
int |
device_position, |
|
|
const int |
id_vendor = 0x18d1 , |
|
|
const int |
id_product = 0x1402 |
|
) |
| |
|
protected |
Setup a Dinast 3D camera device.
- Parameters
-
[in] | device_position | Number corresponding the device to grab |
[in] | id_vendor | The ID of the camera vendor (should be 0x18d1) |
[in] | id_product | The ID of the product (should be 0x1402) |
◆ start()
void pcl::DinastGrabber::start |
( |
| ) |
|
|
overridevirtual |
Start the data acquisition process.
Implements pcl::Grabber.
◆ stop()
void pcl::DinastGrabber::stop |
( |
| ) |
|
|
overridevirtual |
◆ USBRxControlData()
bool pcl::DinastGrabber::USBRxControlData |
( |
const unsigned char |
req_code, |
|
|
unsigned char * |
buffer, |
|
|
int |
length |
|
) |
| |
|
protected |
Send a RX data packet request.
- Parameters
-
[in] | req_code | the request to send (the request field for the setup packet) |
| buffer | |
[in] | length | the length field for the setup packet. The data buffer should be at least this size. |
◆ USBTxControlData()
bool pcl::DinastGrabber::USBTxControlData |
( |
const unsigned char |
req_code, |
|
|
unsigned char * |
buffer, |
|
|
int |
length |
|
) |
| |
|
protected |
Send a TX data packet request.
- Parameters
-
[in] | req_code | the request to send (the request field for the setup packet) |
| buffer | |
[in] | length | the length field for the setup packet. The data buffer should be at least this size. |
◆ bulk_ep_
unsigned char pcl::DinastGrabber::bulk_ep_ {std::numeric_limits<unsigned char>::max ()} |
|
protected |
◆ capture_mutex_
std::mutex pcl::DinastGrabber::capture_mutex_ |
|
mutableprotected |
◆ capture_thread_
std::thread pcl::DinastGrabber::capture_thread_ |
|
protected |
◆ context_
libusb_context* pcl::DinastGrabber::context_ {nullptr} |
|
protected |
◆ device_handle_
struct libusb_device_handle* pcl::DinastGrabber::device_handle_ {nullptr} |
|
protected |
◆ dist_max_2d_
double pcl::DinastGrabber::dist_max_2d_ {1. / (image_width_ / 2.)} |
|
protected |
◆ fov_
double pcl::DinastGrabber::fov_ {64. * M_PI / 180.} |
|
protected |
◆ g_buffer_
boost::circular_buffer<unsigned char> pcl::DinastGrabber::g_buffer_ |
|
protected |
◆ image_
unsigned char* pcl::DinastGrabber::image_ {nullptr} |
|
protected |
◆ image_height_
int pcl::DinastGrabber::image_height_ {240} |
|
protected |
◆ image_size_
◆ image_width_
int pcl::DinastGrabber::image_width_ {320} |
|
protected |
◆ point_cloud_signal_
boost::signals2::signal<sig_cb_dinast_point_cloud>* pcl::DinastGrabber::point_cloud_signal_ |
|
protected |
◆ raw_buffer_
unsigned char* pcl::DinastGrabber::raw_buffer_ {nullptr} |
|
protected |
Temporary USB read buffer, since we read two RGB16 images at a time size is the double of two images plus a sync packet.
Definition at line 194 of file dinast_grabber.h.
◆ running_
bool pcl::DinastGrabber::running_ {false} |
|
protected |
◆ second_image_
bool pcl::DinastGrabber::second_image_ {false} |
|
protected |
Since there is no header after the first image, we need to save the state.
Definition at line 208 of file dinast_grabber.h.
◆ sync_packet_size_
int pcl::DinastGrabber::sync_packet_size_ {512} |
|
protected |
The documentation for this class was generated from the following file: