Split RawDataKept parameter into Raw and Binary parameters to save RAM when keeping raw data in the core is not required

This commit is contained in:
Mathieu Labbe
2015-01-12 18:23:25 -05:00
parent cdb1e29d45
commit 6bd2a0926b
9 changed files with 49 additions and 21 deletions

View File

@@ -103,6 +103,7 @@ public:
std::map<int, Link> getLoopClosureLinks(int signatureId,
bool lookInDatabase = false) const;
bool isRawDataKept() const {return _rawDataKept;}
bool isBinDataKept() const {return _binDataKept;}
float getSimilarityThreshold() const {return _similarityThreshold;}
std::map<int, int> getWeights() const;
int getLastSignatureId() const;
@@ -183,7 +184,6 @@ private:
void copyData(const Signature * from, Signature * to);
Signature * createSignature(
const SensorData & data,
bool keepRawData=false,
Statistics * stats = 0);
//keypoint stuff
@@ -199,6 +199,7 @@ private:
// parameters
float _similarityThreshold;
bool _rawDataKept;
bool _binDataKept;
bool _keepRehearsedNodesInDb;
bool _incrementalMemory;
int _maxStMemSize;

View File

@@ -183,7 +183,8 @@ class RTABMAP_EXP Parameters
// Memory
RTABMAP_PARAM(Mem, RehearsalSimilarity, float, 0.6, "Rehearsal similarity.");
RTABMAP_PARAM(Mem, ImageKept, bool, true, "Keep images in db.");
RTABMAP_PARAM(Mem, ImageKept, bool, false, "Keep raw images in RAM.");
RTABMAP_PARAM(Mem, BinDataKept, bool, true, "Keep binary data in db.");
RTABMAP_PARAM(Mem, RehearsedNodesKept, bool, true, "Keep rehearsed ndoes in db.");
RTABMAP_PARAM(Mem, STMSize, unsigned int, 10, "Short-term memory size.");
RTABMAP_PARAM(Mem, IncrementalMemory, bool, true, "SLAM mode, othwersize it is Localization mode.");