mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
DbViewer: added option to align scans/clouds to ground truth for convenience
This commit is contained in:
@@ -348,8 +348,8 @@ 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_->checkBox_alignPosesWithGroundTruth, SIGNAL(stateChanged(int)), this, SLOT(configModified()));
|
||||
connect(ui_->checkBox_alignPosesWithGroundTruth, SIGNAL(stateChanged(int)), this, SLOT(updateGraphView()));
|
||||
connect(ui_->checkBox_alignScansCloudsWithGroundTruth, SIGNAL(stateChanged(int)), this, SLOT(updateGraphView()));
|
||||
connect(ui_->checkBox_ignoreIntermediateNodes, SIGNAL(stateChanged(int)), this, SLOT(configModified()));
|
||||
connect(ui_->checkBox_ignoreIntermediateNodes, SIGNAL(stateChanged(int)), this, SLOT(updateGraphView()));
|
||||
connect(ui_->checkBox_timeStats, SIGNAL(stateChanged(int)), this, SLOT(configModified()));
|
||||
@@ -634,6 +634,7 @@ void DatabaseViewer::restoreDefaultSettings()
|
||||
// reset GUI parameters
|
||||
ui_->comboBox_logger_level->setCurrentIndex(1);
|
||||
ui_->checkBox_alignPosesWithGroundTruth->setChecked(true);
|
||||
ui_->checkBox_alignScansCloudsWithGroundTruth->setChecked(false);
|
||||
ui_->checkBox_ignoreIntermediateNodes->setChecked(false);
|
||||
ui_->checkBox_timeStats->setChecked(true);
|
||||
|
||||
@@ -923,12 +924,14 @@ bool DatabaseViewer::closeDatabase()
|
||||
ui_->toolBox_statistics->clear();
|
||||
databaseFileName_.clear();
|
||||
ui_->checkBox_alignPosesWithGroundTruth->setVisible(false);
|
||||
ui_->checkBox_alignScansCloudsWithGroundTruth->setVisible(false);
|
||||
ui_->doubleSpinBox_optimizationScale->setVisible(false);
|
||||
ui_->label_scale_title->setVisible(false);
|
||||
ui_->label_rmse->setVisible(false);
|
||||
ui_->label_rmse_title->setVisible(false);
|
||||
ui_->checkBox_ignoreIntermediateNodes->setVisible(false);
|
||||
ui_->label_alignPosesWithGroundTruth->setVisible(false);
|
||||
ui_->label_alignScansCloudsWithGroundTruth->setVisible(false);
|
||||
ui_->label_optimizeFrom->setText(tr("Optimize from"));
|
||||
ui_->textEdit_info->clear();
|
||||
|
||||
@@ -1435,12 +1438,14 @@ void DatabaseViewer::updateIds()
|
||||
gpsPoses_.clear();
|
||||
gpsValues_.clear();
|
||||
ui_->checkBox_alignPosesWithGroundTruth->setVisible(false);
|
||||
ui_->checkBox_alignScansCloudsWithGroundTruth->setVisible(false);
|
||||
ui_->doubleSpinBox_optimizationScale->setVisible(false);
|
||||
ui_->label_scale_title->setVisible(false);
|
||||
ui_->label_rmse->setVisible(false);
|
||||
ui_->label_rmse_title->setVisible(false);
|
||||
ui_->checkBox_ignoreIntermediateNodes->setVisible(false);
|
||||
ui_->label_alignPosesWithGroundTruth->setVisible(false);
|
||||
ui_->label_alignScansCloudsWithGroundTruth->setVisible(false);
|
||||
ui_->menuExport_GPS->setEnabled(false);
|
||||
ui_->actionPoses_KML->setEnabled(false);
|
||||
links_.clear();
|
||||
@@ -1578,9 +1583,12 @@ void DatabaseViewer::updateIds()
|
||||
ui_->label_rmse->setVisible(true);
|
||||
ui_->label_rmse_title->setVisible(true);
|
||||
ui_->label_alignPosesWithGroundTruth->setVisible(true);
|
||||
|
||||
if(!groundTruthPoses_.empty())
|
||||
{
|
||||
ui_->label_alignPosesWithGroundTruth->setText(tr("Align poses with ground truth"));
|
||||
ui_->checkBox_alignScansCloudsWithGroundTruth->setVisible(true);
|
||||
ui_->label_alignScansCloudsWithGroundTruth->setVisible(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2018,7 +2026,15 @@ void DatabaseViewer::exportPoses(int format)
|
||||
return;
|
||||
}
|
||||
|
||||
std::map<int, Transform> optimizedPoses = uValueAt(graphes_, ui_->horizontalSlider_iterations->value());
|
||||
std::map<int, Transform> optimizedPoses;
|
||||
if(ui_->checkBox_alignScansCloudsWithGroundTruth->isChecked() && !groundTruthPoses_.empty())
|
||||
{
|
||||
optimizedPoses = groundTruthPoses_;
|
||||
}
|
||||
else
|
||||
{
|
||||
optimizedPoses = uValueAt(graphes_, ui_->horizontalSlider_iterations->value());
|
||||
}
|
||||
|
||||
if(optimizedPoses.size())
|
||||
{
|
||||
@@ -2583,7 +2599,15 @@ void DatabaseViewer::view3DMap()
|
||||
}
|
||||
}
|
||||
|
||||
std::map<int, Transform> optimizedPoses = uValueAt(graphes_, ui_->horizontalSlider_iterations->value());
|
||||
std::map<int, Transform> optimizedPoses;
|
||||
if(ui_->checkBox_alignScansCloudsWithGroundTruth->isChecked() && !groundTruthPoses_.empty())
|
||||
{
|
||||
optimizedPoses = groundTruthPoses_;
|
||||
}
|
||||
else
|
||||
{
|
||||
optimizedPoses = uValueAt(graphes_, ui_->horizontalSlider_iterations->value());
|
||||
}
|
||||
if(ui_->groupBox_posefiltering->isChecked())
|
||||
{
|
||||
optimizedPoses = graph::radiusPosesFiltering(optimizedPoses,
|
||||
@@ -2626,7 +2650,15 @@ void DatabaseViewer::generate3DMap()
|
||||
}
|
||||
}
|
||||
|
||||
std::map<int, Transform> optimizedPoses = uValueAt(graphes_, ui_->horizontalSlider_iterations->value());
|
||||
std::map<int, Transform> optimizedPoses;
|
||||
if(ui_->checkBox_alignScansCloudsWithGroundTruth->isChecked() && !groundTruthPoses_.empty())
|
||||
{
|
||||
optimizedPoses = groundTruthPoses_;
|
||||
}
|
||||
else
|
||||
{
|
||||
optimizedPoses = uValueAt(graphes_, ui_->horizontalSlider_iterations->value());
|
||||
}
|
||||
if(ui_->groupBox_posefiltering->isChecked())
|
||||
{
|
||||
optimizedPoses = graph::radiusPosesFiltering(optimizedPoses,
|
||||
@@ -4492,7 +4524,15 @@ void DatabaseViewer::sliderIterationsValueChanged(int value)
|
||||
}
|
||||
}
|
||||
|
||||
std::map<int, rtabmap::Transform> graphFiltered = graph;
|
||||
std::map<int, rtabmap::Transform> graphFiltered;
|
||||
if(ui_->checkBox_alignScansCloudsWithGroundTruth->isChecked() && !groundTruthPoses_.empty())
|
||||
{
|
||||
graphFiltered = groundTruthPoses_;
|
||||
}
|
||||
else
|
||||
{
|
||||
graphFiltered = graph;
|
||||
}
|
||||
if(ui_->groupBox_posefiltering->isChecked())
|
||||
{
|
||||
graphFiltered = graph::radiusPosesFiltering(graph,
|
||||
|
||||
@@ -286,11 +286,11 @@ GraphViewer::GraphViewer(QWidget * parent) :
|
||||
_graphRoot->setParentItem(_root);
|
||||
|
||||
_globalPathRoot = (QGraphicsItem *)this->scene()->addEllipse(QRectF(-0.0001,-0.0001,0.0001,0.0001));
|
||||
_globalPathRoot->setZValue(5);
|
||||
_globalPathRoot->setZValue(8);
|
||||
_globalPathRoot->setParentItem(_root);
|
||||
|
||||
_localPathRoot = (QGraphicsItem *)this->scene()->addEllipse(QRectF(-0.0001,-0.0001,0.0001,0.0001));
|
||||
_localPathRoot->setZValue(6);
|
||||
_localPathRoot->setZValue(9);
|
||||
_localPathRoot->setParentItem(_root);
|
||||
|
||||
_gtGraphRoot = (QGraphicsItem *)this->scene()->addEllipse(QRectF(-0.0001,-0.0001,0.0001,0.0001));
|
||||
@@ -441,11 +441,12 @@ void GraphViewer::updateGraph(const std::map<int, Transform> & poses,
|
||||
if(_intraInterSessionColors)
|
||||
{
|
||||
linkItem->setColor(interSessionClosure?_loopInterSessionColor:_loopIntraSessionColor);
|
||||
linkItem->setZValue(interSessionClosure?8:9);
|
||||
linkItem->setZValue(interSessionClosure?6:7);
|
||||
}
|
||||
else
|
||||
{
|
||||
linkItem->setColor(_loopClosureLocalColor);
|
||||
linkItem->setZValue(7);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -458,6 +459,7 @@ void GraphViewer::updateGraph(const std::map<int, Transform> & poses,
|
||||
else
|
||||
{
|
||||
linkItem->setColor(_loopClosureColor);
|
||||
linkItem->setZValue(9);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -921,7 +921,7 @@
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_5" columnstretch="0,1">
|
||||
<item row="8" column="0">
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_loopClosures">
|
||||
<property name="text">
|
||||
<string/>
|
||||
@@ -931,7 +931,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_timeGrid">
|
||||
<property name="text">
|
||||
<string/>
|
||||
@@ -941,7 +941,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_timeOptimization">
|
||||
<property name="text">
|
||||
<string/>
|
||||
@@ -954,42 +954,42 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QSpinBox" name="spinBox_optimizationsFrom"/>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<item row="8" column="1">
|
||||
<widget class="QLabel" name="label_52">
|
||||
<property name="text">
|
||||
<string>Poses</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="label_39">
|
||||
<property name="text">
|
||||
<string>Time optimization (s)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<item row="9" column="1">
|
||||
<widget class="QLabel" name="label_41">
|
||||
<property name="text">
|
||||
<string>Links (N, NM, G, LS, LT, U, P)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Path length (m)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="label_45">
|
||||
<property name="text">
|
||||
<string>Time grid (s)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_pathLength">
|
||||
<property name="text">
|
||||
<string/>
|
||||
@@ -1020,7 +1020,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_poses">
|
||||
<property name="text">
|
||||
<string/>
|
||||
@@ -1040,6 +1040,16 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_ignoreIntermediateNodes">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_alignPosesWithGroundTruth">
|
||||
<property name="text">
|
||||
@@ -1050,18 +1060,18 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_ignoreIntermediateNodes">
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_rmse">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label_alignPosesWithGroundTruth_2">
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_ignoreINtermediateNdoes">
|
||||
<property name="text">
|
||||
<string>Ignore intermediate nodes</string>
|
||||
</property>
|
||||
@@ -1070,20 +1080,30 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<item row="7" column="1">
|
||||
<widget class="QLabel" name="label_rmse_title">
|
||||
<property name="text">
|
||||
<string>RMSE (m)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_rmse">
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label_alignScansCloudsWithGroundTruth">
|
||||
<property name="text">
|
||||
<string>Align scans/clouds with ground truth</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_alignScansCloudsWithGroundTruth">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -1840,8 +1860,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>205</width>
|
||||
<height>117</height>
|
||||
<width>298</width>
|
||||
<height>179</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
@@ -1940,8 +1960,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>185</width>
|
||||
<height>487</height>
|
||||
<width>433</width>
|
||||
<height>198</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
|
||||
Reference in New Issue
Block a user