mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
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:
@@ -2141,7 +2141,7 @@ bool Rtabmap::process(
|
|||||||
for(std::multimap<int, Link>::iterator iter=constraints.begin(); iter!=constraints.end(); ++iter)
|
for(std::multimap<int, Link>::iterator iter=constraints.begin(); iter!=constraints.end(); ++iter)
|
||||||
{
|
{
|
||||||
// ignore links with high variance
|
// 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 t1 = uValue(poses, iter->second.from(), Transform());
|
||||||
Transform t2 = uValue(poses, iter->second.to(), 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)
|
if(maxLinearError > _optimizationMaxLinearError)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user