276 bool& hardware_error);
348 const std::string& section)
override;
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
mrpt::img::TCamera m_cameraParamsDepth
Params for the Depth camera.
void setCameraParamsIntensity(const mrpt::img::TCamera &p)
bool m_grab_image
The data that the RGBD sensors can return.
const mrpt::img::TCamera & getCameraParamsIntensity() const
Get a const reference to the depth camera calibration parameters.
mrpt::gui::CDisplayWindow::Ptr m_win_int
bool isGrab3DPointsEnabled() const
mrpt::gui::CDisplayWindow::Ptr m_win_range
void getNextObservation(mrpt::obs::CObservation3DRangeScan &out_obs, bool &there_is_obs, bool &hardware_error)
The main data retrieving function, to be called after calling loadConfig() and initialize().
A range or depth 3D scan measurement, as from a time-of-flight range camera or a structured-light dep...
Contains classes for various device interfaces.
size_t cols() const
Get the col count in the camera images, loaded automatically upon camera open().
size_t m_preview_decim_counter_rgb
COpenNI2Sensor()
Default ctor.
A class for grabing "range images", intensity images (either RGB or IR) and other information from an...
size_t m_preview_decim_counter_range
This class allows loading and storing values and vectors of different types from a configuration text...
const mrpt::poses::CPose3D & getRelativePoseIntensityWrtDepth() const
mrpt::img::TCamera m_cameraParamsRGB
Params for the RGB camera.
int m_serial_number
Serial number of device to open.
const mrpt::img::TCamera & getCameraParamsDepth() const
Get a const reference to the depth camera calibration parameters.
void setSerialToOpen(const unsigned serial)
Set the serial number of the device to open.
Parameters for the Brown-Conrady camera lens distortion model.
An abstract class for accessing OpenNI2 compatible sensors.
bool isGrabDepthEnabled() const
void enableGrab3DPoints(bool enable=true)
Enable/disable the grabbing of the 3D point clouds.
mrpt::poses::CPose3D m_sensorPoseOnRobot
double getMaxRange() const
Get the maximum range (meters) that can be read in the observation field "rangeImage".
void enableGrabRGB(bool enable=true)
Enable/disable the grabbing of the RGB channel.
void setSensorIDToOpen(const unsigned sensor_id)
Set the sensor_id of the device to open.
void setPathForExternalImages(const std::string &directory) override
Set the path where to save off-rawlog image files (this class DOES take into account this path)...
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
mrpt::poses::CPose3D m_relativePoseIntensityWRTDepth
See mrpt::obs::CObservation3DRangeScan for a diagram of this pose.
void setCameraParamsDepth(const mrpt::img::TCamera &p)
void doProcess() override
To be called at a high rate (>XX Hz), this method populates the internal buffer of received observati...
double m_maxRange
Sensor max range (meters)
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
int m_user_device_number
Number of device to open (0:first,...)
void enableGrabDepth(bool enable=true)
Enable/disable the grabbing of the depth channel.
size_t rows() const
Get the row count in the camera images, loaded automatically upon camera open().
size_t m_preview_window_decimation
If preview is enabled, only show 1 out of N images.
~COpenNI2Sensor() override
Default ctor.
bool m_preview_window
Show preview window while grabbing.
void initialize() override
Initializes the 3D camera - should be invoked after calling loadConfig() or setting the different par...
void loadConfig_sensorSpecific(const mrpt::config::CConfigFileBase &configSource, const std::string §ion) override
Loads specific configuration for the device from a given source of configuration parameters, for example, an ".ini" file, loading from the section "[iniSection]" (see config::CConfigFileBase and derived classes)
void setRelativePoseIntensityWrtDepth(const mrpt::poses::CPose3D &p)
Set the pose of the intensity camera wrt the depth camera.
uint32_t ncols
Camera resolution.
bool isGrabRGBEnabled() const