matlabbe
2018-09-18 12:30:01 -04:00
parent eedc68c360
commit 84a8e5830e

View File

@@ -837,16 +837,19 @@ void Memory::addSignatureToStm(Signature * signature, const cv::Mat & covariance
*_stMem.rbegin(), signature->id(), *_stMem.rbegin(), signature->id(),
_signatures.at(*_stMem.rbegin())->mapId(), signature->mapId()); _signatures.at(*_stMem.rbegin())->mapId(), signature->mapId());
//Tag the first node of the map if(_mapLabelsAdded && isIncremental())
std::string tag = uFormat("map%d", signature->mapId());
if(getSignatureIdByLabel(tag, false) == 0)
{ {
UINFO("Tagging node %d with label \"%s\"", signature->id(), tag.c_str()); //Tag the first node of the map
signature->setLabel(tag); std::string tag = uFormat("map%d", signature->mapId());
if(getSignatureIdByLabel(tag, false) == 0)
{
UINFO("Tagging node %d with label \"%s\"", signature->id(), tag.c_str());
signature->setLabel(tag);
}
} }
} }
} }
else if(_mapLabelsAdded) else if(_mapLabelsAdded && isIncremental())
{ {
//Tag the first node of the map //Tag the first node of the map
std::string tag = uFormat("map%d", signature->mapId()); std::string tag = uFormat("map%d", signature->mapId());