mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 16:57:46 +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());
|
UWARN("Ignoring location %d because the displacement is too small!", signature->id());
|
||||||
_memory->deleteLocation(signature->id());
|
_memory->deleteLocation(signature->id());
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -396,12 +396,13 @@ void RtabmapThread::process()
|
|||||||
{
|
{
|
||||||
if(_rtabmap->getMemory())
|
if(_rtabmap->getMemory())
|
||||||
{
|
{
|
||||||
_rtabmap->process(data);
|
if(_rtabmap->process(data))
|
||||||
|
{
|
||||||
Statistics stats = _rtabmap->getStatistics();
|
Statistics stats = _rtabmap->getStatistics();
|
||||||
stats.addStatistic(Statistics::kMemoryImages_buffered(), (float)_dataBuffer.size());
|
stats.addStatistic(Statistics::kMemoryImages_buffered(), (float)_dataBuffer.size());
|
||||||
ULOGGER_DEBUG("posting statistics_ event...");
|
ULOGGER_DEBUG("posting statistics_ event...");
|
||||||
this->post(new RtabmapEvent(stats));
|
this->post(new RtabmapEvent(stats));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user