This "software driver" implements the communication protocol for interfacing a DUO3D Stereo Camera.
See also the example configuration file for rawlog-grabber in "share/mrpt/config_files/rawlog-grabber".
Definition at line 125 of file CDUO3DCamera.h.
#include <mrpt/hwdrivers/CDUO3DCamera.h>
Public Member Functions | |
CDUO3DCamera () | |
Default Constructor (does not open the camera) | |
CDUO3DCamera (const TCaptureOptions_DUO3D &options) | |
Constructor: tries to open the camera with the given options. | |
virtual | ~CDUO3DCamera () |
Destructor | |
const TCaptureOptions_DUO3D & | getCameraOptions () const |
Returns the current settings of the camera. | |
void | open (const TCaptureOptions_DUO3D &options, const bool startCapture=true) |
Tries to open the camera with the given options, and starts capturing. | |
void | startCapture () |
Start the actual data capture of the camera. | |
void | stopCapture () |
Stop capture. | |
void | close () |
Stop capture and closes the opened camera, if any. | |
void | getObservations (mrpt::obs::CObservationStereoImages &outObservation_img, mrpt::obs::CObservationIMU &outObservation_imu, bool &there_is_img, bool &there_is_imu) |
Specific laser scanner "software drivers" must process here new data from the I/O stream, and, if a whole scan has arrived, return it. | |
bool | captureIMUIsSet () |
Indicates if the camera is grabbing IMU data. | |
void * | getEvent () |
Returned pointer to be reinterpreted as DUO3D's "HANDLE". | |
void | setDataFrame (void *frame) |
frame is a reinterpreted PDUOFrame | |
Protected Member Functions | |
bool | queryVersion (std::string version, bool printOutVersion=false) |
Queries the DUO3D Camera firmware version. | |
void * | m_get_duo_frame () |
Gets a stereo frame from the DUO3D Camera (void* to be reinterpreted as PDUOFrame) | |
bool | m_open_duo_camera (int width, int height, float fps) |
Opens DUO3D camera. | |
void | m_close_duo_camera () |
Closes DUO3D camera. | |
void | m_set_exposure (float value) |
Sets DUO3D camera Exposure setting. | |
void | m_set_gain (float value) |
Sets DUO3D camera Gain setting | |
void | m_set_led (float value) |
Sets DUO3D camera LED setting | |
Protected Attributes | |
TCaptureOptions_DUO3D | m_options |
mrpt::vision::CStereoRectifyMap | m_rectify_map |
void * | m_duo |
Opaque pointer to DUO's DUOInstance. | |
void * | m_pframe_data |
Pointer, to be reinterpreted as "PDUOFrame". | |
void * | m_evFrame |
DUO's HANDLE. | |
mrpt::hwdrivers::CDUO3DCamera::CDUO3DCamera | ( | ) |
Default Constructor (does not open the camera)
mrpt::hwdrivers::CDUO3DCamera::CDUO3DCamera | ( | const TCaptureOptions_DUO3D & | options | ) |
Constructor: tries to open the camera with the given options.
Raises an exception on error.
|
virtual |
Destructor
|
inline |
Indicates if the camera is grabbing IMU data.
Definition at line 179 of file CDUO3DCamera.h.
References mrpt::hwdrivers::TCaptureOptions_DUO3D::m_capture_imu.
void mrpt::hwdrivers::CDUO3DCamera::close | ( | ) |
Stop capture and closes the opened camera, if any.
Called automatically on object destruction.
|
inline |
Returns the current settings of the camera.
Definition at line 151 of file CDUO3DCamera.h.
|
inline |
Returned pointer to be reinterpreted as DUO3D's "HANDLE".
Definition at line 182 of file CDUO3DCamera.h.
void mrpt::hwdrivers::CDUO3DCamera::getObservations | ( | mrpt::obs::CObservationStereoImages & | outObservation_img, |
mrpt::obs::CObservationIMU & | outObservation_imu, | ||
bool & | there_is_img, | ||
bool & | there_is_imu | ||
) |
Specific laser scanner "software drivers" must process here new data from the I/O stream, and, if a whole scan has arrived, return it.
This method will be typically called in a different thread than other methods, and will be called in a timely fashion.
|
protected |
Closes DUO3D camera.
|
protected |
Gets a stereo frame from the DUO3D Camera (void* to be reinterpreted as PDUOFrame)
|
protected |
Opens DUO3D camera.
|
protected |
Sets DUO3D camera Exposure setting.
|
protected |
Sets DUO3D camera Gain setting
|
protected |
Sets DUO3D camera LED setting
void mrpt::hwdrivers::CDUO3DCamera::open | ( | const TCaptureOptions_DUO3D & | options, |
const bool | startCapture = true |
||
) |
Tries to open the camera with the given options, and starts capturing.
Raises an exception on error.
[in] | startCapture | If set to false, the camera is only opened and configured, but a posterior call to startCapture() is required to start grabbing data. |
|
protected |
Queries the DUO3D Camera firmware version.
|
inline |
frame is a reinterpreted PDUOFrame
Definition at line 185 of file CDUO3DCamera.h.
void mrpt::hwdrivers::CDUO3DCamera::startCapture | ( | ) |
Start the actual data capture of the camera.
Must be called after open(), only when "startCapture" was set to false.
void mrpt::hwdrivers::CDUO3DCamera::stopCapture | ( | ) |
Stop capture.
|
protected |
Opaque pointer to DUO's DUOInstance.
Definition at line 136 of file CDUO3DCamera.h.
|
protected |
DUO's HANDLE.
Definition at line 138 of file CDUO3DCamera.h.
|
protected |
Definition at line 131 of file CDUO3DCamera.h.
|
protected |
Pointer, to be reinterpreted as "PDUOFrame".
Definition at line 137 of file CDUO3DCamera.h.
|
protected |
Definition at line 134 of file CDUO3DCamera.h.
Page generated by Doxygen 1.9.6 for MRPT 1.4.0 SVN: at Fri Jan 20 02:28:26 UTC 2023 |