Added c++ example usage

git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@694 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2013-01-10 16:28:12 +00:00
parent d9ef3a603c
commit 0f4e24233c
11 changed files with 141 additions and 29 deletions

View File

@@ -75,6 +75,7 @@ Rtabmap::Rtabmap() :
_retrievedId(0),
_lastLcHypothesisValue(0),
_lastLoopClosureId(0),
_lastProcessTime(0.0),
_epipolarGeometry(0),
_bayesFilter(0),
_memory(0),
@@ -517,6 +518,15 @@ void Rtabmap::mainLoop()
}
}
void Rtabmap::deleteMemory()
{
// Only if rtabmap's thread is not started...
if(!this->isRunning())
{
this->resetMemory(true);
}
}
void Rtabmap::resetMemory(bool dbOverwritten)
{
if(_memory)
@@ -1146,6 +1156,7 @@ void Rtabmap::process()
ULOGGER_INFO("Removing old signatures because time limit is reached %f>%f or memory is reached %d>%d...", totalTime*1000, _maxTimeAllowed, _memory->getWorkingMemSize(), _maxMemoryAllowed);
signaturesRemoved = _memory->forget(immunizedLocations);
}
_lastProcessTime = totalTime;
timeRealTimeLimitReachedProcess = timer.ticks();
ULOGGER_INFO("Time limit reached processing = %f...", timeRealTimeLimitReachedProcess);