diff --git a/guilib/src/DatabaseViewer.cpp b/guilib/src/DatabaseViewer.cpp index aafe5801..a7e5c881 100644 --- a/guilib/src/DatabaseViewer.cpp +++ b/guilib/src/DatabaseViewer.cpp @@ -378,6 +378,7 @@ DatabaseViewer::DatabaseViewer(const QString & ini, QWidget * parent) : connect(ui_->checkBox_ignoreLocalLoopSpace, SIGNAL(stateChanged(int)), this, SLOT(updateGraphView())); connect(ui_->checkBox_ignoreLocalLoopTime, SIGNAL(stateChanged(int)), this, SLOT(updateGraphView())); connect(ui_->checkBox_ignoreUserLoop, SIGNAL(stateChanged(int)), this, SLOT(updateGraphView())); + connect(ui_->checkBox_ignoreLandmarks, SIGNAL(stateChanged(int)), this, SLOT(updateGraphView())); connect(ui_->doubleSpinBox_optimizationScale, SIGNAL(editingFinished()), this, SLOT(updateGraphView())); connect(ui_->checkBox_octomap, SIGNAL(stateChanged(int)), this, SLOT(updateGrid())); connect(ui_->checkBox_grid_2d, SIGNAL(stateChanged(int)), this, SLOT(updateGrid())); @@ -708,6 +709,7 @@ void DatabaseViewer::restoreDefaultSettings() ui_->checkBox_ignoreLocalLoopSpace->setChecked(false); ui_->checkBox_ignoreLocalLoopTime->setChecked(false); ui_->checkBox_ignoreUserLoop->setChecked(false); + ui_->checkBox_ignoreLandmarks->setChecked(false); ui_->doubleSpinBox_optimizationScale->setValue(1.0); ui_->doubleSpinBox_gainCompensationRadius->setValue(0.0); ui_->doubleSpinBox_voxelSize->setValue(0.0); @@ -5440,7 +5442,7 @@ void DatabaseViewer::updateConstraintView( link.type()==Link::kLocalSpaceClosure?"Space proximity link": link.type()==Link::kLocalTimeClosure?"Time proximity link": link.type()==Link::kUserClosure?"User link": - link.type()==Link::kLandmark?"Landmark link": + link.type()==Link::kLandmark?"Landmark "+QString::number(-link.to()): link.type()==Link::kVirtualClosure?"Virtual link": link.type()==Link::kGravity?"Gravity link":"Undefined")); ui_->label_variance->setText(QString("%1, %2") @@ -6569,6 +6571,11 @@ void DatabaseViewer::updateGraphView() } else if(iter->second.type() == Link::kLandmark) { + if(ui_->checkBox_ignoreLandmarks->isChecked()) + { + links.erase(iter++); + continue; + } UASSERT(iter->second.from() > 0 && iter->second.to() < 0); if(poses.find(iter->second.from()) != poses.end() && poses.find(iter->second.to()) == poses.end()) { diff --git a/guilib/src/ui/DatabaseViewer.ui b/guilib/src/ui/DatabaseViewer.ui index c8aa333b..f08dff45 100644 --- a/guilib/src/ui/DatabaseViewer.ui +++ b/guilib/src/ui/DatabaseViewer.ui @@ -61,7 +61,7 @@ 0 0 - 306 + 414 311 @@ -304,7 +304,7 @@ 0 0 - 306 + 413 311 @@ -1379,7 +1379,7 @@ - 1 + 0 @@ -1387,7 +1387,7 @@ 0 0 318 - 165 + 226 @@ -1455,7 +1455,7 @@ - + Qt::Vertical @@ -1518,6 +1518,23 @@ + + + + Ignore landmarks + + + + + + + + + + false + + + @@ -2079,8 +2096,8 @@ 0 0 - 226 - 160 + 312 + 226 @@ -2207,8 +2224,8 @@ 0 0 - 185 - 485 + 446 + 226