mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-11 04:19:50 +08:00
Added parameter "RGBD/OptimizeRobust" (default true) to use Vertigo robust graph optimization (only for g2o and GTSAM optimization strategies). Added GTSAM support.
This commit is contained in:
@@ -61,6 +61,7 @@ AboutDialog::AboutDialog(QWidget * parent) :
|
||||
_ui->label_flycapture2->setText(CameraStereoFlyCapture2::available()?"Yes":"No");
|
||||
|
||||
_ui->label_g2o->setText(graph::G2OOptimizer::available()?"Yes":"No");
|
||||
_ui->label_gtsam->setText(graph::GTSAMOptimizer::available()?"Yes":"No");
|
||||
_ui->label_cvsba->setText(graph::CVSBAOptimizer::available()?"Yes":"No");
|
||||
|
||||
}
|
||||
|
||||
@@ -127,6 +127,19 @@ DatabaseViewer::DatabaseViewer(QWidget * parent) :
|
||||
ui_->comboBox_graphOptimizer->setCurrentIndex(0);
|
||||
}
|
||||
}
|
||||
if(!graph::GTSAMOptimizer::available())
|
||||
{
|
||||
ui_->comboBox_graphOptimizer->setItemData(1, 0, Qt::UserRole - 1);
|
||||
if(ui_->comboBox_graphOptimizer->currentIndex() == 2)
|
||||
{
|
||||
UWARN("GTSAM is not available, setting optimization default to TORO.");
|
||||
ui_->comboBox_graphOptimizer->setCurrentIndex(0);
|
||||
}
|
||||
}
|
||||
if(!graph::G2OOptimizer::available() && !graph::GTSAMOptimizer::available())
|
||||
{
|
||||
ui_->checkBox_robust->setEnabled(false);
|
||||
}
|
||||
|
||||
ui_->menuView->addAction(ui_->dockWidget_constraints->toggleViewAction());
|
||||
ui_->menuView->addAction(ui_->dockWidget_graphView->toggleViewAction());
|
||||
@@ -146,6 +159,8 @@ DatabaseViewer::DatabaseViewer(QWidget * parent) :
|
||||
connect(ui_->actionGenerate_graph_dot, SIGNAL(triggered()), this, SLOT(generateGraph()));
|
||||
connect(ui_->actionGenerate_local_graph_dot, SIGNAL(triggered()), this, SLOT(generateLocalGraph()));
|
||||
connect(ui_->actionGenerate_TORO_graph_graph, SIGNAL(triggered()), this, SLOT(generateTOROGraph()));
|
||||
connect(ui_->actionGenerate_g2o_graph_g2o, SIGNAL(triggered()), this, SLOT(generateG2OGraph()));
|
||||
ui_->actionGenerate_g2o_graph_g2o->setEnabled(graph::G2OOptimizer::available());
|
||||
connect(ui_->actionView_3D_map, SIGNAL(triggered()), this, SLOT(view3DMap()));
|
||||
connect(ui_->actionGenerate_3D_map_pcd, SIGNAL(triggered()), this, SLOT(generate3DMap()));
|
||||
connect(ui_->actionDetect_more_loop_closures, SIGNAL(triggered()), this, SLOT(detectMoreLoopClosures()));
|
||||
@@ -168,6 +183,7 @@ DatabaseViewer::DatabaseViewer(QWidget * parent) :
|
||||
ui_->pushButton_reject->setEnabled(false);
|
||||
|
||||
ui_->actionGenerate_TORO_graph_graph->setEnabled(false);
|
||||
ui_->actionGenerate_g2o_graph_g2o->setEnabled(false);
|
||||
|
||||
ui_->horizontalSlider_A->setTracking(false);
|
||||
ui_->horizontalSlider_B->setTracking(false);
|
||||
@@ -198,6 +214,7 @@ DatabaseViewer::DatabaseViewer(QWidget * parent) :
|
||||
connect(ui_->spinBox_iterations, SIGNAL(editingFinished()), this, SLOT(updateGraphView()));
|
||||
connect(ui_->spinBox_optimizationsFrom, SIGNAL(editingFinished()), this, SLOT(updateGraphView()));
|
||||
connect(ui_->checkBox_spanAllMaps, SIGNAL(stateChanged(int)), this, SLOT(updateGraphView()));
|
||||
connect(ui_->checkBox_robust, SIGNAL(stateChanged(int)), this, SLOT(updateGraphView()));
|
||||
connect(ui_->checkBox_ignoreCovariance, SIGNAL(stateChanged(int)), this, SLOT(updateGraphView()));
|
||||
connect(ui_->checkBox_ignorePoseCorrection, SIGNAL(stateChanged(int)), this, SLOT(updateGraphView()));
|
||||
connect(ui_->checkBox_ignoreGlobalLoop, SIGNAL(stateChanged(int)), this, SLOT(updateGraphView()));
|
||||
@@ -239,6 +256,7 @@ DatabaseViewer::DatabaseViewer(QWidget * parent) :
|
||||
// Graph view
|
||||
connect(ui_->spinBox_iterations, SIGNAL(valueChanged(int)), this, SLOT(configModified()));
|
||||
connect(ui_->checkBox_spanAllMaps, SIGNAL(stateChanged(int)), this, SLOT(configModified()));
|
||||
connect(ui_->checkBox_robust, SIGNAL(stateChanged(int)), this, SLOT(configModified()));
|
||||
connect(ui_->checkBox_ignoreCovariance, SIGNAL(stateChanged(int)), this, SLOT(configModified()));
|
||||
connect(ui_->checkBox_ignorePoseCorrection, SIGNAL(stateChanged(int)), this, SLOT(configModified()));
|
||||
connect(ui_->checkBox_ignoreGlobalLoop, SIGNAL(stateChanged(int)), this, SLOT(configModified()));
|
||||
@@ -358,6 +376,7 @@ void DatabaseViewer::readSettings()
|
||||
settings.beginGroup("optimization");
|
||||
ui_->spinBox_iterations->setValue(settings.value("iterations", ui_->spinBox_iterations->value()).toInt());
|
||||
ui_->checkBox_spanAllMaps->setChecked(settings.value("spanToAllMaps", ui_->checkBox_spanAllMaps->isChecked()).toBool());
|
||||
ui_->checkBox_robust->setChecked(settings.value("robust", ui_->checkBox_robust->isChecked()).toBool());
|
||||
ui_->checkBox_ignoreCovariance->setChecked(settings.value("ignoreCovariance", ui_->checkBox_ignoreCovariance->isChecked()).toBool());
|
||||
ui_->checkBox_ignorePoseCorrection->setChecked(settings.value("ignorePoseCorrection", ui_->checkBox_ignorePoseCorrection->isChecked()).toBool());
|
||||
ui_->checkBox_ignoreGlobalLoop->setChecked(settings.value("ignoreGlobalLoop", ui_->checkBox_ignoreGlobalLoop->isChecked()).toBool());
|
||||
@@ -451,6 +470,7 @@ void DatabaseViewer::writeSettings()
|
||||
settings.beginGroup("optimization");
|
||||
settings.setValue("iterations", ui_->spinBox_iterations->value());
|
||||
settings.setValue("spanToAllMaps", ui_->checkBox_spanAllMaps->isChecked());
|
||||
settings.setValue("robust", ui_->checkBox_robust->isChecked());
|
||||
settings.setValue("ignoreCovariance", ui_->checkBox_ignoreCovariance->isChecked());
|
||||
settings.setValue("ignorePoseCorrection", ui_->checkBox_ignorePoseCorrection->isChecked());
|
||||
settings.setValue("ignoreGlobalLoop", ui_->checkBox_ignoreGlobalLoop->isChecked());
|
||||
@@ -556,7 +576,9 @@ bool DatabaseViewer::openDatabase(const QString & path)
|
||||
linksRefined_.clear();
|
||||
linksRemoved_.clear();
|
||||
localMaps_.clear();
|
||||
ui_->graphViewer->clearAll();
|
||||
ui_->actionGenerate_TORO_graph_graph->setEnabled(false);
|
||||
ui_->actionGenerate_g2o_graph_g2o->setEnabled(false);
|
||||
ui_->checkBox_showOptimized->setEnabled(false);
|
||||
databaseFileName_.clear();
|
||||
}
|
||||
@@ -1057,6 +1079,7 @@ void DatabaseViewer::updateIds()
|
||||
}
|
||||
|
||||
ui_->actionGenerate_TORO_graph_graph->setEnabled(false);
|
||||
ui_->actionGenerate_g2o_graph_g2o->setEnabled(false);
|
||||
graphes_.clear();
|
||||
graphLinks_.clear();
|
||||
neighborLinks_.clear();
|
||||
@@ -1193,7 +1216,51 @@ void DatabaseViewer::generateTOROGraph()
|
||||
QString path = QFileDialog::getSaveFileName(this, tr("Save File"), pathDatabase_+"/constraints" + QString::number(id) + ".graph", tr("TORO file (*.graph)"));
|
||||
if(!path.isEmpty())
|
||||
{
|
||||
graph::TOROOptimizer::saveGraph(path.toStdString(), uValueAt(graphes_, id), graphLinks_);
|
||||
if(ui_->checkBox_ignoreCovariance->isChecked())
|
||||
{
|
||||
std::multimap<int, rtabmap::Link> links = graphLinks_;
|
||||
for(std::multimap<int, rtabmap::Link>::iterator iter=links.begin(); iter!=links.end(); ++iter)
|
||||
{
|
||||
iter->second.setInfMatrix(cv::Mat::eye(6,6,CV_64FC1));
|
||||
}
|
||||
graph::TOROOptimizer::saveGraph(path.toStdString(), uValueAt(graphes_, id), links);
|
||||
}
|
||||
else
|
||||
{
|
||||
graph::TOROOptimizer::saveGraph(path.toStdString(), uValueAt(graphes_, id), graphLinks_);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DatabaseViewer::generateG2OGraph()
|
||||
{
|
||||
if(!graphes_.size() || !graphLinks_.size())
|
||||
{
|
||||
QMessageBox::warning(this, tr("Cannot generate a g2o graph"), tr("No poses or no links..."));
|
||||
return;
|
||||
}
|
||||
bool ok = false;
|
||||
int id = QInputDialog::getInt(this, tr("Which iteration?"), tr("Iteration (0 -> %1)").arg((int)graphes_.size()-1), (int)graphes_.size()-1, 0, (int)graphes_.size()-1, 1, &ok);
|
||||
|
||||
if(ok)
|
||||
{
|
||||
QString path = QFileDialog::getSaveFileName(this, tr("Save File"), pathDatabase_+"/constraints" + QString::number(id) + ".g2o", tr("g2o file (*.g2o)"));
|
||||
if(!path.isEmpty())
|
||||
{
|
||||
if(ui_->checkBox_ignoreCovariance->isChecked())
|
||||
{
|
||||
std::multimap<int, rtabmap::Link> links = graphLinks_;
|
||||
for(std::multimap<int, rtabmap::Link>::iterator iter=links.begin(); iter!=links.end(); ++iter)
|
||||
{
|
||||
iter->second.setInfMatrix(cv::Mat::eye(6,6,CV_64FC1));
|
||||
}
|
||||
graph::G2OOptimizer::saveGraph(path.toStdString(), uValueAt(graphes_, id), links, ui_->checkBox_robust->isChecked());
|
||||
}
|
||||
else
|
||||
{
|
||||
graph::G2OOptimizer::saveGraph(path.toStdString(), uValueAt(graphes_, id), graphLinks_, ui_->checkBox_robust->isChecked());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2604,6 +2671,7 @@ void DatabaseViewer::updateGraphView()
|
||||
graphes_.push_back(poses);
|
||||
|
||||
ui_->actionGenerate_TORO_graph_graph->setEnabled(true);
|
||||
ui_->actionGenerate_g2o_graph_g2o->setEnabled(true);
|
||||
std::multimap<int, rtabmap::Link> links = links_;
|
||||
|
||||
// filter current map if not spanning to all maps
|
||||
@@ -2697,13 +2765,32 @@ void DatabaseViewer::updateGraphView()
|
||||
ui_->label_loopClosures->setText(tr("(%1, %2, %3, %4)").arg(totalGlobal).arg(totalLocalSpace).arg(totalLocalTime).arg(totalUser));
|
||||
|
||||
graph::Optimizer * optimizer = 0;
|
||||
if(ui_->comboBox_graphOptimizer->currentIndex() == graph::Optimizer::kTypeG2O)
|
||||
if(ui_->comboBox_graphOptimizer->currentIndex() == graph::Optimizer::kTypeGTSAM)
|
||||
{
|
||||
optimizer = new graph::G2OOptimizer(ui_->spinBox_iterations->value(), ui_->checkBox_2dslam->isChecked(), ui_->checkBox_ignoreCovariance->isChecked());
|
||||
optimizer = new graph::GTSAMOptimizer(
|
||||
ui_->spinBox_iterations->value(),
|
||||
ui_->checkBox_2dslam->isChecked(),
|
||||
ui_->checkBox_ignoreCovariance->isChecked(),
|
||||
0.0,
|
||||
ui_->checkBox_robust->isChecked());
|
||||
}
|
||||
else if(ui_->comboBox_graphOptimizer->currentIndex() == graph::Optimizer::kTypeG2O)
|
||||
{
|
||||
UINFO("ui_->checkBox_robust->isChecked()=%d", ui_->checkBox_robust->isChecked()?1:0);
|
||||
optimizer = new graph::G2OOptimizer(
|
||||
ui_->spinBox_iterations->value(),
|
||||
ui_->checkBox_2dslam->isChecked(),
|
||||
ui_->checkBox_ignoreCovariance->isChecked(),
|
||||
0.0,
|
||||
ui_->checkBox_robust->isChecked());
|
||||
}
|
||||
else
|
||||
{
|
||||
optimizer = new graph::TOROOptimizer(ui_->spinBox_iterations->value(), ui_->checkBox_2dslam->isChecked(), ui_->checkBox_ignoreCovariance->isChecked());
|
||||
optimizer = new graph::TOROOptimizer(
|
||||
ui_->spinBox_iterations->value(),
|
||||
ui_->checkBox_2dslam->isChecked(),
|
||||
ui_->checkBox_ignoreCovariance->isChecked(),
|
||||
0.0);
|
||||
}
|
||||
std::map<int, rtabmap::Transform> posesOut;
|
||||
std::multimap<int, rtabmap::Link> linksOut;
|
||||
@@ -2723,6 +2810,10 @@ void DatabaseViewer::updateGraphView()
|
||||
graphLinks_ = linksOut;
|
||||
ui_->label_nodes->setNum((int)finalPoses.size());
|
||||
delete optimizer;
|
||||
if(posesOut.size() && finalPoses.empty())
|
||||
{
|
||||
QMessageBox::warning(this, tr("Graph optimization error!"), tr("Graph optimization has failed. See the terminal for potential errors."));
|
||||
}
|
||||
}
|
||||
if(graphes_.size())
|
||||
{
|
||||
@@ -3006,7 +3097,7 @@ void DatabaseViewer::refineConstraint(int from, int to, bool silent, bool update
|
||||
}
|
||||
if(!updated)
|
||||
{
|
||||
linksRefined_.insert(std::make_pair<int, Link>(newLink.from(), newLink));
|
||||
linksRefined_.insert(std::make_pair(newLink.from(), newLink));
|
||||
|
||||
if(updateGraph)
|
||||
{
|
||||
@@ -3129,7 +3220,7 @@ void DatabaseViewer::refineConstraintVisually(int from, int to, bool silent, boo
|
||||
}
|
||||
if(!updated)
|
||||
{
|
||||
linksRefined_.insert(std::make_pair<int, Link>(newLink.from(), newLink));
|
||||
linksRefined_.insert(std::make_pair(newLink.from(), newLink));
|
||||
|
||||
if(updateGraph)
|
||||
{
|
||||
|
||||
@@ -308,6 +308,8 @@ MainWindow::MainWindow(PreferencesDialog * prefDialog, QWidget * parent) :
|
||||
connect(_ui->actionRGBD_SLAM_format_txt, SIGNAL(triggered()), this , SLOT(exportPosesRGBDSLAM()));
|
||||
connect(_ui->actionKITTI_format_txt, SIGNAL(triggered()), this , SLOT(exportPosesKITTI()));
|
||||
connect(_ui->actionTORO_graph, SIGNAL(triggered()), this , SLOT(exportPosesTORO()));
|
||||
connect(_ui->actionG2o_g2o, SIGNAL(triggered()), this , SLOT(exportPosesG2O()));
|
||||
_ui->actionG2o_g2o->setVisible(graph::G2OOptimizer::available());
|
||||
connect(_ui->actionDelete_memory, SIGNAL(triggered()), this , SLOT(deleteMemory()));
|
||||
connect(_ui->actionDownload_all_clouds, SIGNAL(triggered()), this , SLOT(downloadAllClouds()));
|
||||
connect(_ui->actionDownload_graph, SIGNAL(triggered()), this , SLOT(downloadPoseGraph()));
|
||||
@@ -3178,6 +3180,10 @@ void MainWindow::exportPosesTORO()
|
||||
{
|
||||
exportPoses(3);
|
||||
}
|
||||
void MainWindow::exportPosesG2O()
|
||||
{
|
||||
exportPoses(4);
|
||||
}
|
||||
|
||||
void MainWindow::exportPoses(int format)
|
||||
{
|
||||
@@ -3215,14 +3221,14 @@ void MainWindow::exportPoses(int format)
|
||||
|
||||
if(_exportPosesFileName[format].isEmpty())
|
||||
{
|
||||
_exportPosesFileName[format] = _preferencesDialog->getWorkingDirectory() + QDir::separator() + (format==3?"toro.graph":"poses.txt");
|
||||
_exportPosesFileName[format] = _preferencesDialog->getWorkingDirectory() + QDir::separator() + (format==3?"toro.graph":format==4?"poses.g2o":"poses.txt");
|
||||
}
|
||||
|
||||
QString path = QFileDialog::getSaveFileName(
|
||||
this,
|
||||
tr("Save File"),
|
||||
_exportPosesFileName[format],
|
||||
format == 3?tr("TORO file (*.graph)"):tr("Text file (*.txt)"));
|
||||
format == 3?tr("TORO file (*.graph)"):format==4?tr("g2o file (*.g2o)"):tr("Text file (*.txt)"));
|
||||
|
||||
if(!path.isEmpty())
|
||||
{
|
||||
@@ -3233,7 +3239,7 @@ void MainWindow::exportPoses(int format)
|
||||
_ui->dockWidget_console->show();
|
||||
_ui->widget_console->appendMsg(
|
||||
QString("%1 saved (global=%2, optimized=%3)... %4")
|
||||
.arg(format == 3?"TORO graph":"Poses")
|
||||
.arg(format == 3?"TORO graph":format == 4?"g2o graph":"Poses")
|
||||
.arg(global?"true":"false")
|
||||
.arg(optimized?"true":"false")
|
||||
.arg(_exportPosesFileName[format]));
|
||||
|
||||
@@ -176,6 +176,14 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
{
|
||||
_ui->graphOptimization_type->setItemData(1, 0, Qt::UserRole - 1);
|
||||
}
|
||||
if(!graph::GTSAMOptimizer::available())
|
||||
{
|
||||
_ui->graphOptimization_type->setItemData(2, 0, Qt::UserRole - 1);
|
||||
}
|
||||
if(!graph::G2OOptimizer::available() && !graph::GTSAMOptimizer::available())
|
||||
{
|
||||
_ui->graphOptimization_robust->setEnabled(false);
|
||||
}
|
||||
if(!CameraOpenni::available())
|
||||
{
|
||||
_ui->comboBox_cameraRGBD->setItemData(0, 0, Qt::UserRole - 1);
|
||||
@@ -571,6 +579,7 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
_ui->graphOptimization_covarianceIgnored->setObjectName(Parameters::kRGBDOptimizeVarianceIgnored().c_str());
|
||||
_ui->graphOptimization_fromGraphEnd->setObjectName(Parameters::kRGBDOptimizeFromGraphEnd().c_str());
|
||||
_ui->graphOptimization_stopEpsilon->setObjectName(Parameters::kRGBDOptimizeEpsilon().c_str());
|
||||
_ui->graphOptimization_robust->setObjectName(Parameters::kRGBDOptimizeRobust().c_str());
|
||||
|
||||
_ui->graphPlan_goalReachedRadius->setObjectName(Parameters::kRGBDGoalReachedRadius().c_str());
|
||||
_ui->graphPlan_planWithNearNodesLinked->setObjectName(Parameters::kRGBDPlanVirtualLinks().c_str());
|
||||
@@ -1854,7 +1863,7 @@ bool PreferencesDialog::validateForm()
|
||||
// optimization strategy
|
||||
if(!graph::G2OOptimizer::available())
|
||||
{
|
||||
if(_ui->graphOptimization_type->currentIndex() > 0)
|
||||
if(_ui->graphOptimization_type->currentIndex() == 1)
|
||||
{
|
||||
QMessageBox::warning(this, tr("Parameter warning"),
|
||||
tr("Selected graph optimization strategy (g2o) is not available. RTAB-Map is not built "
|
||||
@@ -1862,6 +1871,16 @@ bool PreferencesDialog::validateForm()
|
||||
_ui->graphOptimization_type->setCurrentIndex(graph::Optimizer::kTypeTORO);
|
||||
}
|
||||
}
|
||||
if(!graph::GTSAMOptimizer::available())
|
||||
{
|
||||
if(_ui->graphOptimization_type->currentIndex() == 2)
|
||||
{
|
||||
QMessageBox::warning(this, tr("Parameter warning"),
|
||||
tr("Selected graph optimization strategy (GTSAM) is not available. RTAB-Map is not built "
|
||||
"with GTSAM. TORO is set instead for graph optimization strategy."));
|
||||
_ui->graphOptimization_type->setCurrentIndex(graph::Optimizer::kTypeTORO);
|
||||
}
|
||||
}
|
||||
|
||||
//verify binary features and nearest neighbor
|
||||
// BOW dictionary type
|
||||
@@ -2487,6 +2506,17 @@ void PreferencesDialog::setParameter(const std::string & key, const std::string
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
if(!graph::GTSAMOptimizer::available())
|
||||
{
|
||||
if(valueInt==2 && combo->objectName().toStdString().compare(Parameters::kRGBDOptimizeStrategy()) == 0)
|
||||
{
|
||||
UWARN("Trying to set \"%s\" to GTSAM but RTAB-Map isn't built "
|
||||
"with GTSAM. Keeping default combo value: %s.",
|
||||
combo->objectName().toStdString().c_str(),
|
||||
combo->currentText().toStdString().c_str());
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
if(ok)
|
||||
{
|
||||
combo->setCurrentIndex(valueInt);
|
||||
@@ -2650,6 +2680,22 @@ void PreferencesDialog::addParameter(const QObject * object, int value)
|
||||
this->addParameters(_ui->groupBox_loopClosure_icp2);
|
||||
}
|
||||
}
|
||||
else if(comboBox == _ui->loopClosure_estimationType)
|
||||
{
|
||||
this->addParameters(_ui->stackedWidget_loopClosureEstimation, _ui->loopClosure_estimationType->currentIndex());
|
||||
}
|
||||
else if(comboBox == _ui->odom_estimationType)
|
||||
{
|
||||
this->addParameters(_ui->stackedWidget_odomEstimation, _ui->stackedWidget_odomEstimation->currentIndex());
|
||||
}
|
||||
else if(comboBox == _ui->graphOptimization_type)
|
||||
{
|
||||
this->addParameter(_ui->graphOptimization_iterations, _ui->graphOptimization_iterations->value());
|
||||
this->addParameter(_ui->graphOptimization_covarianceIgnored, _ui->graphOptimization_covarianceIgnored->isChecked());
|
||||
this->addParameter(_ui->graphOptimization_slam2d, _ui->graphOptimization_slam2d->isChecked());
|
||||
this->addParameter(_ui->graphOptimization_stopEpsilon, _ui->graphOptimization_stopEpsilon->value());
|
||||
this->addParameter(_ui->graphOptimization_robust, _ui->graphOptimization_robust->isChecked());
|
||||
}
|
||||
}
|
||||
// Add parameter
|
||||
_parameters.insert(rtabmap::ParametersPair(object->objectName().toStdString(), QString::number(value).toStdString()));
|
||||
@@ -2816,13 +2862,22 @@ void PreferencesDialog::addParameters(const QObjectList & children)
|
||||
}
|
||||
}
|
||||
|
||||
void PreferencesDialog::addParameters(const QStackedWidget * stackedWidget)
|
||||
void PreferencesDialog::addParameters(const QStackedWidget * stackedWidget, int panel)
|
||||
{
|
||||
if(stackedWidget)
|
||||
{
|
||||
for(int i=0; i<stackedWidget->count(); ++i)
|
||||
if(panel == -1)
|
||||
{
|
||||
const QObjectList & children = stackedWidget->widget(i)->children();
|
||||
for(int i=0; i<stackedWidget->count(); ++i)
|
||||
{
|
||||
const QObjectList & children = stackedWidget->widget(i)->children();
|
||||
addParameters(children);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UASSERT(panel<stackedWidget->count());
|
||||
const QObjectList & children = stackedWidget->widget(panel)->children();
|
||||
addParameters(children);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,8 +50,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>154</width>
|
||||
<height>184</height>
|
||||
<width>175</width>
|
||||
<height>173</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1">
|
||||
@@ -236,8 +236,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>154</width>
|
||||
<height>184</height>
|
||||
<width>174</width>
|
||||
<height>173</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,1">
|
||||
@@ -418,7 +418,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1285</width>
|
||||
<height>22</height>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFile">
|
||||
@@ -441,6 +441,7 @@
|
||||
<addaction name="actionGenerate_graph_dot"/>
|
||||
<addaction name="actionGenerate_local_graph_dot"/>
|
||||
<addaction name="actionGenerate_TORO_graph_graph"/>
|
||||
<addaction name="actionGenerate_g2o_graph_g2o"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionDetect_more_loop_closures"/>
|
||||
<addaction name="actionVisual_Refine_all_neighbor_links"/>
|
||||
@@ -828,15 +829,15 @@
|
||||
<item>
|
||||
<widget class="QToolBox" name="toolBox">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>312</width>
|
||||
<height>314</height>
|
||||
<width>314</width>
|
||||
<height>303</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
@@ -1055,8 +1056,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>366</width>
|
||||
<height>361</height>
|
||||
<width>351</width>
|
||||
<height>347</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
@@ -1344,9 +1345,9 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>330</width>
|
||||
<height>304</height>
|
||||
<y>-26</y>
|
||||
<width>333</width>
|
||||
<height>333</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
@@ -1363,14 +1364,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<item row="7" column="2">
|
||||
<widget class="QLabel" name="label_48">
|
||||
<property name="text">
|
||||
<string>Ignore global loop closures</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<item row="10" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_ignoreUserLoop">
|
||||
<property name="text">
|
||||
<string/>
|
||||
@@ -1419,14 +1420,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<item row="6" column="2">
|
||||
<widget class="QLabel" name="label_35">
|
||||
<property name="text">
|
||||
<string>Ignore pose correction</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<item row="7" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_ignoreGlobalLoop">
|
||||
<property name="text">
|
||||
<string/>
|
||||
@@ -1436,7 +1437,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<item row="6" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_ignorePoseCorrection">
|
||||
<property name="text">
|
||||
<string/>
|
||||
@@ -1446,7 +1447,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<item row="9" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_ignoreLocalLoopTime">
|
||||
<property name="text">
|
||||
<string/>
|
||||
@@ -1456,6 +1457,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QComboBox" name="comboBox_graphOptimizer">
|
||||
<property name="sizeAdjustPolicy">
|
||||
@@ -1471,6 +1485,11 @@
|
||||
<string>g2o</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>GTSAM</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
@@ -1480,34 +1499,21 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="2">
|
||||
<item row="10" column="2">
|
||||
<widget class="QLabel" name="label_50">
|
||||
<property name="text">
|
||||
<string>Ignore user loop closures</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<item row="8" column="2">
|
||||
<widget class="QLabel" name="label_47">
|
||||
<property name="text">
|
||||
<string>Ignore local loop closures (space)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<item row="8" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_ignoreLocalLoopSpace">
|
||||
<property name="text">
|
||||
<string/>
|
||||
@@ -1517,7 +1523,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="2">
|
||||
<item row="9" column="2">
|
||||
<widget class="QLabel" name="label_49">
|
||||
<property name="text">
|
||||
<string>Ignore local loop closures (time)</string>
|
||||
@@ -1531,7 +1537,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_ignoreCovariance">
|
||||
<property name="text">
|
||||
<string/>
|
||||
@@ -1548,13 +1554,30 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<item row="5" column="2">
|
||||
<widget class="QLabel" name="label_34">
|
||||
<property name="text">
|
||||
<string>Ignore covariance</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QLabel" name="label_63">
|
||||
<property name="text">
|
||||
<string>Robust optimization</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_robust">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_4">
|
||||
@@ -1562,8 +1585,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>248</width>
|
||||
<height>319</height>
|
||||
<width>243</width>
|
||||
<height>284</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
@@ -1757,7 +1780,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>201</width>
|
||||
<height>126</height>
|
||||
<height>117</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
@@ -1856,8 +1879,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>283</width>
|
||||
<height>322</height>
|
||||
<width>285</width>
|
||||
<height>309</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
@@ -2301,6 +2324,11 @@
|
||||
<string>Reset all changes</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionGenerate_g2o_graph_g2o">
|
||||
<property name="text">
|
||||
<string>Generate g2o graph (*.g2o)...</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
||||
@@ -82,6 +82,13 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1">
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>With Freenect :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
@@ -205,13 +212,6 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>With Freenect :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="0">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
@@ -293,14 +293,14 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="16" column="0">
|
||||
<item row="17" column="0">
|
||||
<widget class="QLabel" name="label_18">
|
||||
<property name="text">
|
||||
<string>With cvsba :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="16" column="1">
|
||||
<item row="17" column="1">
|
||||
<widget class="QLabel" name="label_cvsba">
|
||||
<property name="text">
|
||||
<string/>
|
||||
@@ -310,6 +310,23 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="16" column="0">
|
||||
<widget class="QLabel" name="label_19">
|
||||
<property name="text">
|
||||
<string>With GTSAM :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="16" column="1">
|
||||
<widget class="QLabel" name="label_gtsam">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1012</width>
|
||||
<height>22</height>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFile">
|
||||
@@ -64,6 +64,7 @@
|
||||
<addaction name="actionRGBD_SLAM_format_txt"/>
|
||||
<addaction name="actionKITTI_format_txt"/>
|
||||
<addaction name="actionTORO_graph"/>
|
||||
<addaction name="actionG2o_g2o"/>
|
||||
</widget>
|
||||
<addaction name="actionOpen_working_directory"/>
|
||||
<addaction name="actionDump_the_memory"/>
|
||||
@@ -1259,6 +1260,11 @@
|
||||
<string>Raw format (*.txt)</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionG2o_g2o">
|
||||
<property name="text">
|
||||
<string>g2o (*.g2o)</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
||||
@@ -64,8 +64,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-392</y>
|
||||
<width>755</width>
|
||||
<height>1591</height>
|
||||
<width>760</width>
|
||||
<height>1570</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_16">
|
||||
@@ -86,7 +86,7 @@
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>3</number>
|
||||
<number>19</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_22">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_29">
|
||||
@@ -6553,6 +6553,11 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
|
||||
<string>g2o</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>GTSAM</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
@@ -6575,14 +6580,14 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<item row="7" column="0">
|
||||
<widget class="QCheckBox" name="graphOptimization_fromGraphEnd">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<item row="7" column="1">
|
||||
<widget class="QLabel" name="label_151">
|
||||
<property name="text">
|
||||
<string>Optimize graph from the newest node.</string>
|
||||
@@ -6595,7 +6600,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="6" column="1">
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@@ -6632,7 +6637,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<item row="9" column="1">
|
||||
<widget class="QLabel" name="label_183">
|
||||
<property name="text">
|
||||
<string>-If false, the graph is optimized from the oldest node of the current graph. It can be useful to preserve the map referential from the oldest node. An odometry correction between frames /map to /odom is computed. Warning: when some nodes are transferred, the first referential of the local map may change, resulting in momentary changes in robot/map position (which are annoying in teleoperation).</string>
|
||||
@@ -6645,7 +6650,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<item row="8" column="1">
|
||||
<widget class="QLabel" name="label_211">
|
||||
<property name="text">
|
||||
<string>-If true, there is no odometry correction computed. All previous poses in the map are corrected instead, not the last one (which corresponds to latest odometry value). So, the transform between frames /map to /odom will be always Identity even on loop closures.</string>
|
||||
@@ -6710,6 +6715,26 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="graphOptimization_robust">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="label_258">
|
||||
<property name="text">
|
||||
<string>Robust graph optimization using Vertigo (only for g2o and GTSAM optimization strategies). This approach can filter wrong loop closure detections.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user