mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
fixed reset UPlot on rehearsal after small movement detected. GUI: modified color for pose correction (DarkCyan) and small movement (Gray)
This commit is contained in:
@@ -1076,6 +1076,7 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
|
||||
bool rehearsedSimilarity = (float)uValue(stat.data(), Statistics::kMemoryRehearsal_id(), 0.0f) != 0.0f;
|
||||
int localTimeClosures = (int)uValue(stat.data(), Statistics::kLocalLoopTime_closures(), 0.0f);
|
||||
bool scanMatchingSuccess = (bool)uValue(stat.data(), Statistics::kOdomCorrectionAccepted(), 0.0f);
|
||||
bool smallMovement = (bool)uValue(stat.data(), Statistics::kMemorySmall_movement(), 0.0f);
|
||||
_ui->label_stats_imageNumber->setText(QString("%1 [%2]").arg(stat.refImageId()).arg(refMapId));
|
||||
|
||||
if(rehearsalMerged > 0)
|
||||
@@ -1088,12 +1089,16 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
|
||||
}
|
||||
else if(scanMatchingSuccess)
|
||||
{
|
||||
_ui->imageView_source->setBackgroundColor(Qt::gray);
|
||||
_ui->imageView_source->setBackgroundColor(Qt::darkCyan);
|
||||
}
|
||||
else if(rehearsedSimilarity)
|
||||
{
|
||||
_ui->imageView_source->setBackgroundColor(Qt::darkBlue);
|
||||
}
|
||||
else if(smallMovement)
|
||||
{
|
||||
_ui->imageView_source->setBackgroundColor(Qt::gray);
|
||||
}
|
||||
|
||||
UDEBUG("time= %d ms", time.restart());
|
||||
|
||||
|
||||
@@ -435,7 +435,7 @@ void UPlotCurve::addValue(float x, float y)
|
||||
{
|
||||
UWARN("New value (%f) added to curve \"%s\" is smaller "
|
||||
"than the last added (%f). Clearing the curve.",
|
||||
x, this->name().toStdString().c_str(), _items.back()->pos().x());
|
||||
x, this->name().toStdString().c_str(), ((UPlotItem*)_items.back())->data().x());
|
||||
this->clear();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user