max optimization error checked on link with variance <=1 instead of <1 (to make it work also when TF odom is used, for which variance of 1 is set)

This commit is contained in:
matlabbe
2016-10-03 17:11:20 -04:00
parent 6f00cba872
commit 33501fdb0f

View File

@@ -2141,7 +2141,7 @@ bool Rtabmap::process(
for(std::multimap<int, Link>::iterator iter=constraints.begin(); iter!=constraints.end(); ++iter)
{
// ignore links with high variance
if(iter->second.transVariance() < 1.0)
if(iter->second.transVariance() <= 1.0)
{
Transform t1 = uValue(poses, iter->second.from(), Transform());
Transform t2 = uValue(poses, iter->second.to(), Transform());
@@ -2157,6 +2157,10 @@ bool Rtabmap::process(
}
}
}
if(maxLinearLink)
{
UINFO("Max optimization error = %f m (link %d->%d)", maxLinearError, maxLinearLink->from(), maxLinearLink->to());
}
if(maxLinearError > _optimizationMaxLinearError)
{