mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user