Report: added invert and ids options. Reprocess: show node id along map id when processing.

This commit is contained in:
matlabbe
2020-04-30 17:00:09 -04:00
parent 40804d9120
commit 46886f2637
2 changed files with 77 additions and 11 deletions

View File

@@ -470,6 +470,7 @@ int main(int argc, char * argv[])
}
const rtabmap::Statistics & stats = rtabmap.getStatistics();
int refId = stats.refImageId();
int loopId = stats.loopClosureId() > 0? stats.loopClosureId(): stats.proximityDetectionId() > 0?stats.proximityDetectionId() :0;
int landmarkId = (int)uValue(stats.data(), rtabmap::Statistics::kLoopLandmark_detected(), 0.0f);
int refMapId = stats.refImageMapId();
@@ -478,15 +479,15 @@ int main(int argc, char * argv[])
{
++loopCount;
int loopMapId = stats.loopClosureId() > 0? stats.loopClosureMapId(): stats.proximityDetectionMapId();
printf("Processed %d/%d nodes [%d]... %dms Loop on %d [%d]\n", ++processed, totalIds, refMapId, int(iterationTime.ticks() * 1000), loopId, loopMapId);
printf("Processed %d/%d nodes [id=%d map=%d]... %dms Loop on %d [%d]\n", ++processed, totalIds, refId, refMapId, int(iterationTime.ticks() * 1000), loopId, loopMapId);
}
else if(landmarkId != 0)
{
printf("Processed %d/%d nodes [%d]... %dms Loop on landmark %d\n", ++processed, totalIds, refMapId, int(iterationTime.ticks() * 1000), landmarkId);
printf("Processed %d/%d nodes [id=%d map=%d]... %dms Loop on landmark %d\n", ++processed, totalIds, refId, refMapId, int(iterationTime.ticks() * 1000), landmarkId);
}
else
{
printf("Processed %d/%d nodes [%d]... %dms\n", ++processed, totalIds, refMapId, int(iterationTime.ticks() * 1000));
printf("Processed %d/%d nodes [id=%d map=%d]... %dms\n", ++processed, totalIds, refId, refMapId, int(iterationTime.ticks() * 1000));
}
// Here we accumulate statistics about distance from last localization