ICP correspondence ratio set to 0 when maximum laser scan count is not set

This commit is contained in:
matlabbe
2015-08-05 20:16:27 -04:00
parent b90b46e5ac
commit a88e8dd013
3 changed files with 3 additions and 3 deletions

View File

@@ -130,7 +130,7 @@ public:
from_,
link.to(),
type_,
transform_ * link.transform(),
transform_ * link.transform(), // FIXME, should be inf1^-1(inf1*t1 + inf2*t2)
infMatrix_ + link.infMatrix());
}

View File

@@ -2495,7 +2495,7 @@ Transform Memory::computeIcpTransform(
{
Transform icpT;
bool hasConverged = false;
float correspondencesRatio = -1.0f;
float correspondencesRatio = 0.0f;
int correspondences = 0;
double variance = 1;
pcl::PointCloud<pcl::PointXYZ>::Ptr newCloudRegistered(new pcl::PointCloud<pcl::PointXYZ>());

View File

@@ -1107,7 +1107,7 @@ bool Rtabmap::process(
if(!transform.isNull() && _globalLoopClosureIcpType > 0)
{
transform = _memory->computeIcpTransform(*iter, signature->id(), transform, _globalLoopClosureIcpType==1, &rejectedMsg, 0, &variance);
variance = 1.0f; // ICP, set variance to 1
variance = 1.0f; // ICP, set variance to 1 // FIXME why? all other links based on visual keep the variance
}
if(!transform.isNull())
{