rtabmap: don't publish statistics if process returns false. Also, don't return true when the displacement is too small (when the related parameters are set)

git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1981 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2014-11-11 22:14:45 +00:00
parent f9e25c2fa6
commit 6608ee5ef6
2 changed files with 8 additions and 7 deletions

View File

@@ -845,7 +845,7 @@ bool Rtabmap::process(const SensorData & data)
{
UWARN("Ignoring location %d because the displacement is too small!", signature->id());
_memory->deleteLocation(signature->id());
return true;
return false;
}
}
}

View File

@@ -396,12 +396,13 @@ void RtabmapThread::process()
{
if(_rtabmap->getMemory())
{
_rtabmap->process(data);
Statistics stats = _rtabmap->getStatistics();
stats.addStatistic(Statistics::kMemoryImages_buffered(), (float)_dataBuffer.size());
ULOGGER_DEBUG("posting statistics_ event...");
this->post(new RtabmapEvent(stats));
if(_rtabmap->process(data))
{
Statistics stats = _rtabmap->getStatistics();
stats.addStatistic(Statistics::kMemoryImages_buffered(), (float)_dataBuffer.size());
ULOGGER_DEBUG("posting statistics_ event...");
this->post(new RtabmapEvent(stats));
}
}
else
{