#include <SensorData.h>
Public Member Functions | |
void | addEnvSensor (const EnvSensor &sensor) |
void | addGlobalDescriptor (const GlobalDescriptor &descriptor) |
const std::vector< CameraModel > & | cameraModels () const |
void | clearCompressedData (bool images=true, bool scan=true, bool userData=true) |
void | clearGlobalDescriptors () |
void | clearOccupancyGridRaw () |
void | clearRawData (bool images=true, bool scan=true, bool userData=true) |
const cv::Mat & | depthOrRightCompressed () const |
const cv::Mat & | depthOrRightRaw () const |
cv::Mat | depthRaw () const |
const cv::Mat & | descriptors () const |
const EnvSensors & | envSensors () const |
unsigned long | getMemoryUsed () const |
const std::vector< GlobalDescriptor > & | globalDescriptors () const |
const Transform & | globalPose () const |
const cv::Mat & | globalPoseCovariance () const |
const GPS & | gps () const |
float | gridCellSize () const |
const cv::Mat & | gridEmptyCellsCompressed () const |
const cv::Mat & | gridEmptyCellsRaw () const |
const cv::Mat & | gridGroundCellsCompressed () const |
const cv::Mat & | gridGroundCellsRaw () const |
const cv::Mat & | gridObstacleCellsCompressed () const |
const cv::Mat & | gridObstacleCellsRaw () const |
const cv::Point3f & | gridViewPoint () const |
const Transform & | groundTruth () const |
int | id () const |
const cv::Mat & | imageCompressed () const |
const cv::Mat & | imageRaw () const |
const IMU & | imu () const |
bool | isPointVisibleFromCameras (const cv::Point3f &pt) const |
bool | isValid () const |
const std::vector< cv::KeyPoint > & | keypoints () const |
const std::vector< cv::Point3f > & | keypoints3D () const |
const Landmarks & | landmarks () const |
const LaserScan & | laserScanCompressed () const |
const LaserScan & | laserScanRaw () const |
cv::Mat | rightRaw () const |
SensorData () | |
SensorData (const cv::Mat &image, const CameraModel &cameraModel, int id=0, double stamp=0.0, const cv::Mat &userData=cv::Mat()) | |
SensorData (const cv::Mat &image, int id=0, double stamp=0.0, const cv::Mat &userData=cv::Mat()) | |
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()) | |
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()) | |
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()) | |
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()) | |
SensorData (const IMU &imu, int id=0, double stamp=0.0) | |
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()) | |
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()) | |
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()) | |
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()) | |
void | setCameraModel (const CameraModel &model) |
void | setCameraModels (const std::vector< CameraModel > &models) |
RTABMAP_DEPRECATED void | setDepthOrRightRaw (const cv::Mat &image) |
void | setEnvSensors (const EnvSensors &sensors) |
void | setFeatures (const std::vector< cv::KeyPoint > &keypoints, const std::vector< cv::Point3f > &keypoints3D, const cv::Mat &descriptors) |
void | setGlobalDescriptors (const std::vector< GlobalDescriptor > &descriptors) |
void | setGlobalPose (const Transform &pose, const cv::Mat &covariance) |
void | setGPS (const GPS &gps) |
void | setGroundTruth (const Transform &pose) |
void | setId (int id) |
RTABMAP_DEPRECATED void | setImageRaw (const cv::Mat &image) |
void | setIMU (const IMU &imu) |
void | setLandmarks (const Landmarks &landmarks) |
void | setLaserScan (const LaserScan &laserScan, bool clearPreviousData=true) |
RTABMAP_DEPRECATED void | setLaserScanRaw (const LaserScan &scan) |
void | setOccupancyGrid (const cv::Mat &ground, const cv::Mat &obstacles, const cv::Mat &empty, float cellSize, const cv::Point3f &viewPoint) |
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 std::vector< CameraModel > &models, bool clearPreviousData=true) |
void | setStamp (double stamp) |
void | setStereoCameraModel (const StereoCameraModel &stereoCameraModel) |
void | setStereoCameraModels (const std::vector< StereoCameraModel > &stereoCameraModels) |
void | setStereoImage (const cv::Mat &left, const cv::Mat &right, const std::vector< StereoCameraModel > &stereoCameraModels, bool clearPreviousData=true) |
void | setStereoImage (const cv::Mat &left, const cv::Mat &right, const StereoCameraModel &stereoCameraModel, bool clearPreviousData=true) |
void | setUserData (const cv::Mat &userData, bool clearPreviousData=true) |
RTABMAP_DEPRECATED void | setUserDataRaw (const cv::Mat &data) |
double | stamp () const |
const std::vector< StereoCameraModel > & | stereoCameraModels () const |
void | uncompressData () |
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) |
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) const |
const cv::Mat & | userDataCompressed () const |
const cv::Mat & | userDataRaw () const |
virtual | ~SensorData () |
Private Attributes | |
std::vector< CameraModel > | _cameraModels |
float | _cellSize |
cv::Mat | _depthOrRightCompressed |
cv::Mat | _depthOrRightRaw |
cv::Mat | _descriptors |
cv::Mat | _emptyCellsCompressed |
cv::Mat | _emptyCellsRaw |
EnvSensors | _envSensors |
std::vector< GlobalDescriptor > | _globalDescriptors |
cv::Mat | _groundCellsCompressed |
cv::Mat | _groundCellsRaw |
int | _id |
cv::Mat | _imageCompressed |
cv::Mat | _imageRaw |
std::vector< cv::KeyPoint > | _keypoints |
std::vector< cv::Point3f > | _keypoints3D |
Landmarks | _landmarks |
LaserScan | _laserScanCompressed |
LaserScan | _laserScanRaw |
cv::Mat | _obstacleCellsCompressed |
cv::Mat | _obstacleCellsRaw |
double | _stamp |
std::vector< StereoCameraModel > | _stereoCameraModels |
cv::Mat | _userDataCompressed |
cv::Mat | _userDataRaw |
cv::Point3f | _viewPoint |
Transform | globalPose_ |
cv::Mat | globalPoseCovariance_ |
GPS | gps_ |
Transform | groundTruth_ |
IMU | imu_ |
An id is automatically generated if id=0.
Definition at line 51 of file SensorData.h.
rtabmap::SensorData::SensorData | ( | ) |
Definition at line 40 of file SensorData.cpp.
rtabmap::SensorData::SensorData | ( | const cv::Mat & | image, |
int | id = 0 , |
||
double | stamp = 0.0 , |
||
const cv::Mat & | userData = cv::Mat() |
||
) |
Definition at line 48 of file SensorData.cpp.
rtabmap::SensorData::SensorData | ( | const cv::Mat & | image, |
const CameraModel & | cameraModel, | ||
int | id = 0 , |
||
double | stamp = 0.0 , |
||
const cv::Mat & | userData = cv::Mat() |
||
) |
Definition at line 62 of file SensorData.cpp.
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() |
||
) |
Definition at line 77 of file SensorData.cpp.
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() |
||
) |
Definition at line 93 of file SensorData.cpp.
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() |
||
) |
Definition at line 111 of file SensorData.cpp.
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() |
||
) |
Definition at line 127 of file SensorData.cpp.
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() |
||
) |
Definition at line 145 of file SensorData.cpp.
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() |
||
) |
Definition at line 161 of file SensorData.cpp.
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() |
||
) |
Definition at line 179 of file SensorData.cpp.
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() |
||
) |
Definition at line 195 of file SensorData.cpp.
Definition at line 212 of file SensorData.cpp.
|
virtual |
Definition at line 223 of file SensorData.cpp.
|
inline |
Definition at line 297 of file SensorData.h.
|
inline |
Definition at line 278 of file SensorData.h.
|
inline |
Definition at line 240 of file SensorData.h.
void rtabmap::SensorData::clearCompressedData | ( | bool | images = true , |
bool | scan = true , |
||
bool | userData = true |
||
) |
Clear compressed rgb/depth (left/right) images, compressed laser scan and compressed user data. Raw data are kept is set.
Definition at line 832 of file SensorData.cpp.
|
inline |
Definition at line 280 of file SensorData.h.
|
inline |
Definition at line 263 of file SensorData.h.
void rtabmap::SensorData::clearRawData | ( | bool | images = true , |
bool | scan = true , |
||
bool | userData = true |
||
) |
Clear raw rgb/depth (left/right) images, raw laser scan and raw user data. Compressed data are kept is set.
Definition at line 848 of file SensorData.cpp.
|
inline |
Definition at line 180 of file SensorData.h.
|
inline |
Definition at line 184 of file SensorData.h.
|
inline |
Definition at line 210 of file SensorData.h.
|
inline |
Definition at line 276 of file SensorData.h.
|
inline |
Definition at line 298 of file SensorData.h.
unsigned long rtabmap::SensorData::getMemoryUsed | ( | ) | const |
Definition at line 810 of file SensorData.cpp.
|
inline |
Definition at line 281 of file SensorData.h.
|
inline |
Definition at line 287 of file SensorData.h.
|
inline |
Definition at line 288 of file SensorData.h.
|
inline |
Definition at line 291 of file SensorData.h.
|
inline |
Definition at line 270 of file SensorData.h.
|
inline |
Definition at line 269 of file SensorData.h.
|
inline |
Definition at line 268 of file SensorData.h.
|
inline |
Definition at line 265 of file SensorData.h.
|
inline |
Definition at line 264 of file SensorData.h.
|
inline |
Definition at line 267 of file SensorData.h.
|
inline |
Definition at line 266 of file SensorData.h.
|
inline |
Definition at line 271 of file SensorData.h.
|
inline |
Definition at line 284 of file SensorData.h.
|
inline |
Definition at line 174 of file SensorData.h.
|
inline |
Definition at line 179 of file SensorData.h.
|
inline |
Definition at line 183 of file SensorData.h.
|
inline |
Definition at line 294 of file SensorData.h.
bool rtabmap::SensorData::isPointVisibleFromCameras | ( | const cv::Point3f & | pt | ) | const |
Definition at line 866 of file SensorData.cpp.
|
inline |
Definition at line 156 of file SensorData.h.
|
inline |
Definition at line 274 of file SensorData.h.
|
inline |
Definition at line 275 of file SensorData.h.
|
inline |
Definition at line 301 of file SensorData.h.
|
inline |
Definition at line 181 of file SensorData.h.
|
inline |
Definition at line 185 of file SensorData.h.
|
inline |
Definition at line 211 of file SensorData.h.
|
inline |
Definition at line 204 of file SensorData.h.
|
inline |
Definition at line 205 of file SensorData.h.
void rtabmap::SensorData::setDepthOrRightRaw | ( | const cv::Mat & | image | ) |
Definition at line 406 of file SensorData.cpp.
|
inline |
Definition at line 296 of file SensorData.h.
void rtabmap::SensorData::setFeatures | ( | const std::vector< cv::KeyPoint > & | keypoints, |
const std::vector< cv::Point3f > & | keypoints3D, | ||
const cv::Mat & | descriptors | ||
) |
Definition at line 801 of file SensorData.cpp.
|
inline |
Definition at line 279 of file SensorData.h.
|
inline |
Definition at line 286 of file SensorData.h.
|
inline |
Definition at line 290 of file SensorData.h.
|
inline |
Definition at line 283 of file SensorData.h.
|
inline |
Definition at line 175 of file SensorData.h.
void rtabmap::SensorData::setImageRaw | ( | const cv::Mat & | image | ) |
Definition at line 401 of file SensorData.cpp.
|
inline |
Definition at line 293 of file SensorData.h.
|
inline |
Definition at line 300 of file SensorData.h.
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. |
Definition at line 381 of file SensorData.cpp.
void rtabmap::SensorData::setLaserScanRaw | ( | const LaserScan & | scan | ) |
Definition at line 411 of file SensorData.cpp.
void rtabmap::SensorData::setOccupancyGrid | ( | const cv::Mat & | ground, |
const cv::Mat & | obstacles, | ||
const cv::Mat & | empty, | ||
float | cellSize, | ||
const cv::Point3f & | viewPoint | ||
) |
Definition at line 444 of file SensorData.cpp.
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. |
Definition at line 227 of file SensorData.cpp.
void rtabmap::SensorData::setRGBDImage | ( | const cv::Mat & | rgb, |
const cv::Mat & | depth, | ||
const std::vector< CameraModel > & | models, | ||
bool | clearPreviousData = true |
||
) |
Definition at line 237 of file SensorData.cpp.
|
inline |
Definition at line 177 of file SensorData.h.
|
inline |
Definition at line 206 of file SensorData.h.
|
inline |
Definition at line 207 of file SensorData.h.
void rtabmap::SensorData::setStereoImage | ( | const cv::Mat & | left, |
const cv::Mat & | right, | ||
const std::vector< StereoCameraModel > & | stereoCameraModels, | ||
bool | clearPreviousData = true |
||
) |
Definition at line 314 of file SensorData.cpp.
void rtabmap::SensorData::setStereoImage | ( | const cv::Mat & | left, |
const cv::Mat & | right, | ||
const StereoCameraModel & | stereoCameraModel, | ||
bool | clearPreviousData = true |
||
) |
Definition at line 304 of file SensorData.cpp.
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. |
Definition at line 422 of file SensorData.cpp.
void rtabmap::SensorData::setUserDataRaw | ( | const cv::Mat & | data | ) |
Definition at line 417 of file SensorData.cpp.
|
inline |
Definition at line 176 of file SensorData.h.
|
inline |
Definition at line 241 of file SensorData.h.
void rtabmap::SensorData::uncompressData | ( | ) |
Definition at line 528 of file SensorData.cpp.
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 |
||
) |
Definition at line 541 of file SensorData.cpp.
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 |
||
) | const |
Definition at line 623 of file SensorData.cpp.
|
inline |
Definition at line 253 of file SensorData.h.
|
inline |
Definition at line 252 of file SensorData.h.
|
private |
Definition at line 329 of file SensorData.h.
|
private |
Definition at line 343 of file SensorData.h.
|
private |
Definition at line 322 of file SensorData.h.
|
private |
Definition at line 326 of file SensorData.h.
|
private |
Definition at line 355 of file SensorData.h.
|
private |
Definition at line 339 of file SensorData.h.
|
private |
Definition at line 342 of file SensorData.h.
|
private |
Definition at line 347 of file SensorData.h.
|
private |
Definition at line 358 of file SensorData.h.
|
private |
Definition at line 337 of file SensorData.h.
|
private |
Definition at line 340 of file SensorData.h.
|
private |
Definition at line 318 of file SensorData.h.
|
private |
Definition at line 321 of file SensorData.h.
|
private |
Definition at line 325 of file SensorData.h.
|
private |
Definition at line 353 of file SensorData.h.
|
private |
Definition at line 354 of file SensorData.h.
|
private |
Definition at line 350 of file SensorData.h.
|
private |
Definition at line 323 of file SensorData.h.
|
private |
Definition at line 327 of file SensorData.h.
|
private |
Definition at line 338 of file SensorData.h.
|
private |
Definition at line 341 of file SensorData.h.
|
private |
Definition at line 319 of file SensorData.h.
|
private |
Definition at line 330 of file SensorData.h.
|
private |
Definition at line 333 of file SensorData.h.
|
private |
Definition at line 334 of file SensorData.h.
|
private |
Definition at line 344 of file SensorData.h.
|
private |
Definition at line 362 of file SensorData.h.
|
private |
Definition at line 363 of file SensorData.h.
|
private |
Definition at line 365 of file SensorData.h.
|
private |
Definition at line 360 of file SensorData.h.
|
private |
Definition at line 367 of file SensorData.h.