fixed variance fatal error on loop closure detection only

This commit is contained in:
matlabbe
2015-04-03 08:26:47 -04:00
parent 2e644c4b05
commit 5ef3194786
+2 -2
View File
@@ -977,7 +977,7 @@ bool Rtabmap::process(const SensorData & data)
{ {
std::string rejectedMsg; std::string rejectedMsg;
UDEBUG("Check local transform between %d and %d", signature->id(), *iter); UDEBUG("Check local transform between %d and %d", signature->id(), *iter);
double variance = -1.0; double variance = 1.0;
int inliers = -1; int inliers = -1;
Transform transform = _memory->computeVisualTransform(*iter, signature->id(), &rejectedMsg, &inliers, &variance); Transform transform = _memory->computeVisualTransform(*iter, signature->id(), &rejectedMsg, &inliers, &variance);
if(!transform.isNull() && _globalLoopClosureIcpType > 0) if(!transform.isNull() && _globalLoopClosureIcpType > 0)
@@ -1407,7 +1407,7 @@ bool Rtabmap::process(const SensorData & data)
{ {
//Compute transform if metric data are present //Compute transform if metric data are present
Transform transform; Transform transform;
double variance = -1; double variance = 1;
if(_rgbdSlamMode) if(_rgbdSlamMode)
{ {
std::string rejectedMsg; std::string rejectedMsg;