From aeffd079f227c1ec3bfba90c70213a3508f86da0 Mon Sep 17 00:00:00 2001 From: Chuck-Ellison Date: Tue, 29 Oct 2024 11:41:12 -0500 Subject: [PATCH 1/2] created concise layout --- .../include/rtabmap/gui/PreferencesDialog.h | 1 + guilib/src/DatabaseViewer.cpp | 22 + guilib/src/PreferencesDialog.cpp | 8 + guilib/src/ui/DatabaseViewer.ui | 798 +++++++++--------- guilib/src/ui/preferencesDialog.ui | 23 + 5 files changed, 463 insertions(+), 389 deletions(-) diff --git a/guilib/include/rtabmap/gui/PreferencesDialog.h b/guilib/include/rtabmap/gui/PreferencesDialog.h index b5bb410497..6502e127cd 100644 --- a/guilib/include/rtabmap/gui/PreferencesDialog.h +++ b/guilib/include/rtabmap/gui/PreferencesDialog.h @@ -158,6 +158,7 @@ class RTABMAP_GUI_EXPORT PreferencesDialog : public QDialog bool getGeneralLoggerPrintThreadId() const; std::vector getGeneralLoggerThreads() const; bool isVerticalLayoutUsed() const; + bool isConciseLayoutUsed() const; bool imageRejectedShown() const; bool imageHighestHypShown() const; bool beepOnPause() const; diff --git a/guilib/src/DatabaseViewer.cpp b/guilib/src/DatabaseViewer.cpp index a9543b1f6a..ed93fa482b 100644 --- a/guilib/src/DatabaseViewer.cpp +++ b/guilib/src/DatabaseViewer.cpp @@ -443,6 +443,7 @@ DatabaseViewer::DatabaseViewer(const QString & ini, QWidget * parent) : connect(ui_->graphicsView_B, SIGNAL(configChanged()), this, SLOT(configModified())); connect(ui_->comboBox_logger_level, SIGNAL(currentIndexChanged(int)), this, SLOT(configModified())); connect(ui_->actionVertical_Layout, SIGNAL(toggled(bool)), this, SLOT(configModified())); + connect(ui_->actionConcise_Layout, SIGNAL(toggled(bool)), this, SLOT(configModified())); connect(ui_->checkBox_alignPosesWithGPS, SIGNAL(stateChanged(int)), this, SLOT(updateGraphView())); connect(ui_->checkBox_alignPosesWithGroundTruth, SIGNAL(stateChanged(int)), this, SLOT(updateGraphView())); connect(ui_->checkBox_alignScansCloudsWithGroundTruth, SIGNAL(stateChanged(int)), this, SLOT(updateGraphView())); @@ -543,6 +544,25 @@ void DatabaseViewer::showCloseButton(bool visible) void DatabaseViewer::configModified() { + if(ui_->actionConcise_Layout->isChecked()) + { + ui_->graphicsView_B->setVisible(false); + ui_->scrollArea->setVisible(false); + ui_->scrollArea_2->setVisible(false); + ui_->spinBox_indexB->setVisible(false); + ui_->widget_imageControls_B->setVisible(false); + ui_->widget_graphControl->setVisible(false); + } + else + { + ui_->graphicsView_B->setVisible(true); + ui_->scrollArea->setVisible(true); + ui_->scrollArea_2->setVisible(true); + ui_->spinBox_indexB->setVisible(true); + ui_->widget_imageControls_B->setVisible(true); + ui_->widget_graphControl->setVisible(true); + } + this->setWindowModified(true); } @@ -582,6 +602,7 @@ void DatabaseViewer::readSettings() ui_->comboBox_logger_level->setCurrentIndex(settings.value("loggerLevel", ui_->comboBox_logger_level->currentIndex()).toInt()); ui_->actionVertical_Layout->setChecked(settings.value("verticalLayout", ui_->actionVertical_Layout->isChecked()).toBool()); + ui_->actionConcise_Layout->setChecked(settings.value("conciseLayout", ui_->actionConcise_Layout->isChecked()).toBool()); ui_->checkBox_ignoreIntermediateNodes->setChecked(settings.value("ignoreIntermediateNodes", ui_->checkBox_ignoreIntermediateNodes->isChecked()).toBool()); ui_->checkBox_timeStats->setChecked(settings.value("timeStats", ui_->checkBox_timeStats->isChecked()).toBool()); @@ -672,6 +693,7 @@ void DatabaseViewer::writeSettings() settings.setValue("loggerLevel", ui_->comboBox_logger_level->currentIndex()); settings.setValue("verticalLayout", ui_->actionVertical_Layout->isChecked()); + settings.setValue("conciseLayout", ui_->actionConcise_Layout->isChecked()); settings.setValue("ignoreIntermediateNodes", ui_->checkBox_ignoreIntermediateNodes->isChecked()); settings.setValue("timeStats", ui_->checkBox_timeStats->isChecked()); diff --git a/guilib/src/PreferencesDialog.cpp b/guilib/src/PreferencesDialog.cpp index 39e606cbf6..5475dcab35 100644 --- a/guilib/src/PreferencesDialog.cpp +++ b/guilib/src/PreferencesDialog.cpp @@ -512,6 +512,7 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) : connect(_ui->general_checkBox_missing_cache_republished, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); connect(_ui->general_checkBox_cloudsKept, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); connect(_ui->checkBox_verticalLayoutUsed, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); + connect(_ui->checkBox_conciseLayoutUsed, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); connect(_ui->checkBox_imageRejectedShown, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); connect(_ui->checkBox_imageHighestHypShown, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); connect(_ui->checkBox_beep, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); @@ -1997,6 +1998,7 @@ void PreferencesDialog::resetSettings(QGroupBox * groupBox) _ui->checkBox_cacheStatistics->setChecked(true); _ui->checkBox_notifyWhenNewGlobalPathIsReceived->setChecked(false); _ui->checkBox_verticalLayoutUsed->setChecked(true); + _ui->checkBox_conciseLayoutUsed->setChecked(false); _ui->checkBox_imageRejectedShown->setChecked(true); _ui->checkBox_imageHighestHypShown->setChecked(false); _ui->spinBox_odomQualityWarnThr->setValue(50); @@ -2508,6 +2510,7 @@ void PreferencesDialog::readGuiSettings(const QString & filePath) _ui->checkBox_logger_printTime->setChecked(settings.value("loggerPrintTime", _ui->checkBox_logger_printTime->isChecked()).toBool()); _ui->checkBox_logger_printThreadId->setChecked(settings.value("loggerPrintThreadId", _ui->checkBox_logger_printThreadId->isChecked()).toBool()); _ui->checkBox_verticalLayoutUsed->setChecked(settings.value("verticalLayoutUsed", _ui->checkBox_verticalLayoutUsed->isChecked()).toBool()); + _ui->checkBox_conciseLayoutUsed->setChecked(settings.value("conciseLayoutUsed", _ui->checkBox_conciseLayoutUsed->isChecked()).toBool()); _ui->checkBox_imageRejectedShown->setChecked(settings.value("imageRejectedShown", _ui->checkBox_imageRejectedShown->isChecked()).toBool()); _ui->checkBox_imageHighestHypShown->setChecked(settings.value("imageHighestHypShown", _ui->checkBox_imageHighestHypShown->isChecked()).toBool()); _ui->checkBox_beep->setChecked(settings.value("beep", _ui->checkBox_beep->isChecked()).toBool()); @@ -3113,6 +3116,7 @@ void PreferencesDialog::writeGuiSettings(const QString & filePath) const settings.setValue("loggerPrintTime", _ui->checkBox_logger_printTime->isChecked()); settings.setValue("loggerPrintThreadId", _ui->checkBox_logger_printThreadId->isChecked()); settings.setValue("verticalLayoutUsed", _ui->checkBox_verticalLayoutUsed->isChecked()); + settings.setValue("conciseLayoutUsed", _ui->checkBox_conciseLayoutUsed->isChecked()); settings.setValue("imageRejectedShown", _ui->checkBox_imageRejectedShown->isChecked()); settings.setValue("imageHighestHypShown", _ui->checkBox_imageHighestHypShown->isChecked()); settings.setValue("beep", _ui->checkBox_beep->isChecked()); @@ -5799,6 +5803,10 @@ bool PreferencesDialog::isVerticalLayoutUsed() const { return _ui->checkBox_verticalLayoutUsed->isChecked(); } +bool PreferencesDialog::isConciseLayoutUsed() const +{ + return _ui->checkBox_conciseLayoutUsed->isChecked(); +} bool PreferencesDialog::imageRejectedShown() const { return _ui->checkBox_imageRejectedShown->isChecked(); diff --git a/guilib/src/ui/DatabaseViewer.ui b/guilib/src/ui/DatabaseViewer.ui index c968958d23..e75e73fd67 100644 --- a/guilib/src/ui/DatabaseViewer.ui +++ b/guilib/src/ui/DatabaseViewer.ui @@ -776,69 +776,71 @@ - - - 12 - - - 12 - - - 12 - - - 12 - - - + + + + 12 + + + 12 + + + 12 + + + 12 + - - - Index : - - + + + + + Index : + + + + + + + Id : + + + + - - - Id : - - + + + + + false + + + + + + + idB + + + + - - - - - - - false + + + Qt::ClickFocus - - - - - - idB + + Qt::Horizontal - + + QSlider::TicksAbove + + - - - - - - Qt::ClickFocus - - - Qt::Horizontal - - - QSlider::TicksAbove - - - - + + @@ -936,6 +938,7 @@ View + @@ -1221,348 +1224,354 @@ - Qt::Horizontal - - - - 0 - 20 - - - - - - - - - - - - Graph view - - - 1 - - - - - - - - - - - - 0.0 deg - - - - - - - Qt::ClickFocus - - - -1799 - - - 1800 - - - 0 - - - Qt::Horizontal - - - QSlider::TicksAbove - - - 100 - - - - - - - <html><head/><body><p>The rotation will be applied temporary to optimized global graph. To save it to database, do File-&gt;&quot;Regenerate optimized 2D map...&quot;.</p></body></html> - - - Apply Rotation - - - - - - - - - - - # - - - - - - - Qt::ClickFocus - - - Qt::Horizontal - - - QSlider::TicksAbove - - - - - - - QComboBox::AdjustToContents - - - - Global Iterative - - - - - Global Full - - - - - Local Optimized - - - - - - - - - - - - Align poses with ground truth - - - true - - - - - - - - - - false - - - - - - - - - Root - - - - - - - Span to all maps - - - true - - - - - - - WM - - - - - - - - - Time grid (s) - - - - - - - RMSE (m) - - - - - - - - - - true - - - - - - - - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - Align scans/clouds with ground truth - - - true - - - - - - - - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - <html><head/><body><p>N: Neighbor</p><p>NM: Neighbor Merged</p><p>G: Global</p><p>LS: Local by Space (Proximity)</p><p>LT: Local by Time (Proximity)</p><p>U: User</p><p>P: Prior</p><p>LM: Landmark</p><p>GR: Gravity</p></body></html> - - - Links (N, NM, G, LS, LT, U, P, LM, GR) - - - - - - - Path length (m) - - - - - - - Poses - - - - - - - - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - - - - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - Ignore intermediate nodes - - - true - - - - - - - Time optimization (s) - - - - - - - - - - true - - - - - - - Align poses with GPS - - - true - - - - - - - + Qt::Horizontal - - true + + + 0 + 20 + - + + + + Graph view + + + 1 + + + + + + + + + + + + + + + 0.0 deg + + + + + + + Qt::ClickFocus + + + -1799 + + + 1800 + + + 0 + + + Qt::Horizontal + + + QSlider::TicksAbove + + + 100 + + + + + + + <html><head/><body><p>The rotation will be applied temporary to optimized global graph. To save it to database, do File-&gt;&quot;Regenerate optimized 2D map...&quot;.</p></body></html> + + + Apply Rotation + + + + + + + + + + + # + + + + + + + Qt::ClickFocus + + + Qt::Horizontal + + + QSlider::TicksAbove + + + + + + + QComboBox::AdjustToContents + + + + Global Iterative + + + + + Global Full + + + + + Local Optimized + + + + + + + + + + + + Align poses with ground truth + + + true + + + + + + + + + + false + + + + + + + + + Root + + + + + + + Span to all maps + + + true + + + + + + + WM + + + + + + + + + Time grid (s) + + + + + + + RMSE (m) + + + + + + + + + + true + + + + + + + + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + + + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + + Align scans/clouds with ground truth + + + true + + + + + + + + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + + + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + + <html><head/><body><p>N: Neighbor</p><p>NM: Neighbor Merged</p><p>G: Global</p><p>LS: Local by Space (Proximity)</p><p>LT: Local by Time (Proximity)</p><p>U: User</p><p>P: Prior</p><p>LM: Landmark</p><p>GR: Gravity</p></body></html> + + + Links (N, NM, G, LS, LT, U, P, LM, GR) + + + + + + + Path length (m) + + + + + + + Poses + + + + + + + + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + + + + + + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + + Ignore intermediate nodes + + + true + + + + + + + Time optimization (s) + + + + + + + + + + true + + + + + + + Align poses with GPS + + + true + + + + + + + + + + true + + + + + + + + + + + false @@ -3272,6 +3281,17 @@ Vertical Layout + + + true + + + false + + + Concise Layout + + Restore default GUI settings diff --git a/guilib/src/ui/preferencesDialog.ui b/guilib/src/ui/preferencesDialog.ui index 8bf2e9c0a5..24a3665cf4 100644 --- a/guilib/src/ui/preferencesDialog.ui +++ b/guilib/src/ui/preferencesDialog.ui @@ -495,6 +495,29 @@ + + + + Concise layout. + + + false + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + + + + + true + + + From 5dbd9b6476b991479f588d6be34500c0c872c08a Mon Sep 17 00:00:00 2001 From: matlabbe Date: Sat, 16 Nov 2024 12:05:54 -0800 Subject: [PATCH 2/2] Hiding matching lines and always update graphics view A when clicking on a node in the graph in concise view mode --- .../include/rtabmap/gui/PreferencesDialog.h | 1 - guilib/src/DatabaseViewer.cpp | 10 ++++++-- guilib/src/PreferencesDialog.cpp | 8 ------- guilib/src/ui/preferencesDialog.ui | 23 ------------------- 4 files changed, 8 insertions(+), 34 deletions(-) diff --git a/guilib/include/rtabmap/gui/PreferencesDialog.h b/guilib/include/rtabmap/gui/PreferencesDialog.h index 6502e127cd..b5bb410497 100644 --- a/guilib/include/rtabmap/gui/PreferencesDialog.h +++ b/guilib/include/rtabmap/gui/PreferencesDialog.h @@ -158,7 +158,6 @@ class RTABMAP_GUI_EXPORT PreferencesDialog : public QDialog bool getGeneralLoggerPrintThreadId() const; std::vector getGeneralLoggerThreads() const; bool isVerticalLayoutUsed() const; - bool isConciseLayoutUsed() const; bool imageRejectedShown() const; bool imageHighestHypShown() const; bool beepOnPause() const; diff --git a/guilib/src/DatabaseViewer.cpp b/guilib/src/DatabaseViewer.cpp index 3288e85235..640bdc96de 100644 --- a/guilib/src/DatabaseViewer.cpp +++ b/guilib/src/DatabaseViewer.cpp @@ -552,6 +552,8 @@ void DatabaseViewer::configModified() ui_->spinBox_indexB->setVisible(false); ui_->widget_imageControls_B->setVisible(false); ui_->widget_graphControl->setVisible(false); + ui_->graphicsView_A->clearLines(); + ui_->graphicsView_B->clearLines(); } else { @@ -4595,11 +4597,11 @@ void DatabaseViewer::graphNodeSelected(int id) if(id>0 && idToIndex_.contains(id)) { static bool updateA = true; - if(updateA) + if(updateA || ui_->actionConcise_Layout->isChecked()) ui_->horizontalSlider_A->setValue(idToIndex_.value(id)); else ui_->horizontalSlider_B->setValue(idToIndex_.value(id)); - updateA = !updateA; + updateA = !updateA || ui_->actionConcise_Layout->isChecked(); } } @@ -5937,6 +5939,10 @@ void DatabaseViewer::updateStereo(const SensorData * data) void DatabaseViewer::updateWordsMatching(const std::vector & inliers) { + if(ui_->actionConcise_Layout->isChecked()) { + return; + } + int from = ids_.at(ui_->horizontalSlider_A->value()); int to = ids_.at(ui_->horizontalSlider_B->value()); if(from && to) diff --git a/guilib/src/PreferencesDialog.cpp b/guilib/src/PreferencesDialog.cpp index 5475dcab35..39e606cbf6 100644 --- a/guilib/src/PreferencesDialog.cpp +++ b/guilib/src/PreferencesDialog.cpp @@ -512,7 +512,6 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) : connect(_ui->general_checkBox_missing_cache_republished, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); connect(_ui->general_checkBox_cloudsKept, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); connect(_ui->checkBox_verticalLayoutUsed, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); - connect(_ui->checkBox_conciseLayoutUsed, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); connect(_ui->checkBox_imageRejectedShown, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); connect(_ui->checkBox_imageHighestHypShown, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); connect(_ui->checkBox_beep, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); @@ -1998,7 +1997,6 @@ void PreferencesDialog::resetSettings(QGroupBox * groupBox) _ui->checkBox_cacheStatistics->setChecked(true); _ui->checkBox_notifyWhenNewGlobalPathIsReceived->setChecked(false); _ui->checkBox_verticalLayoutUsed->setChecked(true); - _ui->checkBox_conciseLayoutUsed->setChecked(false); _ui->checkBox_imageRejectedShown->setChecked(true); _ui->checkBox_imageHighestHypShown->setChecked(false); _ui->spinBox_odomQualityWarnThr->setValue(50); @@ -2510,7 +2508,6 @@ void PreferencesDialog::readGuiSettings(const QString & filePath) _ui->checkBox_logger_printTime->setChecked(settings.value("loggerPrintTime", _ui->checkBox_logger_printTime->isChecked()).toBool()); _ui->checkBox_logger_printThreadId->setChecked(settings.value("loggerPrintThreadId", _ui->checkBox_logger_printThreadId->isChecked()).toBool()); _ui->checkBox_verticalLayoutUsed->setChecked(settings.value("verticalLayoutUsed", _ui->checkBox_verticalLayoutUsed->isChecked()).toBool()); - _ui->checkBox_conciseLayoutUsed->setChecked(settings.value("conciseLayoutUsed", _ui->checkBox_conciseLayoutUsed->isChecked()).toBool()); _ui->checkBox_imageRejectedShown->setChecked(settings.value("imageRejectedShown", _ui->checkBox_imageRejectedShown->isChecked()).toBool()); _ui->checkBox_imageHighestHypShown->setChecked(settings.value("imageHighestHypShown", _ui->checkBox_imageHighestHypShown->isChecked()).toBool()); _ui->checkBox_beep->setChecked(settings.value("beep", _ui->checkBox_beep->isChecked()).toBool()); @@ -3116,7 +3113,6 @@ void PreferencesDialog::writeGuiSettings(const QString & filePath) const settings.setValue("loggerPrintTime", _ui->checkBox_logger_printTime->isChecked()); settings.setValue("loggerPrintThreadId", _ui->checkBox_logger_printThreadId->isChecked()); settings.setValue("verticalLayoutUsed", _ui->checkBox_verticalLayoutUsed->isChecked()); - settings.setValue("conciseLayoutUsed", _ui->checkBox_conciseLayoutUsed->isChecked()); settings.setValue("imageRejectedShown", _ui->checkBox_imageRejectedShown->isChecked()); settings.setValue("imageHighestHypShown", _ui->checkBox_imageHighestHypShown->isChecked()); settings.setValue("beep", _ui->checkBox_beep->isChecked()); @@ -5803,10 +5799,6 @@ bool PreferencesDialog::isVerticalLayoutUsed() const { return _ui->checkBox_verticalLayoutUsed->isChecked(); } -bool PreferencesDialog::isConciseLayoutUsed() const -{ - return _ui->checkBox_conciseLayoutUsed->isChecked(); -} bool PreferencesDialog::imageRejectedShown() const { return _ui->checkBox_imageRejectedShown->isChecked(); diff --git a/guilib/src/ui/preferencesDialog.ui b/guilib/src/ui/preferencesDialog.ui index 24a3665cf4..8bf2e9c0a5 100644 --- a/guilib/src/ui/preferencesDialog.ui +++ b/guilib/src/ui/preferencesDialog.ui @@ -495,29 +495,6 @@ - - - - Concise layout. - - - false - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - - - true - - -