|
RTAB-Map 0.23.10
Real-Time Appearance-Based Mapping
|
Container class for all sensor data captured at a specific time. More...
#include <SensorData.h>
Public Member Functions | |
| SensorData () | |
| Default constructor. | |
| SensorData (const cv::Mat &image, int id=0, double stamp=0.0, const cv::Mat &userData=cv::Mat()) | |
| Appearance-only constructor. | |
| SensorData (const cv::Mat &image, const CameraModel &cameraModel, int id=0, double stamp=0.0, const cv::Mat &userData=cv::Mat()) | |
| Mono camera constructor. | |
| SensorData (const cv::Mat &rgb, const cv::Mat &depth, const CameraModel &cameraModel, int id=0, double stamp=0.0, const cv::Mat &userData=cv::Mat()) | |
| RGB-D constructor. | |
| SensorData (const cv::Mat &rgb, const cv::Mat &depth, const cv::Mat &depth_confidence, const CameraModel &cameraModel, int id=0, double stamp=0.0, const cv::Mat &userData=cv::Mat()) | |
| RGB-D constructor with depth confidence. | |
| SensorData (const LaserScan &laserScan, const cv::Mat &rgb, const cv::Mat &depth, const CameraModel &cameraModel, int id=0, double stamp=0.0, const cv::Mat &userData=cv::Mat()) | |
| RGB-D constructor with laser scan. | |
| SensorData (const LaserScan &laserScan, const cv::Mat &rgb, const cv::Mat &depth, const cv::Mat &depthConfidence, const CameraModel &cameraModel, int id=0, double stamp=0.0, const cv::Mat &userData=cv::Mat()) | |
| RGB-D constructor with depth confidence and laser scan. | |
| SensorData (const cv::Mat &rgb, const cv::Mat &depth, const std::vector< CameraModel > &cameraModels, int id=0, double stamp=0.0, const cv::Mat &userData=cv::Mat()) | |
| Multi-camera RGB-D constructor. | |
| SensorData (const cv::Mat &rgb, const cv::Mat &depth, const cv::Mat &depthConfidence, const std::vector< CameraModel > &cameraModels, int id=0, double stamp=0.0, const cv::Mat &userData=cv::Mat()) | |
| Multi-camera RGB-D constructor with depth confidence. | |
| SensorData (const LaserScan &laserScan, const cv::Mat &rgb, const cv::Mat &depth, const std::vector< CameraModel > &cameraModels, int id=0, double stamp=0.0, const cv::Mat &userData=cv::Mat()) | |
| Multi-camera RGB-D constructor with laser scan. | |
| SensorData (const LaserScan &laserScan, const cv::Mat &rgb, const cv::Mat &depth, const cv::Mat &depthConfidence, const std::vector< CameraModel > &cameraModels, int id=0, double stamp=0.0, const cv::Mat &userData=cv::Mat()) | |
| Multi-camera RGB-D constructor with depth confidence and laser scan. | |
| SensorData (const cv::Mat &left, const cv::Mat &right, const StereoCameraModel &cameraModel, int id=0, double stamp=0.0, const cv::Mat &userData=cv::Mat()) | |
| Stereo camera constructor. | |
| SensorData (const LaserScan &laserScan, const cv::Mat &left, const cv::Mat &right, const StereoCameraModel &cameraModel, int id=0, double stamp=0.0, const cv::Mat &userData=cv::Mat()) | |
| Stereo camera constructor with laser scan. | |
| SensorData (const cv::Mat &rgb, const cv::Mat &depth, const std::vector< StereoCameraModel > &cameraModels, int id=0, double stamp=0.0, const cv::Mat &userData=cv::Mat()) | |
| Multi-camera stereo constructor. | |
| SensorData (const LaserScan &laserScan, const cv::Mat &rgb, const cv::Mat &depth, const std::vector< StereoCameraModel > &cameraModels, int id=0, double stamp=0.0, const cv::Mat &userData=cv::Mat()) | |
| Multi-camera stereo constructor with laser scan. | |
| SensorData (const IMU &imu, int id=0, double stamp=0.0) | |
| IMU-only constructor. | |
| virtual | ~SensorData () |
| Virtual destructor. | |
| bool | isValid () const |
| Checks if the sensor data is valid. | |
| int | id () const |
| Returns the sensor data ID. | |
| void | setId (int id) |
| Sets the sensor data ID. | |
| double | stamp () const |
| Returns the timestamp. | |
| void | setStamp (double stamp) |
| Sets the timestamp. | |
| const cv::Mat & | imageCompressed () const |
| Returns the compressed RGB/grayscale image. | |
| const cv::Mat & | depthOrRightCompressed () const |
| Returns the compressed depth or right stereo image. | |
| const cv::Mat & | depthConfidenceCompressed () const |
| Returns the compressed depth confidence map. | |
| const LaserScan & | laserScanCompressed () const |
| Returns the compressed laser scan. | |
| const cv::Mat & | imageRaw () const |
| Returns the raw RGB/grayscale image. | |
| const cv::Mat & | depthOrRightRaw () const |
| Returns the raw depth or right stereo image. | |
| const cv::Mat & | depthConfidenceRaw () const |
| Returns the raw depth confidence map. | |
| const LaserScan & | laserScanRaw () const |
| Returns the raw laser scan. | |
| void | setRGBDImage (const cv::Mat &rgb, const cv::Mat &depth, const CameraModel &model, bool clearPreviousData=true) |
| void | setRGBDImage (const cv::Mat &rgb, const cv::Mat &depth, const cv::Mat &depth_confidence, const CameraModel &model, bool clearPreviousData=true) |
| void | setRGBDImage (const cv::Mat &rgb, const cv::Mat &depth, const std::vector< CameraModel > &models, bool clearPreviousData=true) |
| void | setRGBDImage (const cv::Mat &rgb, const cv::Mat &depth, const cv::Mat &depth_confidence, const std::vector< CameraModel > &models, bool clearPreviousData=true) |
| void | setStereoImage (const cv::Mat &left, const cv::Mat &right, const StereoCameraModel &stereoCameraModel, bool clearPreviousData=true) |
| void | setStereoImage (const cv::Mat &left, const cv::Mat &right, const std::vector< StereoCameraModel > &stereoCameraModels, bool clearPreviousData=true) |
| void | setLaserScan (const LaserScan &laserScan, bool clearPreviousData=true) |
| void | setCameraModel (const CameraModel &model) |
| Sets a single camera model (clears previous models) | |
| void | setCameraModels (const std::vector< CameraModel > &models) |
| Sets multiple camera models. | |
| void | setStereoCameraModel (const StereoCameraModel &stereoCameraModel) |
| Sets a single stereo camera model (clears previous models) | |
| void | setStereoCameraModels (const std::vector< StereoCameraModel > &stereoCameraModels) |
| Sets multiple stereo camera models. | |
| cv::Mat | depthRaw () const |
| Returns the depth image (convenience method) | |
| cv::Mat | rightRaw () const |
| Returns the right stereo image (convenience method) | |
| RTABMAP_DEPRECATED void | setImageRaw (const cv::Mat &image) |
| RTABMAP_DEPRECATED void | setDepthOrRightRaw (const cv::Mat &image) |
| RTABMAP_DEPRECATED void | setLaserScanRaw (const LaserScan &scan) |
| RTABMAP_DEPRECATED void | setUserDataRaw (const cv::Mat &data) |
| void | uncompressData () |
| Uncompresses all compressed data in-place. | |
| void | uncompressData (cv::Mat *imageRaw, cv::Mat *depthOrRightRaw, LaserScan *laserScanRaw=0, cv::Mat *userDataRaw=0, cv::Mat *groundCellsRaw=0, cv::Mat *obstacleCellsRaw=0, cv::Mat *emptyCellsRaw=0, cv::Mat *depthConfidenceRaw=0) |
| Uncompresses compressed data into provided output buffers. | |
| void | uncompressDataConst (cv::Mat *imageRaw, cv::Mat *depthOrRightRaw, LaserScan *laserScanRaw=0, cv::Mat *userDataRaw=0, cv::Mat *groundCellsRaw=0, cv::Mat *obstacleCellsRaw=0, cv::Mat *emptyCellsRaw=0, cv::Mat *depthConfidenceRaw=0) const |
| Uncompresses compressed data into provided output buffers (const version) | |
| const std::vector< CameraModel > & | cameraModels () const |
| Returns the camera models. | |
| const std::vector< StereoCameraModel > & | stereoCameraModels () const |
| Returns the stereo camera models. | |
| void | setUserData (const cv::Mat &userData, bool clearPreviousData=true) |
| const cv::Mat & | userDataRaw () const |
| const cv::Mat & | userDataCompressed () const |
| void | setOccupancyGrid (const cv::Mat &ground, const cv::Mat &obstacles, const cv::Mat &empty, float cellSize, const cv::Point3f &viewPoint) |
| Sets occupancy grid data. | |
| const cv::Mat & | gridGroundCellsRaw () const |
| Returns raw ground cells. | |
| const cv::Mat & | gridGroundCellsCompressed () const |
| Returns compressed ground cells. | |
| const cv::Mat & | gridObstacleCellsRaw () const |
| Returns raw obstacle cells. | |
| const cv::Mat & | gridObstacleCellsCompressed () const |
| Returns compressed obstacle cells. | |
| const cv::Mat & | gridEmptyCellsRaw () const |
| Returns raw empty cells. | |
| const cv::Mat & | gridEmptyCellsCompressed () const |
| Returns compressed empty cells. | |
| float | gridCellSize () const |
| Returns the occupancy grid cell size. | |
| const cv::Point3f & | gridViewPoint () const |
| Returns the occupancy grid viewpoint. | |
| void | setFeatures (const std::vector< cv::KeyPoint > &keypoints, const std::vector< cv::Point3f > &keypoints3D, const cv::Mat &descriptors) |
| Sets visual features (keypoints, 3D points, descriptors) | |
| const std::vector< cv::KeyPoint > & | keypoints () const |
| Returns the 2D keypoints. | |
| const std::vector< cv::Point3f > & | keypoints3D () const |
| Returns the 3D keypoints. | |
| const cv::Mat & | descriptors () const |
| Returns the feature descriptors. | |
| void | addGlobalDescriptor (const GlobalDescriptor &descriptor) |
| Adds a global descriptor. | |
| void | setGlobalDescriptors (const std::vector< GlobalDescriptor > &descriptors) |
| Sets all global descriptors. | |
| void | clearGlobalDescriptors () |
| Clears all global descriptors. | |
| const std::vector< GlobalDescriptor > & | globalDescriptors () const |
| Returns all global descriptors. | |
| void | setGroundTruth (const Transform &pose) |
| Sets the ground truth pose. | |
| const Transform & | groundTruth () const |
| Returns the ground truth pose. | |
| void | setGlobalPose (const Transform &pose, const cv::Mat &covariance) |
| Sets the global pose with covariance. | |
| const Transform & | globalPose () const |
| Returns the global pose. | |
| const cv::Mat & | globalPoseCovariance () const |
| Returns the global pose covariance. | |
| void | setGPS (const GPS &gps) |
| Sets GPS data. | |
| const GPS & | gps () const |
| Returns GPS data. | |
| void | setIMU (const IMU &imu) |
| Sets IMU data. | |
| const IMU & | imu () const |
| Returns IMU data. | |
| void | setEnvSensors (const EnvSensors &sensors) |
| Sets all environmental sensors. | |
| void | addEnvSensor (const EnvSensor &sensor) |
| Adds a single environmental sensor. | |
| const EnvSensors & | envSensors () const |
| Returns all environmental sensors. | |
| void | setLandmarks (const Landmarks &landmarks) |
| Sets landmarks. | |
| const Landmarks & | landmarks () const |
| Returns landmarks. | |
| unsigned long | getMemoryUsed () const |
| Computes the memory usage of this sensor data. | |
| void | clearCompressedData (bool images=true, bool scan=true, bool userData=true, bool occupancyGrid=true) |
| void | clearRawData (bool images=true, bool scan=true, bool userData=true, bool occupancyGrid=true) |
| int | isPointVisibleFromCameras (const cv::Point3f &pt) const |
| Checks if a 3D point is visible from any camera. | |
Container class for all sensor data captured at a specific time.
SensorData is a comprehensive container class that holds all types of sensor data captured at a specific timestamp, including:
The class supports both raw and compressed data formats:
Data compression is automatically detected when setting data:
CV_8UC1 with 1 row is considered compresseduncompressData() to decompress compressed dataThe class supports multiple sensor configurations:
id=0 is provided to constructors, an ID is automatically generated. Definition at line 96 of file SensorData.h.
| rtabmap::SensorData::SensorData | ( | ) |
Default constructor.
Creates an empty SensorData object with all fields initialized to default values. The ID will be 0 (invalid), and no sensor data will be present.
| rtabmap::SensorData::SensorData | ( | const cv::Mat & | image, |
| int | id = 0, |
||
| double | stamp = 0.0, |
||
| const cv::Mat & | userData = cv::Mat() |
||
| ) |
Appearance-only constructor.
Creates a SensorData object with a single RGB or grayscale image. No camera model is provided, so this is suitable for appearance-based place recognition without 3D reconstruction.
| image | RGB or grayscale image (CV_8UC1 or CV_8UC3) |
| id | Sensor data ID (0 to auto-generate) |
| stamp | Timestamp in seconds |
| userData | Optional user-defined data matrix |
| rtabmap::SensorData::SensorData | ( | const cv::Mat & | image, |
| const CameraModel & | cameraModel, | ||
| int | id = 0, |
||
| double | stamp = 0.0, |
||
| const cv::Mat & | userData = cv::Mat() |
||
| ) |
Mono camera constructor.
Creates a SensorData object with a single RGB or grayscale image and a mono camera model for 3D projection.
| image | RGB or grayscale image (CV_8UC1 or CV_8UC3) |
| cameraModel | Camera model for the image |
| id | Sensor data ID (0 to auto-generate) |
| stamp | Timestamp in seconds |
| userData | Optional user-defined data matrix |
| rtabmap::SensorData::SensorData | ( | const cv::Mat & | rgb, |
| const cv::Mat & | depth, | ||
| const CameraModel & | cameraModel, | ||
| int | id = 0, |
||
| double | stamp = 0.0, |
||
| const cv::Mat & | userData = cv::Mat() |
||
| ) |
RGB-D constructor.
Creates a SensorData object with RGB and depth images and a camera model.
| rgb | RGB or grayscale image (CV_8UC1 or CV_8UC3) |
| depth | Depth image (CV_16UC1 for millimeters or CV_32FC1 for meters) |
| cameraModel | Camera model for RGB-D projection |
| id | Sensor data ID (0 to auto-generate) |
| stamp | Timestamp in seconds |
| userData | Optional user-defined data matrix |
| rtabmap::SensorData::SensorData | ( | const cv::Mat & | rgb, |
| const cv::Mat & | depth, | ||
| const cv::Mat & | depth_confidence, | ||
| const CameraModel & | cameraModel, | ||
| int | id = 0, |
||
| double | stamp = 0.0, |
||
| const cv::Mat & | userData = cv::Mat() |
||
| ) |
RGB-D constructor with depth confidence.
Creates a SensorData object with RGB, depth, and depth confidence images.
| rgb | RGB or grayscale image (CV_8UC1 or CV_8UC3) |
| depth | Depth image (CV_16UC1 for millimeters or CV_32FC1 for meters) |
| depth_confidence | Depth confidence map (CV_8UC1, typically 0-100) |
| cameraModel | Camera model for RGB-D projection |
| id | Sensor data ID (0 to auto-generate) |
| stamp | Timestamp in seconds |
| userData | Optional user-defined data matrix |
| rtabmap::SensorData::SensorData | ( | const LaserScan & | laserScan, |
| const cv::Mat & | rgb, | ||
| const cv::Mat & | depth, | ||
| const CameraModel & | cameraModel, | ||
| int | id = 0, |
||
| double | stamp = 0.0, |
||
| const cv::Mat & | userData = cv::Mat() |
||
| ) |
RGB-D constructor with laser scan.
Creates a SensorData object with RGB, depth, camera model, and laser scan.
| laserScan | 2D or 3D laser scan |
| rgb | RGB or grayscale image (CV_8UC1 or CV_8UC3) |
| depth | Depth image (CV_16UC1 for millimeters or CV_32FC1 for meters) |
| cameraModel | Camera model for RGB-D projection |
| id | Sensor data ID (0 to auto-generate) |
| stamp | Timestamp in seconds |
| userData | Optional user-defined data matrix |
| rtabmap::SensorData::SensorData | ( | const LaserScan & | laserScan, |
| const cv::Mat & | rgb, | ||
| const cv::Mat & | depth, | ||
| const cv::Mat & | depthConfidence, | ||
| const CameraModel & | cameraModel, | ||
| int | id = 0, |
||
| double | stamp = 0.0, |
||
| const cv::Mat & | userData = cv::Mat() |
||
| ) |
RGB-D constructor with depth confidence and laser scan.
Creates a SensorData object with RGB, depth, depth confidence, camera model, and laser scan.
| laserScan | 2D or 3D laser scan |
| rgb | RGB or grayscale image (CV_8UC1 or CV_8UC3) |
| depth | Depth image (CV_16UC1 for millimeters or CV_32FC1 for meters) |
| depthConfidence | Depth confidence map (CV_8UC1) |
| cameraModel | Camera model for RGB-D projection |
| id | Sensor data ID (0 to auto-generate) |
| stamp | Timestamp in seconds |
| userData | Optional user-defined data matrix |
| rtabmap::SensorData::SensorData | ( | const cv::Mat & | rgb, |
| const cv::Mat & | depth, | ||
| const std::vector< CameraModel > & | cameraModels, | ||
| int | id = 0, |
||
| double | stamp = 0.0, |
||
| const cv::Mat & | userData = cv::Mat() |
||
| ) |
Multi-camera RGB-D constructor.
Creates a SensorData object with RGB, depth, and multiple camera models. rgb and depth images should contain stitched images from multiple cameras. All stitched images should have the same resolution.
| rgb | RGB or grayscale image (CV_8UC1 or CV_8UC3) |
| depth | Depth image (CV_16UC1 for millimeters or CV_32FC1 for meters) |
| cameraModels | Vector of camera models |
| id | Sensor data ID (0 to auto-generate) |
| stamp | Timestamp in seconds |
| userData | Optional user-defined data matrix |
| rtabmap::SensorData::SensorData | ( | const cv::Mat & | rgb, |
| const cv::Mat & | depth, | ||
| const cv::Mat & | depthConfidence, | ||
| const std::vector< CameraModel > & | cameraModels, | ||
| int | id = 0, |
||
| double | stamp = 0.0, |
||
| const cv::Mat & | userData = cv::Mat() |
||
| ) |
Multi-camera RGB-D constructor with depth confidence.
Creates a SensorData object with RGB, depth, depth confidence, and multiple camera models.
| rgb | RGB or grayscale image (CV_8UC1 or CV_8UC3) |
| depth | Depth image (CV_16UC1 for millimeters or CV_32FC1 for meters) |
| depthConfidence | Depth confidence map (CV_8UC1) |
| cameraModels | Vector of camera models |
| id | Sensor data ID (0 to auto-generate) |
| stamp | Timestamp in seconds |
| userData | Optional user-defined data matrix |
| rtabmap::SensorData::SensorData | ( | const LaserScan & | laserScan, |
| const cv::Mat & | rgb, | ||
| const cv::Mat & | depth, | ||
| const std::vector< CameraModel > & | cameraModels, | ||
| int | id = 0, |
||
| double | stamp = 0.0, |
||
| const cv::Mat & | userData = cv::Mat() |
||
| ) |
Multi-camera RGB-D constructor with laser scan.
Creates a SensorData object with RGB, depth, multiple camera models, and laser scan.
| laserScan | 2D or 3D laser scan |
| rgb | RGB or grayscale image (CV_8UC1 or CV_8UC3) |
| depth | Depth image (CV_16UC1 for millimeters or CV_32FC1 for meters) |
| cameraModels | Vector of camera models |
| id | Sensor data ID (0 to auto-generate) |
| stamp | Timestamp in seconds |
| userData | Optional user-defined data matrix |
| rtabmap::SensorData::SensorData | ( | const LaserScan & | laserScan, |
| const cv::Mat & | rgb, | ||
| const cv::Mat & | depth, | ||
| const cv::Mat & | depthConfidence, | ||
| const std::vector< CameraModel > & | cameraModels, | ||
| int | id = 0, |
||
| double | stamp = 0.0, |
||
| const cv::Mat & | userData = cv::Mat() |
||
| ) |
Multi-camera RGB-D constructor with depth confidence and laser scan.
Creates a SensorData object with RGB, depth, depth confidence, multiple camera models, and laser scan.
| laserScan | 2D or 3D laser scan |
| rgb | RGB or grayscale image (CV_8UC1 or CV_8UC3) |
| depth | Depth image (CV_16UC1 for millimeters or CV_32FC1 for meters) |
| depthConfidence | Depth confidence map (CV_8UC1) |
| cameraModels | Vector of camera models |
| id | Sensor data ID (0 to auto-generate) |
| stamp | Timestamp in seconds |
| userData | Optional user-defined data matrix |
| rtabmap::SensorData::SensorData | ( | const cv::Mat & | left, |
| const cv::Mat & | right, | ||
| const StereoCameraModel & | cameraModel, | ||
| int | id = 0, |
||
| double | stamp = 0.0, |
||
| const cv::Mat & | userData = cv::Mat() |
||
| ) |
Stereo camera constructor.
Creates a SensorData object with left and right stereo images and a stereo camera model.
| left | Left stereo image (CV_8UC1 or CV_8UC3) |
| right | Right stereo image (CV_8UC1 or CV_8UC3) |
| cameraModel | Stereo camera model for disparity computation |
| id | Sensor data ID (0 to auto-generate) |
| stamp | Timestamp in seconds |
| userData | Optional user-defined data matrix |
| rtabmap::SensorData::SensorData | ( | const LaserScan & | laserScan, |
| const cv::Mat & | left, | ||
| const cv::Mat & | right, | ||
| const StereoCameraModel & | cameraModel, | ||
| int | id = 0, |
||
| double | stamp = 0.0, |
||
| const cv::Mat & | userData = cv::Mat() |
||
| ) |
Stereo camera constructor with laser scan.
Creates a SensorData object with left and right stereo images, stereo camera model, and laser scan.
| laserScan | 2D or 3D laser scan |
| left | Left stereo image (CV_8UC1 or CV_8UC3) |
| right | Right stereo image (CV_8UC1 or CV_8UC3) |
| cameraModel | Stereo camera model for disparity computation |
| id | Sensor data ID (0 to auto-generate) |
| stamp | Timestamp in seconds |
| userData | Optional user-defined data matrix |
| rtabmap::SensorData::SensorData | ( | const cv::Mat & | rgb, |
| const cv::Mat & | depth, | ||
| const std::vector< StereoCameraModel > & | cameraModels, | ||
| int | id = 0, |
||
| double | stamp = 0.0, |
||
| const cv::Mat & | userData = cv::Mat() |
||
| ) |
Multi-camera stereo constructor.
Creates a SensorData object with left and right stereo images and multiple stereo camera models.
| rgb | Left stereo image (CV_8UC1 or CV_8UC3) |
| depth | Right stereo image (CV_8UC1 or CV_8UC3) |
| cameraModels | Vector of stereo camera models |
| id | Sensor data ID (0 to auto-generate) |
| stamp | Timestamp in seconds |
| userData | Optional user-defined data matrix |
| rtabmap::SensorData::SensorData | ( | const LaserScan & | laserScan, |
| const cv::Mat & | rgb, | ||
| const cv::Mat & | depth, | ||
| const std::vector< StereoCameraModel > & | cameraModels, | ||
| int | id = 0, |
||
| double | stamp = 0.0, |
||
| const cv::Mat & | userData = cv::Mat() |
||
| ) |
Multi-camera stereo constructor with laser scan.
Creates a SensorData object with left and right stereo images, multiple stereo camera models, and laser scan.
| laserScan | 2D or 3D laser scan |
| rgb | Left stereo image (CV_8UC1 or CV_8UC3) |
| depth | Right stereo image (CV_8UC1 or CV_8UC3) |
| cameraModels | Vector of stereo camera models |
| id | Sensor data ID (0 to auto-generate) |
| stamp | Timestamp in seconds |
| userData | Optional user-defined data matrix |
| rtabmap::SensorData::SensorData | ( | const IMU & | imu, |
| int | id = 0, |
||
| double | stamp = 0.0 |
||
| ) |
IMU-only constructor.
Creates a SensorData object with only IMU data (no images). Useful for IMU-only odometry or sensor fusion scenarios.
| imu | IMU data (accelerometer, gyroscope, orientation) |
| id | Sensor data ID (0 to auto-generate) |
| stamp | Timestamp in seconds |
|
inline |
Checks if the sensor data is valid.
Returns true if the sensor data contains at least one of:
Definition at line 485 of file SensorData.h.
|
inline |
Returns the sensor data ID.
Definition at line 515 of file SensorData.h.
|
inline |
Sets the sensor data ID.
| id | The unique sensor data ID |
Definition at line 521 of file SensorData.h.
|
inline |
Returns the timestamp.
Definition at line 527 of file SensorData.h.
|
inline |
Sets the timestamp.
| stamp | Timestamp in seconds |
Definition at line 533 of file SensorData.h.
|
inline |
Returns the compressed RGB/grayscale image.
Definition at line 540 of file SensorData.h.
|
inline |
Returns the compressed depth or right stereo image.
Definition at line 547 of file SensorData.h.
|
inline |
Returns the compressed depth confidence map.
Definition at line 554 of file SensorData.h.
|
inline |
Returns the compressed laser scan.
Definition at line 560 of file SensorData.h.
|
inline |
Returns the raw RGB/grayscale image.
Definition at line 566 of file SensorData.h.
|
inline |
Returns the raw depth or right stereo image.
Definition at line 573 of file SensorData.h.
|
inline |
Returns the raw depth confidence map.
Definition at line 579 of file SensorData.h.
|
inline |
Returns the raw laser scan.
Definition at line 585 of file SensorData.h.
| void rtabmap::SensorData::setRGBDImage | ( | const cv::Mat & | rgb, |
| const cv::Mat & | depth, | ||
| const CameraModel & | model, | ||
| bool | clearPreviousData = true |
||
| ) |
Set image data. Detect automatically if raw or compressed. A matrix of type CV_8UC1 with 1 row is considered as compressed.
| clearPreviousData,clear | previous raw and compressed images before setting the new ones. |
| void rtabmap::SensorData::setLaserScan | ( | const LaserScan & | laserScan, |
| bool | clearPreviousData = true |
||
| ) |
Set laser scan data. Detect automatically if raw or compressed. A matrix of type CV_8UC1 with 1 row is considered as compressed.
| clearPreviousData,clear | previous raw and compressed scans before setting the new one. |
|
inline |
Sets a single camera model (clears previous models)
| model | Camera model to set |
Definition at line 610 of file SensorData.h.
|
inline |
Sets multiple camera models.
| models | Vector of camera models |
Definition at line 616 of file SensorData.h.
|
inline |
Sets a single stereo camera model (clears previous models)
| stereoCameraModel | Stereo camera model to set |
Definition at line 622 of file SensorData.h.
|
inline |
Sets multiple stereo camera models.
| stereoCameraModels | Vector of stereo camera models |
Definition at line 628 of file SensorData.h.
|
inline |
Returns the depth image (convenience method)
Returns the depth image if _depthOrRightRaw contains depth data (not a right stereo image). Depth images are CV_16UC1 or CV_32FC1, while right stereo images are CV_8UC1 or CV_8UC3.
Definition at line 639 of file SensorData.h.
|
inline |
Returns the right stereo image (convenience method)
Returns the right stereo image if _depthOrRightRaw contains stereo data (not a depth image). Right stereo images are CV_8UC1 or CV_8UC3, while depth images are CV_16UC1 or CV_32FC1.
Definition at line 650 of file SensorData.h.
| void rtabmap::SensorData::uncompressData | ( | ) |
Uncompresses all compressed data in-place.
Decompresses all compressed images, depth, laser scans, and user data, storing the results in the raw data members. This modifies the object.
| void rtabmap::SensorData::uncompressData | ( | cv::Mat * | imageRaw, |
| cv::Mat * | depthOrRightRaw, | ||
| LaserScan * | laserScanRaw = 0, |
||
| cv::Mat * | userDataRaw = 0, |
||
| cv::Mat * | groundCellsRaw = 0, |
||
| cv::Mat * | obstacleCellsRaw = 0, |
||
| cv::Mat * | emptyCellsRaw = 0, |
||
| cv::Mat * | depthConfidenceRaw = 0 |
||
| ) |
Uncompresses compressed data into provided output buffers.
Decompresses compressed data and stores results in the provided output buffers. If a buffer pointer is null, that data type is skipped. The raw fields of the object is updated with the uncompressed data so that consecutive calls with same field should not trigger a uncompression again.
| imageRaw | Output buffer for uncompressed RGB/grayscale image |
| depthOrRightRaw | Output buffer for uncompressed depth or right stereo image |
| laserScanRaw | Output buffer for uncompressed laser scan |
| userDataRaw | Output buffer for uncompressed user data |
| groundCellsRaw | Output buffer for uncompressed ground occupancy grid cells |
| obstacleCellsRaw | Output buffer for uncompressed obstacle occupancy grid cells |
| emptyCellsRaw | Output buffer for uncompressed empty occupancy grid cells |
| depthConfidenceRaw | Output buffer for uncompressed depth confidence |
| void rtabmap::SensorData::uncompressDataConst | ( | cv::Mat * | imageRaw, |
| cv::Mat * | depthOrRightRaw, | ||
| LaserScan * | laserScanRaw = 0, |
||
| cv::Mat * | userDataRaw = 0, |
||
| cv::Mat * | groundCellsRaw = 0, |
||
| cv::Mat * | obstacleCellsRaw = 0, |
||
| cv::Mat * | emptyCellsRaw = 0, |
||
| cv::Mat * | depthConfidenceRaw = 0 |
||
| ) | const |
Uncompresses compressed data into provided output buffers (const version)
Same as uncompressData() but does not modify the object's internal state.
| imageRaw | Output buffer for uncompressed RGB/grayscale image |
| depthOrRightRaw | Output buffer for uncompressed depth or right stereo image |
| laserScanRaw | Output buffer for uncompressed laser scan |
| userDataRaw | Output buffer for uncompressed user data |
| groundCellsRaw | Output buffer for uncompressed ground occupancy grid cells |
| obstacleCellsRaw | Output buffer for uncompressed obstacle occupancy grid cells |
| emptyCellsRaw | Output buffer for uncompressed empty occupancy grid cells |
| depthConfidenceRaw | Output buffer for uncompressed depth confidence |
|
inline |
Returns the camera models.
Definition at line 724 of file SensorData.h.
|
inline |
Returns the stereo camera models.
Definition at line 730 of file SensorData.h.
| void rtabmap::SensorData::setUserData | ( | const cv::Mat & | userData, |
| bool | clearPreviousData = true |
||
| ) |
Set user data. Detect automatically if raw or compressed. If raw, the data is compressed too. A matrix of type CV_8UC1 with 1 row is considered as compressed. If you have one dimension unsigned 8 bits raw data, make sure to transpose it (to have multiple rows instead of multiple columns) in order to be detected as not compressed.
| clearPreviousData,clear | previous raw and compressed user data before setting the new one. |
|
inline |
Definition at line 741 of file SensorData.h.
|
inline |
Definition at line 742 of file SensorData.h.
| void rtabmap::SensorData::setOccupancyGrid | ( | const cv::Mat & | ground, |
| const cv::Mat & | obstacles, | ||
| const cv::Mat & | empty, | ||
| float | cellSize, | ||
| const cv::Point3f & | viewPoint | ||
| ) |
Sets occupancy grid data.
Sets the occupancy grid with ground, obstacle, and empty cells. The data is automatically detected as raw or compressed. If raw, it will be compressed automatically.
| ground | Ground cells matrix |
| obstacles | Obstacle cells matrix |
| empty | Empty cells matrix |
| cellSize | Size of each grid cell in meters |
| viewPoint | Viewpoint/origin of the occupancy grid (3D point) |
|
inline |
Returns raw ground cells.
Definition at line 767 of file SensorData.h.
|
inline |
Returns compressed ground cells.
Definition at line 774 of file SensorData.h.
|
inline |
Returns raw obstacle cells.
Definition at line 780 of file SensorData.h.
|
inline |
Returns compressed obstacle cells.
Definition at line 787 of file SensorData.h.
|
inline |
Returns raw empty cells.
Definition at line 793 of file SensorData.h.
|
inline |
Returns compressed empty cells.
Definition at line 800 of file SensorData.h.
|
inline |
Returns the occupancy grid cell size.
Definition at line 806 of file SensorData.h.
|
inline |
Returns the occupancy grid viewpoint.
Definition at line 812 of file SensorData.h.
| void rtabmap::SensorData::setFeatures | ( | const std::vector< cv::KeyPoint > & | keypoints, |
| const std::vector< cv::Point3f > & | keypoints3D, | ||
| const cv::Mat & | descriptors | ||
| ) |
Sets visual features (keypoints, 3D points, descriptors)
Sets the visual features extracted from the images. All arrays must have matching sizes (one keypoint per 3D point and descriptor).
| keypoints | 2D keypoints in image coordinates |
| keypoints3D | 3D points corresponding to keypoints (in base_link frame) |
| descriptors | Feature descriptors matrix (one row per keypoint) |
|
inline |
Returns the 2D keypoints.
Definition at line 830 of file SensorData.h.
|
inline |
Returns the 3D keypoints.
Definition at line 836 of file SensorData.h.
|
inline |
Returns the feature descriptors.
Definition at line 842 of file SensorData.h.
|
inline |
Adds a global descriptor.
| descriptor | Global descriptor to add |
Definition at line 848 of file SensorData.h.
|
inline |
Sets all global descriptors.
| descriptors | Vector of global descriptors |
Definition at line 854 of file SensorData.h.
|
inline |
Clears all global descriptors.
Definition at line 859 of file SensorData.h.
|
inline |
Returns all global descriptors.
Definition at line 865 of file SensorData.h.
|
inline |
Sets the ground truth pose.
| pose | Ground truth transform (for evaluation purposes) |
Definition at line 871 of file SensorData.h.
|
inline |
Returns the ground truth pose.
Definition at line 877 of file SensorData.h.
|
inline |
Sets the global pose with covariance.
| pose | Global pose transform |
| covariance | Pose covariance matrix (6x6, CV_64FC1) |
Definition at line 884 of file SensorData.h.
|
inline |
Returns the global pose.
Definition at line 890 of file SensorData.h.
|
inline |
Returns the global pose covariance.
Definition at line 896 of file SensorData.h.
|
inline |
Sets GPS data.
| gps | GPS data (latitude, longitude, altitude, etc.) |
Definition at line 902 of file SensorData.h.
|
inline |
| void rtabmap::SensorData::setIMU | ( | const IMU & | imu | ) |
|
inline |
|
inline |
Sets all environmental sensors.
| sensors | Map of environmental sensor types to sensor data |
Definition at line 928 of file SensorData.h.
|
inline |
Adds a single environmental sensor.
| sensor | Environmental sensor to add |
Definition at line 934 of file SensorData.h.
|
inline |
Returns all environmental sensors.
Definition at line 940 of file SensorData.h.
|
inline |
Sets landmarks.
| landmarks | Map of landmark IDs to landmark data |
Definition at line 947 of file SensorData.h.
|
inline |
Returns landmarks.
Definition at line 953 of file SensorData.h.
| unsigned long rtabmap::SensorData::getMemoryUsed | ( | ) | const |
Computes the memory usage of this sensor data.
Calculates the approximate memory footprint including all images, laser scans, features, descriptors, and other data structures.
| void rtabmap::SensorData::clearCompressedData | ( | bool | images = true, |
| bool | scan = true, |
||
| bool | userData = true, |
||
| bool | occupancyGrid = true |
||
| ) |
Clear compressed rgb/depth (left/right) images, compressed laser scan and compressed user data. Raw data are kept is set.
| void rtabmap::SensorData::clearRawData | ( | bool | images = true, |
| bool | scan = true, |
||
| bool | userData = true, |
||
| bool | occupancyGrid = true |
||
| ) |
Clear raw rgb/depth (left/right) images, raw laser scan and raw user data. Compressed data are kept is set.
| int rtabmap::SensorData::isPointVisibleFromCameras | ( | const cv::Point3f & | pt | ) | const |
Checks if a 3D point is visible from any camera.
Projects the 3D point into all camera models and checks if it falls within the image bounds.
| pt | 3D point in robot frame (base_link) |