mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
Added Memory/Distance_travelled/m to Statistics
This commit is contained in:
@@ -214,6 +214,7 @@ private:
|
|||||||
std::pair<int, float> _highestHypothesis;
|
std::pair<int, float> _highestHypothesis;
|
||||||
double _lastProcessTime;
|
double _lastProcessTime;
|
||||||
bool _someNodesHaveBeenTransferred;
|
bool _someNodesHaveBeenTransferred;
|
||||||
|
float _distanceTravelled;
|
||||||
|
|
||||||
// Abstract classes containing all loop closure
|
// Abstract classes containing all loop closure
|
||||||
// strategies for a type of signature or configuration.
|
// strategies for a type of signature or configuration.
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ class RTABMAP_EXP Statistics
|
|||||||
RTABMAP_STATS(Memory, Rehearsal_merged,);
|
RTABMAP_STATS(Memory, Rehearsal_merged,);
|
||||||
RTABMAP_STATS(Memory, Local_graph_size,);
|
RTABMAP_STATS(Memory, Local_graph_size,);
|
||||||
RTABMAP_STATS(Memory, Small_movement,);
|
RTABMAP_STATS(Memory, Small_movement,);
|
||||||
|
RTABMAP_STATS(Memory, Distance_travelled, m);
|
||||||
|
|
||||||
RTABMAP_STATS(Timing, Memory_update, ms);
|
RTABMAP_STATS(Timing, Memory_update, ms);
|
||||||
RTABMAP_STATS(Timing, Scan_matching, ms);
|
RTABMAP_STATS(Timing, Scan_matching, ms);
|
||||||
|
|||||||
@@ -119,6 +119,7 @@ Rtabmap::Rtabmap() :
|
|||||||
_highestHypothesis(0,0.0f),
|
_highestHypothesis(0,0.0f),
|
||||||
_lastProcessTime(0.0),
|
_lastProcessTime(0.0),
|
||||||
_someNodesHaveBeenTransferred(false),
|
_someNodesHaveBeenTransferred(false),
|
||||||
|
_distanceTravelled(0.0f),
|
||||||
_epipolarGeometry(0),
|
_epipolarGeometry(0),
|
||||||
_bayesFilter(0),
|
_bayesFilter(0),
|
||||||
_graphOptimizer(0),
|
_graphOptimizer(0),
|
||||||
@@ -335,6 +336,7 @@ void Rtabmap::close()
|
|||||||
_mapCorrection.setIdentity();
|
_mapCorrection.setIdentity();
|
||||||
_lastLocalizationPose.setNull();
|
_lastLocalizationPose.setNull();
|
||||||
_lastLocalizationNodeId = 0;
|
_lastLocalizationNodeId = 0;
|
||||||
|
_distanceTravelled = 0.0f;
|
||||||
this->clearPath(0);
|
this->clearPath(0);
|
||||||
|
|
||||||
flushStatisticLogs();
|
flushStatisticLogs();
|
||||||
@@ -661,6 +663,7 @@ int Rtabmap::triggerNewMap()
|
|||||||
_optimizedPoses.clear();
|
_optimizedPoses.clear();
|
||||||
_constraints.clear();
|
_constraints.clear();
|
||||||
_lastLocalizationNodeId = 0;
|
_lastLocalizationNodeId = 0;
|
||||||
|
_distanceTravelled = 0.0f;
|
||||||
}
|
}
|
||||||
return mapId;
|
return mapId;
|
||||||
}
|
}
|
||||||
@@ -851,6 +854,7 @@ void Rtabmap::resetMemory()
|
|||||||
_mapCorrection.setIdentity();
|
_mapCorrection.setIdentity();
|
||||||
_lastLocalizationPose.setNull();
|
_lastLocalizationPose.setNull();
|
||||||
_lastLocalizationNodeId = 0;
|
_lastLocalizationNodeId = 0;
|
||||||
|
_distanceTravelled = 0.0f;
|
||||||
this->clearPath(0);
|
this->clearPath(0);
|
||||||
|
|
||||||
if(_memory)
|
if(_memory)
|
||||||
@@ -1155,6 +1159,8 @@ bool Rtabmap::process(
|
|||||||
|
|
||||||
Link tmp = signature->getLinks().begin()->second.inverse();
|
Link tmp = signature->getLinks().begin()->second.inverse();
|
||||||
|
|
||||||
|
_distanceTravelled += tmp.transform().getNorm();
|
||||||
|
|
||||||
// if the previous node is an intermediate node, remove it from the local graph
|
// if the previous node is an intermediate node, remove it from the local graph
|
||||||
if(_constraints.size() &&
|
if(_constraints.size() &&
|
||||||
_constraints.rbegin()->second.to() == signature->getLinks().begin()->second.to())
|
_constraints.rbegin()->second.to() == signature->getLinks().begin()->second.to())
|
||||||
@@ -2371,6 +2377,7 @@ bool Rtabmap::process(
|
|||||||
statistics_.addStatistic(Statistics::kLoopRejectedHypothesis(), rejectedHypothesis?1.0f:0);
|
statistics_.addStatistic(Statistics::kLoopRejectedHypothesis(), rejectedHypothesis?1.0f:0);
|
||||||
|
|
||||||
statistics_.addStatistic(Statistics::kMemorySmall_movement(), smallDisplacement?1.0f:0);
|
statistics_.addStatistic(Statistics::kMemorySmall_movement(), smallDisplacement?1.0f:0);
|
||||||
|
statistics_.addStatistic(Statistics::kMemoryDistance_travelled(), _distanceTravelled);
|
||||||
|
|
||||||
if(_publishLikelihood || _publishPdf)
|
if(_publishLikelihood || _publishPdf)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<package>
|
<package>
|
||||||
<name>rtabmap</name>
|
<name>rtabmap</name>
|
||||||
<version>0.10.4</version>
|
<version>0.10.10</version>
|
||||||
<description>RTAB-Map's standalone library. RTAB-Map is a RGB-D SLAM approach with real-time constraints.</description>
|
<description>RTAB-Map's standalone library. RTAB-Map is a RGB-D SLAM approach with real-time constraints.</description>
|
||||||
<maintainer email="matlabbe@gmail.com">Mathieu Labbe</maintainer>
|
<maintainer email="matlabbe@gmail.com">Mathieu Labbe</maintainer>
|
||||||
<author>Mathieu Labbe</author>
|
<author>Mathieu Labbe</author>
|
||||||
|
|||||||
Reference in New Issue
Block a user