diff --git a/corelib/src/Graph.cpp b/corelib/src/Graph.cpp index 6fa99170..24f714dd 100644 --- a/corelib/src/Graph.cpp +++ b/corelib/src/Graph.cpp @@ -395,8 +395,8 @@ std::map TOROOptimizer::optimize( // compute the error and dump it double mte, mre, are, ate; double error=pg3.error(&mre, &mte, &are, &ate); - UDEBUG("iteration %d RotGain=%f global error=%f error/constraint=%f mte=%f mre=%f are=%f ate=%f", - i, pg3.getRotGain(), error, error/pg3.edges.size(), mte, mre, are, ate); + UDEBUG("i %d RotGain=%f global error=%f error/constraint=%f", + i, pg3.getRotGain(), error, error/pg3.edges.size()); } } UINFO("TORO iterate end"); diff --git a/corelib/src/Rtabmap.cpp b/corelib/src/Rtabmap.cpp index 94ecd360..9debb74f 100644 --- a/corelib/src/Rtabmap.cpp +++ b/corelib/src/Rtabmap.cpp @@ -2188,8 +2188,7 @@ void Rtabmap::optimizeCurrentMap( std::map poses; std::multimap edgeConstraints; _memory->getMetricConstraints(uKeys(ids), poses, edgeConstraints, lookInDatabase); - UDEBUG("poses=%d, edgeConstraints=%d", (int)poses.size(), (int)edgeConstraints.size()); - UINFO("get constraints time %f s", timer.ticks()); + UINFO("get constraints (%d poses, %d edges) time %f s", (int)poses.size(), (int)edgeConstraints.size(), timer.ticks()); if(constraints) { @@ -2207,6 +2206,12 @@ void Rtabmap::optimizeCurrentMap( optimizedPoses = _graphOptimizer->optimize(id, poses, edgeConstraints); } UINFO("optimize time %f s", timer.ticks()); + + if(_memory->getSignature(id) && uContains(optimizedPoses, id)) + { + Transform t = optimizedPoses.at(id) * _memory->getSignature(id)->getPose().inverse(); + UINFO("Correction (from node %d) %s", id, t.prettyPrint().c_str()); + } } }