mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-04 00:57:46 +08:00
updated feedback
This commit is contained in:
@@ -344,6 +344,7 @@ int main(int argc, char * argv[])
|
|||||||
// Synchronize WM and the optimized graph. For all nodes in WM that
|
// Synchronize WM and the optimized graph. For all nodes in WM that
|
||||||
// are not in optimized graph, transfer to LTM.
|
// are not in optimized graph, transfer to LTM.
|
||||||
std::map<int, double> wm = memory.getWorkingMem();
|
std::map<int, double> wm = memory.getWorkingMem();
|
||||||
|
bool alreadySync = true;
|
||||||
for(std::map<int, double>::iterator iter=wm.lower_bound(0);
|
for(std::map<int, double>::iterator iter=wm.lower_bound(0);
|
||||||
iter!=wm.end();
|
iter!=wm.end();
|
||||||
++iter)
|
++iter)
|
||||||
@@ -352,8 +353,12 @@ int main(int argc, char * argv[])
|
|||||||
{
|
{
|
||||||
memory.deleteLocation(iter->first, 0, true);
|
memory.deleteLocation(iter->first, 0, true);
|
||||||
printf("Transferred %d from WM to LTM.\n", iter->first);
|
printf("Transferred %d from WM to LTM.\n", iter->first);
|
||||||
|
alreadySync = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(alreadySync) {
|
||||||
|
printf("All nodes in WM are in the optimized graph, no need to transfer anything.\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Saving back %ld optimized poses to database.\n", optimizedPoses.size());
|
printf("Saving back %ld optimized poses to database.\n", optimizedPoses.size());
|
||||||
|
|||||||
Reference in New Issue
Block a user