DbViewer/detect more loop closures: removed a messagebox when silent and icp-only is used

This commit is contained in:
matlabbe
2019-09-26 12:29:11 -04:00
parent 547da3f3ce
commit 3fd5cdfb75
2 changed files with 10 additions and 6 deletions

View File

@@ -1159,7 +1159,8 @@ Transform RegistrationIcp::computeTransformationImpl(
if(correspondences == 0) if(correspondences == 0)
{ {
UERROR("Transform is found but no correspondences has been found!? Variance is unknown!"); UWARN("Transform is found (%s) but no correspondences has been found!? Variance is unknown!",
icpT.prettyPrint().c_str());
} }
else else
{ {

View File

@@ -6867,12 +6867,15 @@ bool DatabaseViewer::addConstraint(int from, int to, bool silent)
std::map<int, Transform>::iterator toIter = optimizedPoses.find(to); std::map<int, Transform>::iterator toIter = optimizedPoses.find(to);
if(fromIter != optimizedPoses.end() && if(fromIter != optimizedPoses.end() &&
toIter != optimizedPoses.end()) toIter != optimizedPoses.end())
{
if(!silent)
{ {
QMessageBox::information(this, QMessageBox::information(this,
tr("Add constraint"), tr("Add constraint"),
tr("Registration is done without vision (see %1 parameter), " tr("Registration is done without vision (see %1 parameter), "
"a guess is taken from the optimized graph.") "a guess is taken from the optimized graph.")
.arg(Parameters::kRegStrategy().c_str())); .arg(Parameters::kRegStrategy().c_str()));
}
guess = fromIter->second.inverse() * toIter->second; guess = fromIter->second.inverse() * toIter->second;
} }
} }