Added OptimizerCeres class (Optimizer/Strategy=3)

This commit is contained in:
matlabbe
2019-08-17 03:55:04 -04:00
parent 38044040a6
commit 536f001479
29 changed files with 1982 additions and 284 deletions

View File

@@ -262,6 +262,12 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
_ui->odom_f2m_bundleStrategy->setItemData(2, 0, Qt::UserRole - 1);
_ui->loopClosure_bundle->setItemData(2, 0, Qt::UserRole - 1);
}
if(!Optimizer::isAvailable(Optimizer::kTypeCeres))
{
_ui->graphOptimization_type->setItemData(3, 0, Qt::UserRole - 1);
_ui->odom_f2m_bundleStrategy->setItemData(3, 0, Qt::UserRole - 1);
_ui->loopClosure_bundle->setItemData(3, 0, Qt::UserRole - 1);
}
#ifdef RTABMAP_VERTIGO
if(!Optimizer::isAvailable(Optimizer::kTypeG2O) && !Optimizer::isAvailable(Optimizer::kTypeGTSAM))
#endif
@@ -2943,6 +2949,13 @@ bool PreferencesDialog::validateForm()
"with cvsba. Bundle adjustment is disabled."));
_ui->loopClosure_bundle->setCurrentIndex(0);
}
if(_ui->loopClosure_bundle->currentIndex() == 3 && !Optimizer::isAvailable(Optimizer::kTypeCeres))
{
QMessageBox::warning(this, tr("Parameter warning"),
tr("Selected visual registration bundle adjustment optimization strategy (Ceres) is not available. RTAB-Map is not built "
"with cERES. Bundle adjustment is disabled."));
_ui->loopClosure_bundle->setCurrentIndex(0);
}
// Local bundle adjustment strategy for odometry F2M
if(_ui->odom_f2m_bundleStrategy->currentIndex() == 1 && !Optimizer::isAvailable(Optimizer::kTypeG2O))
@@ -2959,6 +2972,13 @@ bool PreferencesDialog::validateForm()
"with cvsba. Bundle adjustment is disabled."));
_ui->odom_f2m_bundleStrategy->setCurrentIndex(0);
}
if(_ui->odom_f2m_bundleStrategy->currentIndex() == 3 && !Optimizer::isAvailable(Optimizer::kTypeCeres))
{
QMessageBox::warning(this, tr("Parameter warning"),
tr("Selected odometry local bundle adjustment optimization strategy (Ceres) is not available. RTAB-Map is not built "
"with Ceres. Bundle adjustment is disabled."));
_ui->odom_f2m_bundleStrategy->setCurrentIndex(0);
}
// verify that Robust and Reject threshold are not set at the same time
if(_ui->graphOptimization_robust->isChecked() && _ui->graphOptimization_maxError->value()>0.0)