mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
DbViewer: update loop closure slider after detecting more loop closures
This commit is contained in:
@@ -2228,6 +2228,7 @@ void DatabaseViewer::detectMoreLoopClosures()
|
|||||||
UASSERT(iterations > 0);
|
UASSERT(iterations > 0);
|
||||||
int added = 0;
|
int added = 0;
|
||||||
std::multimap<int, int> checkedLoopClosures;
|
std::multimap<int, int> checkedLoopClosures;
|
||||||
|
std::pair<int, int> lastAdded(0,0);
|
||||||
for(int n=0; n<iterations; ++n)
|
for(int n=0; n<iterations; ++n)
|
||||||
{
|
{
|
||||||
UINFO("iteration %d/%d", n+1, iterations);
|
UINFO("iteration %d/%d", n+1, iterations);
|
||||||
@@ -2269,6 +2270,8 @@ void DatabaseViewer::detectMoreLoopClosures()
|
|||||||
++added;
|
++added;
|
||||||
addedLinks.insert(from);
|
addedLinks.insert(from);
|
||||||
addedLinks.insert(to);
|
addedLinks.insert(to);
|
||||||
|
lastAdded.first = from;
|
||||||
|
lastAdded.second = to;
|
||||||
|
|
||||||
progressDialog->appendText(tr("Detected loop closure %1->%2! (%3/%4)").arg(from).arg(to).arg(i+1).arg(clusters.size()));
|
progressDialog->appendText(tr("Detected loop closure %1->%2! (%3/%4)").arg(from).arg(to).arg(i+1).arg(clusters.size()));
|
||||||
QApplication::processEvents();
|
QApplication::processEvents();
|
||||||
@@ -2288,6 +2291,7 @@ void DatabaseViewer::detectMoreLoopClosures()
|
|||||||
if(added)
|
if(added)
|
||||||
{
|
{
|
||||||
this->updateGraphView();
|
this->updateGraphView();
|
||||||
|
this->updateLoopClosuresSlider(lastAdded.first, lastAdded.second);
|
||||||
}
|
}
|
||||||
UINFO("Total added %d loop closures.", added);
|
UINFO("Total added %d loop closures.", added);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user