mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
RTAB-Map : added localLoopClosureId for VSLAM use...
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@877 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -489,7 +489,8 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
|
||||
{
|
||||
if(stat.loopClosureId()>0 || highestHypothesisId>0)
|
||||
{
|
||||
int id = stat.loopClosureId()>0?stat.loopClosureId():highestHypothesisId;
|
||||
// order -> loop closure id -> local loop closure id -> highest loop closure hyp id
|
||||
int id = stat.loopClosureId()>0?stat.loopClosureId():stat.localLoopClosureId()>0?stat.localLoopClosureId():highestHypothesisId;
|
||||
if(!_imagesMap.contains(id))
|
||||
{
|
||||
QByteArray ba;
|
||||
@@ -505,12 +506,19 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
|
||||
int rejectedHyp = bool(uValue(stat.data(), Statistics::kLoopRejectedHypothesis(), 0.0f));
|
||||
float highestHypothesisValue = uValue(stat.data(), Statistics::kLoopHighest_hypothesis_value(), 0.0f);
|
||||
int matchId = 0;
|
||||
if(highestHypothesisId > 0)
|
||||
if(highestHypothesisId > 0 || stat.localLoopClosureId())
|
||||
{
|
||||
bool show = true;
|
||||
if(stat.loopClosureId() > 0)
|
||||
{
|
||||
_ui->imageView_loopClosure->setBackgroundBrush(QBrush(Qt::green));
|
||||
if(highestHypothesisId != stat.loopClosureId())
|
||||
{
|
||||
_ui->imageView_loopClosure->setBackgroundBrush(QBrush(Qt::yellow));
|
||||
}
|
||||
else
|
||||
{
|
||||
_ui->imageView_loopClosure->setBackgroundBrush(QBrush(Qt::green));
|
||||
}
|
||||
_ui->label_stats_loopClosuresDetected->setText(QString::number(_ui->label_stats_loopClosuresDetected->text().toInt() + 1));
|
||||
if(highestHypothesisIsSaved)
|
||||
{
|
||||
@@ -519,6 +527,12 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
|
||||
_ui->label_matchId->setText(QString("Match ID = %1").arg(stat.loopClosureId()));
|
||||
matchId = stat.loopClosureId();
|
||||
}
|
||||
else if(stat.localLoopClosureId())
|
||||
{
|
||||
_ui->imageView_loopClosure->setBackgroundBrush(QBrush(Qt::yellow));
|
||||
_ui->label_matchId->setText(QString("Local match (%1)").arg(stat.localLoopClosureId()));
|
||||
|
||||
}
|
||||
else if(rejectedHyp && highestHypothesisValue >= _preferencesDialog->getLoopThr())
|
||||
{
|
||||
show = _preferencesDialog->imageRejectedShown() || _preferencesDialog->imageHighestHypShown();;
|
||||
|
||||
Reference in New Issue
Block a user