Public Member Functions | Static Public Attributes | Protected Attributes | Private Member Functions | Private Attributes | List of all members
rtabmap::Memory Class Reference

#include <Memory.h>

Public Member Functions

bool addLink (const Link &link, bool addInDatabase=false)
 
bool allNodesInWM () const
 
int cleanup ()
 
int cleanupLocalGrids (const std::map< int, Transform > &poses, const cv::Mat &map, float xMin, float yMin, float cellSize, int cropRadius=1, bool filterScans=false)
 
void close (bool databaseSaved=true, bool postInitClosingEvents=false, const std::string &ouputDatabasePath="")
 
Transform computeIcpTransform (const Signature &fromS, const Signature &toS, Transform guess, RegistrationInfo *info=0) const
 
Transform computeIcpTransformMulti (int newId, int oldId, const std::map< int, Transform > &poses, RegistrationInfo *info=0)
 
std::map< int, floatcomputeLikelihood (const Signature *signature, const std::list< int > &ids)
 
Transform computeTransform (int fromId, int toId, Transform guess, RegistrationInfo *info=0, bool useKnownCorrespondencesIfPossible=false)
 
Transform computeTransform (Signature &fromS, Signature &toS, Transform guess, RegistrationInfo *info=0, bool useKnownCorrespondencesIfPossible=false) const
 
void deleteLocation (int locationId, std::list< int > *deletedWords=0)
 
void dumpDictionary (const char *fileNameRef, const char *fileNameDesc) const
 
virtual void dumpMemory (std::string directory) const
 
void dumpMemoryTree (const char *fileNameTree) const
 
virtual void dumpSignatures (const char *fileNameSign, bool words3D) const
 
void emptyTrash ()
 
std::list< intforget (const std::set< int > &ignoredIds=std::set< int >())
 
void generateGraph (const std::string &fileName, const std::set< int > &ids=std::set< int >())
 
const std::map< int, std::string > & getAllLabels () const
 
std::multimap< int, LinkgetAllLinks (bool lookInDatabase, bool ignoreNullLinks=true, bool withLandmarks=false) const
 
std::set< intgetAllSignatureIds (bool ignoreChildren=true) const
 
int getDatabaseMemoryUsed () const
 
std::string getDatabaseUrl () const
 
std::string getDatabaseVersion () const
 
double getDbSavingTime () const
 
const Feature2DgetFeature2D () const
 
void getGPS (int id, GPS &gps, Transform &offsetENU, bool lookInDatabase, int maxGraphDepth=0) const
 
Transform getGroundTruthPose (int signatureId, bool lookInDatabase=false) const
 
const std::map< int, Transform > & getGroundTruths () const
 
cv::Mat getImageCompressed (int signatureId) const
 
const std::map< int, std::set< int > > & getLandmarksIndex () const
 
int getLastGlobalLoopClosureId () const
 
int getLastSignatureId () const
 
const SignaturegetLastWorkingSignature () const
 
std::multimap< int, LinkgetLinks (int signatureId, bool lookInDatabase=false, bool withLandmarks=false) const
 
std::multimap< int, LinkgetLoopClosureLinks (int signatureId, bool lookInDatabase=false) const
 
int getMapId (int id, bool lookInDatabase=false) const
 
int getMaxStMemSize () const
 
unsigned long getMemoryUsed () const
 
void getMetricConstraints (const std::set< int > &ids, std::map< int, Transform > &poses, std::multimap< int, Link > &links, bool lookInDatabase=false, bool landmarksAdded=false)
 
std::multimap< int, LinkgetNeighborLinks (int signatureId, bool lookInDatabase=false) const
 
std::map< int, intgetNeighborsId (int signatureId, int maxGraphDepth, int maxCheckedInDatabase=-1, bool incrementMarginOnLoop=false, bool ignoreLoopIds=false, bool ignoreIntermediateNodes=false, bool ignoreLocalSpaceLoopIds=false, const std::set< int > &nodesSet=std::set< int >(), double *dbAccessTime=0) const
 
std::map< int, floatgetNeighborsIdRadius (int signatureId, float radius, const std::map< int, Transform > &optimizedPoses, int maxGraphDepth) const
 
void getNodeCalibration (int nodeId, std::vector< CameraModel > &models, std::vector< StereoCameraModel > &stereoModels) const
 
SensorData getNodeData (int locationId, bool images, bool scan, bool userData, bool occupancyGrid) const
 
bool getNodeInfo (int signatureId, Transform &odomPose, int &mapId, int &weight, std::string &label, double &stamp, Transform &groundTruth, std::vector< float > &velocity, GPS &gps, EnvSensors &sensors, bool lookInDatabase=false) const
 
std::map< int, LinkgetNodesObservingLandmark (int landmarkId, bool lookInDatabase) const
 
void getNodeWordsAndGlobalDescriptors (int nodeId, std::multimap< int, int > &words, std::vector< cv::KeyPoint > &wordsKpts, std::vector< cv::Point3f > &words3, cv::Mat &wordsDescriptors, std::vector< GlobalDescriptor > &globalDescriptors) const
 
const std::vector< double > & getOdomMaxInf () const
 
Transform getOdomPose (int signatureId, bool lookInDatabase=false) const
 
virtual const ParametersMapgetParameters () const
 
const SignaturegetSignature (int id) const
 
int getSignatureIdByLabel (const std::string &label, bool lookInDatabase=true) const
 
float getSimilarityThreshold () const
 
const std::set< int > & getStMem () const
 
const VWDictionarygetVWDictionary () const
 
std::map< int, intgetWeights () const
 
const std::map< int, double > & getWorkingMem () const
 
int incrementMapId (std::map< int, int > *reducedIds=0)
 
bool init (const std::string &dbUrl, bool dbOverwritten=false, const ParametersMap &parameters=ParametersMap(), bool postInitClosingEvents=false)
 
bool isBinDataKept () const
 
bool isGraphReduced () const
 
bool isIDsGenerated () const
 
bool isIncremental () const
 
bool isInLTM (int signatureId) const
 
bool isInSTM (int signatureId) const
 
bool isInWM (int signatureId) const
 
bool isLocalizationDataSaved () const
 
bool isOdomGravityUsed () const
 
void joinTrashThread ()
 
bool labelSignature (int id, const std::string &label)
 
cv::Mat load2DMap (float &xMin, float &yMin, float &cellSize) const
 
cv::Mat loadOptimizedMesh (std::vector< std::vector< std::vector< RTABMAP_PCL_INDEX > > > *polygons=0, std::vector< std::vector< Eigen::Vector2f > > *texCoords=0, cv::Mat *textures=0) const
 
std::map< int, TransformloadOptimizedPoses (Transform *lastlocalizationPose) const
 
cv::Mat loadPreviewImage () const
 
 Memory (const ParametersMap &parameters=ParametersMap())
 
bool memoryChanged () const
 
virtual void parseParameters (const ParametersMap &parameters)
 
std::set< intreactivateSignatures (const std::list< int > &ids, unsigned int maxLoaded, double &timeDbAccess)
 
void removeAllVirtualLinks ()
 
void removeLink (int idA, int idB)
 
void removeRawData (int id, bool image=true, bool scan=true, bool userData=true)
 
void removeVirtualLinks (int signatureId)
 
void save2DMap (const cv::Mat &map, float xMin, float yMin, float cellSize) const
 
void saveLocationData (int locationId)
 
void saveOptimizedMesh (const cv::Mat &cloud, const std::vector< std::vector< std::vector< RTABMAP_PCL_INDEX > > > &polygons=std::vector< std::vector< std::vector< RTABMAP_PCL_INDEX > > >(), const std::vector< std::vector< Eigen::Vector2f > > &texCoords=std::vector< std::vector< Eigen::Vector2f > >(), const cv::Mat &textures=cv::Mat()) const
 
void saveOptimizedPoses (const std::map< int, Transform > &optimizedPoses, const Transform &lastlocalizationPose) const
 
void savePreviewImage (const cv::Mat &image) const
 
void saveStatistics (const Statistics &statistics, bool saveWMState)
 
bool setUserData (int id, const cv::Mat &data)
 
bool update (const SensorData &data, const Transform &pose, const cv::Mat &covariance, const std::vector< float > &velocity=std::vector< float >(), Statistics *stats=0)
 
bool update (const SensorData &data, Statistics *stats=0)
 
void updateAge (int signatureId)
 
void updateLink (const Link &link, bool updateInDatabase=false)
 
virtual ~Memory ()
 

Static Public Attributes

static const int kIdInvalid = 0
 
static const int kIdStart = 0
 
static const int kIdVirtual = -1
 

Protected Attributes

DBDriver_dbDriver
 

Private Member Functions

Signature_getSignature (int id) const
 
void addSignatureToStm (Signature *signature, const cv::Mat &covariance)
 
void addSignatureToWmFromLTM (Signature *signature)
 
void cleanUnusedWords ()
 
void clear ()
 
void copyData (const Signature *from, Signature *to)
 
SignaturecreateSignature (const SensorData &data, const Transform &pose, Statistics *stats=0)
 
void disableWordsRef (int signatureId)
 
void enableWordsRef (const std::list< int > &signatureIds)
 
int getNextId ()
 
int getNi (int signatureId) const
 
std::list< Signature * > getRemovableSignatures (int count, const std::set< int > &ignoredIds=std::set< int >())
 
const std::map< int, Signature * > & getSignatures () const
 
void initCountId ()
 
void loadDataFromDb (bool postInitClosingEvents)
 
void moveSignatureToWMFromSTM (int id, int *reducedTo=0)
 
void moveToTrash (Signature *s, bool keepLinkedToGraph=true, std::list< int > *deletedWords=0)
 
void preUpdate ()
 
void rehearsal (Signature *signature, Statistics *stats=0)
 
bool rehearsalMerge (int oldId, int newId)
 

Private Attributes

bool _allNodesInWM
 
bool _badSignaturesIgnored
 
float _badSignRatio
 
bool _binDataKept
 
bool _compressionParallelized
 
bool _covOffDiagonalIgnored
 
bool _createOccupancyGrid
 
bool _depthAsMask
 
bool _detectMarkers
 
Feature2D_feature2D
 
bool _generateIds
 
GlobalDescriptorExtractor_globalDescriptorExtractor
 
GPS _gpsOrigin
 
std::map< int, Transform_groundTruths
 
int _idCount
 
int _idMapCount
 
bool _idUpdatedToNewOneRehearsal
 
unsigned int _imagePostDecimation
 
unsigned int _imagePreDecimation
 
bool _imagesAlreadyRectified
 
bool _incrementalMemory
 
bool _invertedReg
 
std::map< int, std::string_labels
 
std::map< int, std::set< int > > _landmarksIndex
 
std::map< int, float_landmarksSize
 
float _laserScanDownsampleStepSize
 
float _laserScanGroundNormalsUp
 
int _laserScanNormalK
 
float _laserScanNormalRadius
 
float _laserScanVoxelSize
 
int _lastGlobalLoopClosureId
 
Signature_lastSignature
 
bool _linksChanged
 
bool _localBundleOnLoopClosure
 
bool _localizationDataSaved
 
LocalGridMaker_localMapMaker
 
bool _mapLabelsAdded
 
float _markerAngVariance
 
MarkerDetector_markerDetector
 
float _markerLinVariance
 
int _maxStMemSize
 
bool _memoryChanged
 
bool _notLinkedNodesKeptInDb
 
std::vector< double > _odomMaxInf
 
bool _parallelized
 
bool _rawDescriptorsKept
 
float _recentWmRatio
 
std::vector< CameraModel_rectCameraModels
 
bool _rectifyOnlyFeatures
 
std::vector< StereoCameraModel_rectStereoCameraModels
 
bool _reduceGraph
 
bool _reextractLoopClosureFeatures
 
RegistrationIcp_registrationIcpMulti
 
Registration_registrationPipeline
 
RegistrationVis_registrationVis
 
float _rehearsalMaxAngle
 
float _rehearsalMaxDistance
 
bool _rehearsalWeightIgnoredWhileMoving
 
std::string _rgbCompressionFormat
 
bool _rotateImagesUpsideUp
 
bool _saveDepth16Format
 
bool _saveIntermediateNodeData
 
std::map< int, Signature * > _signatures
 
int _signaturesAdded
 
float _similarityThreshold
 
bool _stereoFromMotion
 
std::set< int_stMem
 
bool _tfIdfLikelihoodUsed
 
bool _transferSortingByWeightId
 
bool _useOdometryFeatures
 
bool _useOdometryGravity
 
int _visMaxFeatures
 
bool _visSSC
 
VWDictionary_vwd
 
std::map< int, double > _workingMem
 
ParametersMap parameters_
 

Detailed Description

Definition at line 64 of file Memory.h.

Constructor & Destructor Documentation

◆ Memory()

rtabmap::Memory::Memory ( const ParametersMap parameters = ParametersMap())

Definition at line 74 of file Memory.cpp.

◆ ~Memory()

rtabmap::Memory::~Memory ( )
virtual

Definition at line 539 of file Memory.cpp.

Member Function Documentation

◆ _getSignature()

Signature * rtabmap::Memory::_getSignature ( int  id) const
private

Definition at line 1241 of file Memory.cpp.

◆ addLink()

bool rtabmap::Memory::addLink ( const Link link,
bool  addInDatabase = false 
)

Definition at line 3407 of file Memory.cpp.

◆ addSignatureToStm()

void rtabmap::Memory::addSignatureToStm ( Signature signature,
const cv::Mat covariance 
)
private

Definition at line 969 of file Memory.cpp.

◆ addSignatureToWmFromLTM()

void rtabmap::Memory::addSignatureToWmFromLTM ( Signature signature)
private

Definition at line 1109 of file Memory.cpp.

◆ allNodesInWM()

bool rtabmap::Memory::allNodesInWM ( ) const
inline

Definition at line 170 of file Memory.h.

◆ cleanUnusedWords()

void rtabmap::Memory::cleanUnusedWords ( )
private

Definition at line 6182 of file Memory.cpp.

◆ cleanup()

int rtabmap::Memory::cleanup ( )

Definition at line 2096 of file Memory.cpp.

◆ cleanupLocalGrids()

int rtabmap::Memory::cleanupLocalGrids ( const std::map< int, Transform > &  poses,
const cv::Mat map,
float  xMin,
float  yMin,
float  cellSize,
int  cropRadius = 1,
bool  filterScans = false 
)

Definition at line 4225 of file Memory.cpp.

◆ clear()

void rtabmap::Memory::clear ( )
private

Definition at line 1757 of file Memory.cpp.

◆ close()

void rtabmap::Memory::close ( bool  databaseSaved = true,
bool  postInitClosingEvents = false,
const std::string ouputDatabasePath = "" 
)

Definition at line 482 of file Memory.cpp.

◆ computeIcpTransform()

Transform rtabmap::Memory::computeIcpTransform ( const Signature fromS,
const Signature toS,
Transform  guess,
RegistrationInfo info = 0 
) const

Definition at line 3192 of file Memory.cpp.

◆ computeIcpTransformMulti()

Transform rtabmap::Memory::computeIcpTransformMulti ( int  newId,
int  oldId,
const std::map< int, Transform > &  poses,
RegistrationInfo info = 0 
)

Definition at line 3206 of file Memory.cpp.

◆ computeLikelihood()

std::map< int, float > rtabmap::Memory::computeLikelihood ( const Signature signature,
const std::list< int > &  ids 
)

Compute the likelihood of the signature with some others in the memory. Important: Assuming that all other ids are under 'signature' id. If an error occurs, the result is empty.

Definition at line 1884 of file Memory.cpp.

◆ computeTransform() [1/2]

Transform rtabmap::Memory::computeTransform ( int  fromId,
int  toId,
Transform  guess,
RegistrationInfo info = 0,
bool  useKnownCorrespondencesIfPossible = false 
)

Definition at line 2836 of file Memory.cpp.

◆ computeTransform() [2/2]

Transform rtabmap::Memory::computeTransform ( Signature fromS,
Signature toS,
Transform  guess,
RegistrationInfo info = 0,
bool  useKnownCorrespondencesIfPossible = false 
) const

Definition at line 2865 of file Memory.cpp.

◆ copyData()

void rtabmap::Memory::copyData ( const Signature from,
Signature to 
)
private

Definition at line 4456 of file Memory.cpp.

◆ createSignature()

Signature * rtabmap::Memory::createSignature ( const SensorData data,
const Transform pose,
Statistics stats = 0 
)
private

Definition at line 4505 of file Memory.cpp.

◆ deleteLocation()

void rtabmap::Memory::deleteLocation ( int  locationId,
std::list< int > *  deletedWords = 0 
)

Definition at line 2717 of file Memory.cpp.

◆ disableWordsRef()

void rtabmap::Memory::disableWordsRef ( int  signatureId)
private

Definition at line 6160 of file Memory.cpp.

◆ dumpDictionary()

void rtabmap::Memory::dumpDictionary ( const char *  fileNameRef,
const char *  fileNameDesc 
) const

Definition at line 3600 of file Memory.cpp.

◆ dumpMemory()

void rtabmap::Memory::dumpMemory ( std::string  directory) const
virtual

Definition at line 3591 of file Memory.cpp.

◆ dumpMemoryTree()

void rtabmap::Memory::dumpMemoryTree ( const char *  fileNameTree) const

Definition at line 3660 of file Memory.cpp.

◆ dumpSignatures()

void rtabmap::Memory::dumpSignatures ( const char *  fileNameSign,
bool  words3D 
) const
virtual

Definition at line 3608 of file Memory.cpp.

◆ emptyTrash()

void rtabmap::Memory::emptyTrash ( )

Definition at line 2228 of file Memory.cpp.

◆ enableWordsRef()

void rtabmap::Memory::enableWordsRef ( const std::list< int > &  signatureIds)
private

Definition at line 6205 of file Memory.cpp.

◆ forget()

std::list< int > rtabmap::Memory::forget ( const std::set< int > &  ignoredIds = std::set<int>())

Definition at line 2024 of file Memory.cpp.

◆ generateGraph()

void rtabmap::Memory::generateGraph ( const std::string fileName,
const std::set< int > &  ids = std::set<int>() 
)

Definition at line 4214 of file Memory.cpp.

◆ getAllLabels()

const std::map<int, std::string>& rtabmap::Memory::getAllLabels ( ) const
inline

Definition at line 168 of file Memory.h.

◆ getAllLinks()

std::multimap< int, Link > rtabmap::Memory::getAllLinks ( bool  lookInDatabase,
bool  ignoreNullLinks = true,
bool  withLandmarks = false 
) const

Definition at line 1391 of file Memory.cpp.

◆ getAllSignatureIds()

std::set< int > rtabmap::Memory::getAllSignatureIds ( bool  ignoreChildren = true) const

Definition at line 1743 of file Memory.cpp.

◆ getDatabaseMemoryUsed()

int rtabmap::Memory::getDatabaseMemoryUsed ( ) const

Definition at line 1707 of file Memory.cpp.

◆ getDatabaseUrl()

std::string rtabmap::Memory::getDatabaseUrl ( ) const

Definition at line 1728 of file Memory.cpp.

◆ getDatabaseVersion()

std::string rtabmap::Memory::getDatabaseVersion ( ) const

Definition at line 1718 of file Memory.cpp.

◆ getDbSavingTime()

double rtabmap::Memory::getDbSavingTime ( ) const

Definition at line 1738 of file Memory.cpp.

◆ getFeature2D()

const Feature2D* rtabmap::Memory::getFeature2D ( ) const
inline

Definition at line 221 of file Memory.h.

◆ getGPS()

void rtabmap::Memory::getGPS ( int  id,
GPS gps,
Transform offsetENU,
bool  lookInDatabase,
int  maxGraphDepth = 0 
) const

Definition at line 4015 of file Memory.cpp.

◆ getGroundTruthPose()

Transform rtabmap::Memory::getGroundTruthPose ( int  signatureId,
bool  lookInDatabase = false 
) const

Definition at line 4002 of file Memory.cpp.

◆ getGroundTruths()

const std::map<int, Transform>& rtabmap::Memory::getGroundTruths ( ) const
inline

Definition at line 187 of file Memory.h.

◆ getImageCompressed()

cv::Mat rtabmap::Memory::getImageCompressed ( int  signatureId) const

Definition at line 4096 of file Memory.cpp.

◆ getLandmarksIndex()

const std::map<int, std::set<int> >& rtabmap::Memory::getLandmarksIndex ( ) const
inline

Definition at line 169 of file Memory.h.

◆ getLastGlobalLoopClosureId()

int rtabmap::Memory::getLastGlobalLoopClosureId ( ) const
inline

Definition at line 220 of file Memory.h.

◆ getLastSignatureId()

int rtabmap::Memory::getLastSignatureId ( ) const

Definition at line 2552 of file Memory.cpp.

◆ getLastWorkingSignature()

const Signature * rtabmap::Memory::getLastWorkingSignature ( ) const

Definition at line 2557 of file Memory.cpp.

◆ getLinks()

std::multimap< int, Link > rtabmap::Memory::getLinks ( int  signatureId,
bool  lookInDatabase = false,
bool  withLandmarks = false 
) const

Definition at line 1332 of file Memory.cpp.

◆ getLoopClosureLinks()

std::multimap< int, Link > rtabmap::Memory::getLoopClosureLinks ( int  signatureId,
bool  lookInDatabase = false 
) const

Definition at line 1292 of file Memory.cpp.

◆ getMapId()

int rtabmap::Memory::getMapId ( int  id,
bool  lookInDatabase = false 
) const

Definition at line 3976 of file Memory.cpp.

◆ getMaxStMemSize()

int rtabmap::Memory::getMaxStMemSize ( ) const
inline

Definition at line 151 of file Memory.h.

◆ getMemoryUsed()

unsigned long rtabmap::Memory::getMemoryUsed ( ) const

Definition at line 3718 of file Memory.cpp.

◆ getMetricConstraints()

void rtabmap::Memory::getMetricConstraints ( const std::set< int > &  ids,
std::map< int, Transform > &  poses,
std::multimap< int, Link > &  links,
bool  lookInDatabase = false,
bool  landmarksAdded = false 
)

Definition at line 6398 of file Memory.cpp.

◆ getNeighborLinks()

std::multimap< int, Link > rtabmap::Memory::getNeighborLinks ( int  signatureId,
bool  lookInDatabase = false 
) const

Definition at line 1251 of file Memory.cpp.

◆ getNeighborsId()

std::map< int, int > rtabmap::Memory::getNeighborsId ( int  signatureId,
int  maxGraphDepth,
int  maxCheckedInDatabase = -1,
bool  incrementMarginOnLoop = false,
bool  ignoreLoopIds = false,
bool  ignoreIntermediateNodes = false,
bool  ignoreLocalSpaceLoopIds = false,
const std::set< int > &  nodesSet = std::set<int>(),
double *  dbAccessTime = 0 
) const

Definition at line 1433 of file Memory.cpp.

◆ getNeighborsIdRadius()

std::map< int, float > rtabmap::Memory::getNeighborsIdRadius ( int  signatureId,
float  radius,
const std::map< int, Transform > &  optimizedPoses,
int  maxGraphDepth 
) const

Definition at line 1610 of file Memory.cpp.

◆ getNextId()

int rtabmap::Memory::getNextId ( )
private

Definition at line 1670 of file Memory.cpp.

◆ getNi()

int rtabmap::Memory::getNi ( int  signatureId) const
private

Definition at line 4440 of file Memory.cpp.

◆ getNodeCalibration()

void rtabmap::Memory::getNodeCalibration ( int  nodeId,
std::vector< CameraModel > &  models,
std::vector< StereoCameraModel > &  stereoModels 
) const

Definition at line 4196 of file Memory.cpp.

◆ getNodeData()

SensorData rtabmap::Memory::getNodeData ( int  locationId,
bool  images,
bool  scan,
bool  userData,
bool  occupancyGrid 
) const

Definition at line 4113 of file Memory.cpp.

◆ getNodeInfo()

bool rtabmap::Memory::getNodeInfo ( int  signatureId,
Transform odomPose,
int mapId,
int weight,
std::string label,
double &  stamp,
Transform groundTruth,
std::vector< float > &  velocity,
GPS gps,
EnvSensors sensors,
bool  lookInDatabase = false 
) const

Definition at line 4063 of file Memory.cpp.

◆ getNodesObservingLandmark()

std::map< int, Link > rtabmap::Memory::getNodesObservingLandmark ( int  landmarkId,
bool  lookInDatabase 
) const

Definition at line 2563 of file Memory.cpp.

◆ getNodeWordsAndGlobalDescriptors()

void rtabmap::Memory::getNodeWordsAndGlobalDescriptors ( int  nodeId,
std::multimap< int, int > &  words,
std::vector< cv::KeyPoint > &  wordsKpts,
std::vector< cv::Point3f > &  words3,
cv::Mat wordsDescriptors,
std::vector< GlobalDescriptor > &  globalDescriptors 
) const

Definition at line 4151 of file Memory.cpp.

◆ getOdomMaxInf()

const std::vector<double>& rtabmap::Memory::getOdomMaxInf ( ) const
inline

Definition at line 223 of file Memory.h.

◆ getOdomPose()

Transform rtabmap::Memory::getOdomPose ( int  signatureId,
bool  lookInDatabase = false 
) const

Definition at line 3989 of file Memory.cpp.

◆ getParameters()

virtual const ParametersMap& rtabmap::Memory::getParameters ( ) const
inlinevirtual

Definition at line 76 of file Memory.h.

◆ getRemovableSignatures()

std::list< Signature * > rtabmap::Memory::getRemovableSignatures ( int  count,
const std::set< int > &  ignoredIds = std::set<int>() 
)
private

Definition at line 2277 of file Memory.cpp.

◆ getSignature()

const Signature * rtabmap::Memory::getSignature ( int  id) const

Definition at line 1236 of file Memory.cpp.

◆ getSignatureIdByLabel()

int rtabmap::Memory::getSignatureIdByLabel ( const std::string label,
bool  lookInDatabase = true 
) const

Definition at line 2593 of file Memory.cpp.

◆ getSignatures()

const std::map<int, Signature*>& rtabmap::Memory::getSignatures ( ) const
inlineprivate

Definition at line 279 of file Memory.h.

◆ getSimilarityThreshold()

float rtabmap::Memory::getSimilarityThreshold ( ) const
inline

Definition at line 161 of file Memory.h.

◆ getStMem()

const std::set<int>& rtabmap::Memory::getStMem ( ) const
inline

Definition at line 150 of file Memory.h.

◆ getVWDictionary()

const VWDictionary * rtabmap::Memory::getVWDictionary ( ) const

Definition at line 1246 of file Memory.cpp.

◆ getWeights()

std::map< int, int > rtabmap::Memory::getWeights ( ) const

Definition at line 2002 of file Memory.cpp.

◆ getWorkingMem()

const std::map<int, double>& rtabmap::Memory::getWorkingMem ( ) const
inline

Definition at line 149 of file Memory.h.

◆ incrementMapId()

int rtabmap::Memory::incrementMapId ( std::map< int, int > *  reducedIds = 0)

Definition at line 1675 of file Memory.cpp.

◆ init()

bool rtabmap::Memory::init ( const std::string dbUrl,
bool  dbOverwritten = false,
const ParametersMap parameters = ParametersMap(),
bool  postInitClosingEvents = false 
)

Definition at line 165 of file Memory.cpp.

◆ initCountId()

void rtabmap::Memory::initCountId ( )
private

◆ isBinDataKept()

bool rtabmap::Memory::isBinDataKept ( ) const
inline

Definition at line 160 of file Memory.h.

◆ isGraphReduced()

bool rtabmap::Memory::isGraphReduced ( ) const
inline

Definition at line 222 of file Memory.h.

◆ isIDsGenerated()

bool rtabmap::Memory::isIDsGenerated ( ) const
inline

Definition at line 219 of file Memory.h.

◆ isIncremental()

bool rtabmap::Memory::isIncremental ( ) const
inline

Definition at line 213 of file Memory.h.

◆ isInLTM()

bool rtabmap::Memory::isInLTM ( int  signatureId) const
inline

Definition at line 218 of file Memory.h.

◆ isInSTM()

bool rtabmap::Memory::isInSTM ( int  signatureId) const
inline

Definition at line 216 of file Memory.h.

◆ isInWM()

bool rtabmap::Memory::isInWM ( int  signatureId) const
inline

Definition at line 217 of file Memory.h.

◆ isLocalizationDataSaved()

bool rtabmap::Memory::isLocalizationDataSaved ( ) const
inline

Definition at line 214 of file Memory.h.

◆ isOdomGravityUsed()

bool rtabmap::Memory::isOdomGravityUsed ( ) const
inline

Definition at line 224 of file Memory.h.

◆ joinTrashThread()

void rtabmap::Memory::joinTrashThread ( )

Definition at line 2236 of file Memory.cpp.

◆ labelSignature()

bool rtabmap::Memory::labelSignature ( int  id,
const std::string label 
)

Definition at line 2624 of file Memory.cpp.

◆ load2DMap()

cv::Mat rtabmap::Memory::load2DMap ( float xMin,
float yMin,
float cellSize 
) const

Definition at line 2187 of file Memory.cpp.

◆ loadDataFromDb()

void rtabmap::Memory::loadDataFromDb ( bool  postInitClosingEvents)
private

Definition at line 230 of file Memory.cpp.

◆ loadOptimizedMesh()

cv::Mat rtabmap::Memory::loadOptimizedMesh ( std::vector< std::vector< std::vector< RTABMAP_PCL_INDEX > > > *  polygons = 0,
std::vector< std::vector< Eigen::Vector2f > > *  texCoords = 0,
cv::Mat textures = 0 
) const

Definition at line 2212 of file Memory.cpp.

◆ loadOptimizedPoses()

std::map< int, Transform > rtabmap::Memory::loadOptimizedPoses ( Transform lastlocalizationPose) const

Definition at line 2147 of file Memory.cpp.

◆ loadPreviewImage()

cv::Mat rtabmap::Memory::loadPreviewImage ( ) const

Definition at line 2130 of file Memory.cpp.

◆ memoryChanged()

bool rtabmap::Memory::memoryChanged ( ) const
inline

Definition at line 212 of file Memory.h.

◆ moveSignatureToWMFromSTM()

void rtabmap::Memory::moveSignatureToWMFromSTM ( int  id,
int reducedTo = 0 
)
private

Definition at line 1127 of file Memory.cpp.

◆ moveToTrash()

void rtabmap::Memory::moveToTrash ( Signature s,
bool  keepLinkedToGraph = true,
std::list< int > *  deletedWords = 0 
)
private

If saveToDatabase=false, deleted words are filled in deletedWords.

Definition at line 2408 of file Memory.cpp.

◆ parseParameters()

void rtabmap::Memory::parseParameters ( const ParametersMap parameters)
virtual

Definition at line 555 of file Memory.cpp.

◆ preUpdate()

void rtabmap::Memory::preUpdate ( )
private

Definition at line 831 of file Memory.cpp.

◆ reactivateSignatures()

std::set< int > rtabmap::Memory::reactivateSignatures ( const std::list< int > &  ids,
unsigned int  maxLoaded,
double &  timeDbAccess 
)

Definition at line 6317 of file Memory.cpp.

◆ rehearsal()

void rtabmap::Memory::rehearsal ( Signature signature,
Statistics stats = 0 
)
private

Definition at line 3754 of file Memory.cpp.

◆ rehearsalMerge()

bool rtabmap::Memory::rehearsalMerge ( int  oldId,
int  newId 
)
private

Definition at line 3811 of file Memory.cpp.

◆ removeAllVirtualLinks()

void rtabmap::Memory::removeAllVirtualLinks ( )

Definition at line 3552 of file Memory.cpp.

◆ removeLink()

void rtabmap::Memory::removeLink ( int  idA,
int  idB 
)

Definition at line 2746 of file Memory.cpp.

◆ removeRawData()

void rtabmap::Memory::removeRawData ( int  id,
bool  image = true,
bool  scan = true,
bool  userData = true 
)

Definition at line 2822 of file Memory.cpp.

◆ removeVirtualLinks()

void rtabmap::Memory::removeVirtualLinks ( int  signatureId)

Definition at line 3561 of file Memory.cpp.

◆ save2DMap()

void rtabmap::Memory::save2DMap ( const cv::Mat map,
float  xMin,
float  yMin,
float  cellSize 
) const

Definition at line 2179 of file Memory.cpp.

◆ saveLocationData()

void rtabmap::Memory::saveLocationData ( int  locationId)

Definition at line 2727 of file Memory.cpp.

◆ saveOptimizedMesh()

void rtabmap::Memory::saveOptimizedMesh ( const cv::Mat cloud,
const std::vector< std::vector< std::vector< RTABMAP_PCL_INDEX > > > &  polygons = std::vector<std::vector<std::vector<RTABMAP_PCL_INDEX> > >(),
const std::vector< std::vector< Eigen::Vector2f > > &  texCoords = std::vector<std::vector<Eigen::Vector2f> >(),
const cv::Mat textures = cv::Mat() 
) const

Definition at line 2196 of file Memory.cpp.

◆ saveOptimizedPoses()

void rtabmap::Memory::saveOptimizedPoses ( const std::map< int, Transform > &  optimizedPoses,
const Transform lastlocalizationPose 
) const

Definition at line 2139 of file Memory.cpp.

◆ savePreviewImage()

void rtabmap::Memory::savePreviewImage ( const cv::Mat image) const

Definition at line 2123 of file Memory.cpp.

◆ saveStatistics()

void rtabmap::Memory::saveStatistics ( const Statistics statistics,
bool  saveWMState 
)

Definition at line 2115 of file Memory.cpp.

◆ setUserData()

bool rtabmap::Memory::setUserData ( int  id,
const cv::Mat data 
)

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.

Definition at line 2702 of file Memory.cpp.

◆ update() [1/2]

bool rtabmap::Memory::update ( const SensorData data,
const Transform pose,
const cv::Mat covariance,
const std::vector< float > &  velocity = std::vector<float>(),
Statistics stats = 0 
)

Definition at line 852 of file Memory.cpp.

◆ update() [2/2]

bool rtabmap::Memory::update ( const SensorData data,
Statistics stats = 0 
)

Definition at line 845 of file Memory.cpp.

◆ updateAge()

void rtabmap::Memory::updateAge ( int  signatureId)

Definition at line 1698 of file Memory.cpp.

◆ updateLink()

void rtabmap::Memory::updateLink ( const Link link,
bool  updateInDatabase = false 
)

Definition at line 3492 of file Memory.cpp.

Member Data Documentation

◆ _allNodesInWM

bool rtabmap::Memory::_allNodesInWM
private

Definition at line 352 of file Memory.h.

◆ _badSignaturesIgnored

bool rtabmap::Memory::_badSignaturesIgnored
private

Definition at line 314 of file Memory.h.

◆ _badSignRatio

float rtabmap::Memory::_badSignRatio
private

Definition at line 369 of file Memory.h.

◆ _binDataKept

bool rtabmap::Memory::_binDataKept
private

Definition at line 300 of file Memory.h.

◆ _compressionParallelized

bool rtabmap::Memory::_compressionParallelized
private

Definition at line 320 of file Memory.h.

◆ _covOffDiagonalIgnored

bool rtabmap::Memory::_covOffDiagonalIgnored
private

Definition at line 340 of file Memory.h.

◆ _createOccupancyGrid

bool rtabmap::Memory::_createOccupancyGrid
private

Definition at line 335 of file Memory.h.

◆ _dbDriver

DBDriver* rtabmap::Memory::_dbDriver
protected

Definition at line 294 of file Memory.h.

◆ _depthAsMask

bool rtabmap::Memory::_depthAsMask
private

Definition at line 316 of file Memory.h.

◆ _detectMarkers

bool rtabmap::Memory::_detectMarkers
private

Definition at line 341 of file Memory.h.

◆ _feature2D

Feature2D* rtabmap::Memory::_feature2D
private

Definition at line 368 of file Memory.h.

◆ _generateIds

bool rtabmap::Memory::_generateIds
private

Definition at line 313 of file Memory.h.

◆ _globalDescriptorExtractor

GlobalDescriptorExtractor* rtabmap::Memory::_globalDescriptorExtractor
private

Definition at line 381 of file Memory.h.

◆ _gpsOrigin

GPS rtabmap::Memory::_gpsOrigin
private

Definition at line 353 of file Memory.h.

◆ _groundTruths

std::map<int, Transform> rtabmap::Memory::_groundTruths
private

Definition at line 361 of file Memory.h.

◆ _idCount

int rtabmap::Memory::_idCount
private

Definition at line 345 of file Memory.h.

◆ _idMapCount

int rtabmap::Memory::_idMapCount
private

Definition at line 346 of file Memory.h.

◆ _idUpdatedToNewOneRehearsal

bool rtabmap::Memory::_idUpdatedToNewOneRehearsal
private

Definition at line 312 of file Memory.h.

◆ _imagePostDecimation

unsigned int rtabmap::Memory::_imagePostDecimation
private

Definition at line 319 of file Memory.h.

◆ _imagePreDecimation

unsigned int rtabmap::Memory::_imagePreDecimation
private

Definition at line 318 of file Memory.h.

◆ _imagesAlreadyRectified

bool rtabmap::Memory::_imagesAlreadyRectified
private

Definition at line 338 of file Memory.h.

◆ _incrementalMemory

bool rtabmap::Memory::_incrementalMemory
private

Definition at line 306 of file Memory.h.

◆ _invertedReg

bool rtabmap::Memory::_invertedReg
private

Definition at line 328 of file Memory.h.

◆ _labels

std::map<int, std::string> rtabmap::Memory::_labels
private

Definition at line 362 of file Memory.h.

◆ _landmarksIndex

std::map<int, std::set<int> > rtabmap::Memory::_landmarksIndex
private

Definition at line 363 of file Memory.h.

◆ _landmarksSize

std::map<int, float> rtabmap::Memory::_landmarksSize
private

Definition at line 364 of file Memory.h.

◆ _laserScanDownsampleStepSize

float rtabmap::Memory::_laserScanDownsampleStepSize
private

Definition at line 321 of file Memory.h.

◆ _laserScanGroundNormalsUp

float rtabmap::Memory::_laserScanGroundNormalsUp
private

Definition at line 325 of file Memory.h.

◆ _laserScanNormalK

int rtabmap::Memory::_laserScanNormalK
private

Definition at line 323 of file Memory.h.

◆ _laserScanNormalRadius

float rtabmap::Memory::_laserScanNormalRadius
private

Definition at line 324 of file Memory.h.

◆ _laserScanVoxelSize

float rtabmap::Memory::_laserScanVoxelSize
private

Definition at line 322 of file Memory.h.

◆ _lastGlobalLoopClosureId

int rtabmap::Memory::_lastGlobalLoopClosureId
private

Definition at line 348 of file Memory.h.

◆ _lastSignature

Signature* rtabmap::Memory::_lastSignature
private

Definition at line 347 of file Memory.h.

◆ _linksChanged

bool rtabmap::Memory::_linksChanged
private

Definition at line 350 of file Memory.h.

◆ _localBundleOnLoopClosure

bool rtabmap::Memory::_localBundleOnLoopClosure
private

Definition at line 327 of file Memory.h.

◆ _localizationDataSaved

bool rtabmap::Memory::_localizationDataSaved
private

Definition at line 307 of file Memory.h.

◆ _localMapMaker

LocalGridMaker* rtabmap::Memory::_localMapMaker
private

Definition at line 377 of file Memory.h.

◆ _mapLabelsAdded

bool rtabmap::Memory::_mapLabelsAdded
private

Definition at line 315 of file Memory.h.

◆ _markerAngVariance

float rtabmap::Memory::_markerAngVariance
private

Definition at line 343 of file Memory.h.

◆ _markerDetector

MarkerDetector* rtabmap::Memory::_markerDetector
private

Definition at line 379 of file Memory.h.

◆ _markerLinVariance

float rtabmap::Memory::_markerLinVariance
private

Definition at line 342 of file Memory.h.

◆ _maxStMemSize

int rtabmap::Memory::_maxStMemSize
private

Definition at line 309 of file Memory.h.

◆ _memoryChanged

bool rtabmap::Memory::_memoryChanged
private

Definition at line 349 of file Memory.h.

◆ _notLinkedNodesKeptInDb

bool rtabmap::Memory::_notLinkedNodesKeptInDb
private

Definition at line 303 of file Memory.h.

◆ _odomMaxInf

std::vector<double> rtabmap::Memory::_odomMaxInf
private

Definition at line 356 of file Memory.h.

◆ _parallelized

bool rtabmap::Memory::_parallelized
private

Definition at line 371 of file Memory.h.

◆ _rawDescriptorsKept

bool rtabmap::Memory::_rawDescriptorsKept
private

Definition at line 301 of file Memory.h.

◆ _recentWmRatio

float rtabmap::Memory::_recentWmRatio
private

Definition at line 310 of file Memory.h.

◆ _rectCameraModels

std::vector<CameraModel> rtabmap::Memory::_rectCameraModels
private

Definition at line 354 of file Memory.h.

◆ _rectifyOnlyFeatures

bool rtabmap::Memory::_rectifyOnlyFeatures
private

Definition at line 339 of file Memory.h.

◆ _rectStereoCameraModels

std::vector<StereoCameraModel> rtabmap::Memory::_rectStereoCameraModels
private

Definition at line 355 of file Memory.h.

◆ _reduceGraph

bool rtabmap::Memory::_reduceGraph
private

Definition at line 308 of file Memory.h.

◆ _reextractLoopClosureFeatures

bool rtabmap::Memory::_reextractLoopClosureFeatures
private

Definition at line 326 of file Memory.h.

◆ _registrationIcpMulti

RegistrationIcp* rtabmap::Memory::_registrationIcpMulti
private

Definition at line 374 of file Memory.h.

◆ _registrationPipeline

Registration* rtabmap::Memory::_registrationPipeline
private

Definition at line 373 of file Memory.h.

◆ _registrationVis

RegistrationVis* rtabmap::Memory::_registrationVis
private

Definition at line 375 of file Memory.h.

◆ _rehearsalMaxAngle

float rtabmap::Memory::_rehearsalMaxAngle
private

Definition at line 330 of file Memory.h.

◆ _rehearsalMaxDistance

float rtabmap::Memory::_rehearsalMaxDistance
private

Definition at line 329 of file Memory.h.

◆ _rehearsalWeightIgnoredWhileMoving

bool rtabmap::Memory::_rehearsalWeightIgnoredWhileMoving
private

Definition at line 331 of file Memory.h.

◆ _rgbCompressionFormat

std::string rtabmap::Memory::_rgbCompressionFormat
private

Definition at line 305 of file Memory.h.

◆ _rotateImagesUpsideUp

bool rtabmap::Memory::_rotateImagesUpsideUp
private

Definition at line 334 of file Memory.h.

◆ _saveDepth16Format

bool rtabmap::Memory::_saveDepth16Format
private

Definition at line 302 of file Memory.h.

◆ _saveIntermediateNodeData

bool rtabmap::Memory::_saveIntermediateNodeData
private

Definition at line 304 of file Memory.h.

◆ _signatures

std::map<int, Signature *> rtabmap::Memory::_signatures
private

Definition at line 358 of file Memory.h.

◆ _signaturesAdded

int rtabmap::Memory::_signaturesAdded
private

Definition at line 351 of file Memory.h.

◆ _similarityThreshold

float rtabmap::Memory::_similarityThreshold
private

Definition at line 299 of file Memory.h.

◆ _stereoFromMotion

bool rtabmap::Memory::_stereoFromMotion
private

Definition at line 317 of file Memory.h.

◆ _stMem

std::set<int> rtabmap::Memory::_stMem
private

Definition at line 359 of file Memory.h.

◆ _tfIdfLikelihoodUsed

bool rtabmap::Memory::_tfIdfLikelihoodUsed
private

Definition at line 370 of file Memory.h.

◆ _transferSortingByWeightId

bool rtabmap::Memory::_transferSortingByWeightId
private

Definition at line 311 of file Memory.h.

◆ _useOdometryFeatures

bool rtabmap::Memory::_useOdometryFeatures
private

Definition at line 332 of file Memory.h.

◆ _useOdometryGravity

bool rtabmap::Memory::_useOdometryGravity
private

Definition at line 333 of file Memory.h.

◆ _visMaxFeatures

int rtabmap::Memory::_visMaxFeatures
private

Definition at line 336 of file Memory.h.

◆ _visSSC

bool rtabmap::Memory::_visSSC
private

Definition at line 337 of file Memory.h.

◆ _vwd

VWDictionary* rtabmap::Memory::_vwd
private

Definition at line 367 of file Memory.h.

◆ _workingMem

std::map<int, double> rtabmap::Memory::_workingMem
private

Definition at line 360 of file Memory.h.

◆ kIdInvalid

const int rtabmap::Memory::kIdInvalid = 0
static

Definition at line 69 of file Memory.h.

◆ kIdStart

const int rtabmap::Memory::kIdStart = 0
static

Definition at line 67 of file Memory.h.

◆ kIdVirtual

const int rtabmap::Memory::kIdVirtual = -1
static

Definition at line 68 of file Memory.h.

◆ parameters_

ParametersMap rtabmap::Memory::parameters_
private

Definition at line 298 of file Memory.h.


The documentation for this class was generated from the following files:


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:27