rtabmap: added rejectLastLoopClosure() method, for convenience if a validation is done outside RTAB-Map and to reject loop closure detected by RTAB-Map.

git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@782 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2013-01-29 15:48:36 +00:00
parent 1b7c995ea0
commit f73983afd2
6 changed files with 87 additions and 15 deletions

View File

@@ -76,6 +76,7 @@ public:
bool ignoreLoopIds = false,
double * dbAccessTime = 0) const;
void deleteLastLocation();
void rejectLastLoopClosure();
//getters
const std::set<int> & getWorkingMem() const {return _workingMem;}
@@ -172,6 +173,7 @@ private:
int _lastLoopClosureId;
bool _memoryChanged; // False by default, become true when Memory::update() is called.
int _signaturesAdded;
std::vector<std::pair<int, int> > _savedLoopClosureInfo; // size 3 or 0
std::map<int, Signature *> _signatures; // TODO : check if a signature is already added? although it is not supposed to occur...
std::set<int> _stMem; // id

View File

@@ -86,7 +86,7 @@ public:
int getLoopClosureId() const;
int getRetrievedId() const;
int getLastLocationId();
float getLcHypValue() const {return _lastLcHypothesisValue;}
float getLcHypValue() const {return _lcHypothesisValue;}
std::list<int> getWM(); // working memory
std::set<int> getSTM(); // short-term memory
int getWMSize(); // working memory size
@@ -108,6 +108,7 @@ public:
void updateParameters(const ParametersMap & parameters);
void setWorkingDirectory(std::string path);
void deleteLastLocation();
void rejectLastLoopClosure();
void adjustLikelihood(std::map<int, float> & likelihood) const;
std::pair<int, float> selectHypothesis(const std::map<int, float> & posterior,
@@ -148,9 +149,8 @@ private:
bool _statisticLogsBufferedInRAM;
int _lcHypothesisId;
float _lcHypothesisValue;
int _retrievedId;
float _lastLcHypothesisValue;
int _lastLoopClosureId;
double _lastProcessTime;
UMutex _stateMutex;