9 #ifndef mrpt_COpenNI2Sensor_H
10 #define mrpt_COpenNI2Sensor_H
208 bool &hardware_error);
224 inline size_t getRowCount()
const {
return m_cameraParamsRGB.nrows; }
226 inline size_t getColCount()
const {
return m_cameraParamsRGB.ncols; }
258 const std::string §ion );
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
An abstract class for accessing OpenNI2 compatible sensors.
A class for grabing "range images", intensity images (either RGB or IR) and other information from an...
~COpenNI2Sensor()
Default ctor.
void setCameraParamsIntensity(const mrpt::utils::TCamera &p)
bool isGrabDepthEnabled() const
mrpt::gui::CDisplayWindowPtr m_win_int
const mrpt::utils::TCamera & getCameraParamsDepth() const
Get a const reference to the depth camera calibration parameters.
size_t m_preview_window_decimation
If preview is enabled, only show 1 out of N images.
mrpt::poses::CPose3D m_relativePoseIntensityWRTDepth
See mrpt::obs::CObservation3DRangeScan for a diagram of this pose.
void setSerialToOpen(const unsigned serial)
Set the serial number of the device to open.
bool isGrabRGBEnabled() const
const mrpt::utils::TCamera & getCameraParamsIntensity() const
Get a const reference to the depth camera calibration parameters.
void setCameraParamsDepth(const mrpt::utils::TCamera &p)
virtual void loadConfig_sensorSpecific(const mrpt::utils::CConfigFileBase &configSource, const std::string §ion)
Loads specific configuration for the device from a given source of configuration parameters,...
double getMaxRange() const
Get the maximum range (meters) that can be read in the observation field "rangeImage".
const mrpt::poses::CPose3D & getRelativePoseIntensityWrtDepth() const
virtual void initialize()
Initializes the 3D camera - should be invoked after calling loadConfig() or setting the different par...
int m_serial_number
Serial number of device to open.
double m_maxRange
Sensor max range (meters)
void enableGrab3DPoints(bool enable=true)
Enable/disable the grabbing of the 3D point clouds.
mrpt::utils::TCamera m_cameraParamsDepth
Params for the Depth camera.
mrpt::utils::TCamera m_cameraParamsRGB
Params for the RGB camera.
int m_user_device_number
Number of device to open (0:first,...)
size_t getRowCount() const
Get the row count in the camera images, loaded automatically upon camera open().
void setRelativePoseIntensityWrtDepth(const mrpt::poses::CPose3D &p)
Set the pose of the intensity camera wrt the depth camera.
void setSensorIDToOpen(const unsigned sensor_id)
Set the sensor_id of the device to open.
size_t getColCount() const
Get the col count in the camera images, loaded automatically upon camera open().
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().
bool isGrab3DPointsEnabled() const
void enableGrabDepth(bool enable=true)
Enable/disable the grabbing of the depth channel.
virtual void setPathForExternalImages(const std::string &directory)
Set the path where to save off-rawlog image files (this class DOES take into account this path).
bool m_preview_window
Show preview window while grabbing.
COpenNI2Sensor()
Default ctor.
void enableGrabRGB(bool enable=true)
Enable/disable the grabbing of the RGB channel.
mrpt::poses::CPose3D m_sensorPoseOnRobot
virtual void doProcess()
To be called at a high rate (>XX Hz), this method populates the internal buffer of received observati...
size_t m_preview_decim_counter_range
Declares a class derived from "CObservation" that encapsules a 3D range scan measurement,...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
This class allows loading and storing values and vectors of different types from a configuration text...
Structure to hold the parameters of a pinhole camera model.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.