mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
Added missing signature info in republished data
This commit is contained in:
@@ -4250,7 +4250,7 @@ bool Rtabmap::process(
|
|||||||
std::stringstream stream;
|
std::stringstream stream;
|
||||||
for(std::multimap<int, int>::iterator iter=missingIds.begin(); iter!=missingIds.end() && loaded<(int)_maxRepublished; ++iter)
|
for(std::multimap<int, int>::iterator iter=missingIds.begin(); iter!=missingIds.end() && loaded<(int)_maxRepublished; ++iter)
|
||||||
{
|
{
|
||||||
statistics_.addSignatureData(_memory->getNodeData(iter->second, true, true, true, true));
|
statistics_.addSignatureData(getSignatureCopy(iter->second, true, true, true, true, true, true));
|
||||||
_nodesToRepublish.erase(iter->second);
|
_nodesToRepublish.erase(iter->second);
|
||||||
++loaded;
|
++loaded;
|
||||||
stream << iter->second << " ";
|
stream << iter->second << " ";
|
||||||
|
|||||||
@@ -1947,6 +1947,7 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
|
|||||||
signature = _cachedSignatures.value(rehearsalMerged);
|
signature = _cachedSignatures.value(rehearsalMerged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int newIdIsTemporary = 0;
|
||||||
if(signature.id()!=0)
|
if(signature.id()!=0)
|
||||||
{
|
{
|
||||||
// make sure data are uncompressed
|
// make sure data are uncompressed
|
||||||
@@ -1976,6 +1977,7 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
|
|||||||
if(smallMovement || fastMovement)
|
if(smallMovement || fastMovement)
|
||||||
{
|
{
|
||||||
_cachedSignatures.insert(0, signature); // zero means temporary
|
_cachedSignatures.insert(0, signature); // zero means temporary
|
||||||
|
newIdIsTemporary = stat.refImageId();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2020,7 +2022,13 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
_cachedWordsCount.insert(std::make_pair(iter->first, (float)count));
|
_cachedWordsCount.insert(std::make_pair(iter->first, (float)count));
|
||||||
UINFO("Added %d node data to cache", iter->first);
|
UINFO("Added node data %d [map=%d] to cache", iter->first, iter->second.mapId());
|
||||||
|
|
||||||
|
_currentMapIds.insert(std::make_pair(iter->first, iter->second.mapId()));
|
||||||
|
if(!iter->second.getGroundTruthPose().isNull())
|
||||||
|
{
|
||||||
|
_currentGTPosesMap.insert(std::make_pair(iter->first, iter->second.getGroundTruthPose()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2609,6 +2617,8 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
|
|||||||
{
|
{
|
||||||
std::vector<int> missingIds;
|
std::vector<int> missingIds;
|
||||||
for(std::map<int, Transform>::const_iterator iter=stat.poses().begin(); iter!=stat.poses().end(); ++iter)
|
for(std::map<int, Transform>::const_iterator iter=stat.poses().begin(); iter!=stat.poses().end(); ++iter)
|
||||||
|
{
|
||||||
|
if(newIdIsTemporary != iter->first)
|
||||||
{
|
{
|
||||||
QMap<int, Signature>::iterator ster = _cachedSignatures.find(iter->first);
|
QMap<int, Signature>::iterator ster = _cachedSignatures.find(iter->first);
|
||||||
if(ster == _cachedSignatures.end() ||
|
if(ster == _cachedSignatures.end() ||
|
||||||
@@ -2620,6 +2630,7 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
|
|||||||
missingIds.push_back(iter->first);
|
missingIds.push_back(iter->first);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(!missingIds.empty())
|
if(!missingIds.empty())
|
||||||
{
|
{
|
||||||
this->post(new RtabmapEventCmd(RtabmapEventCmd::kCmdRepublishData, UVariant(missingIds)));
|
this->post(new RtabmapEventCmd(RtabmapEventCmd::kCmdRepublishData, UVariant(missingIds)));
|
||||||
|
|||||||
Reference in New Issue
Block a user