Statistics: added x,y,z map corrections. Report: added options --stats to show available statistics to plot in a database

This commit is contained in:
matlabbe
2020-04-30 15:48:47 -04:00
parent 803c99cee2
commit 40804d9120
3 changed files with 43 additions and 2 deletions

View File

@@ -74,6 +74,9 @@ class RTABMAP_EXP Statistics
RTABMAP_STATS(Loop, Visual_inliers_mean_dist,m);
RTABMAP_STATS(Loop, Visual_inliers_distribution,);
RTABMAP_STATS(Loop, Map_correction_norm, m);
RTABMAP_STATS(Loop, Map_correction_x, m);
RTABMAP_STATS(Loop, Map_correction_y, m);
RTABMAP_STATS(Loop, Map_correction_z, m);
RTABMAP_STATS(Loop, Map_correction_roll, deg);
RTABMAP_STATS(Loop, Map_correction_pitch, deg);
RTABMAP_STATS(Loop, Map_correction_yaw, deg);

View File

@@ -3115,8 +3115,11 @@ bool Rtabmap::process(
// Map correction (/map -> /odom)
statistics_.addStatistic(Statistics::kLoopMap_correction_norm(), _mapCorrection.getNorm());
float roll,pitch,yaw;
_mapCorrection.getEulerAngles(roll, pitch, yaw);
float x,y,z,roll,pitch,yaw;
_mapCorrection.getTranslationAndEulerAngles(x, y, z, roll, pitch, yaw);
statistics_.addStatistic(Statistics::kLoopMap_correction_x(), x);
statistics_.addStatistic(Statistics::kLoopMap_correction_y(), y);
statistics_.addStatistic(Statistics::kLoopMap_correction_z(), z);
statistics_.addStatistic(Statistics::kLoopMap_correction_roll(), roll*180/M_PI);
statistics_.addStatistic(Statistics::kLoopMap_correction_pitch(), pitch*180/M_PI);
statistics_.addStatistic(Statistics::kLoopMap_correction_yaw(), yaw*180/M_PI);