rtabmap: fixed graph not re-optimized (if empty) after first localization on landmark

This commit is contained in:
matlabbe
2020-03-10 13:08:47 -04:00
parent bfc64c451a
commit 39724e239c

View File

@@ -2571,9 +2571,9 @@ bool Rtabmap::process(
signaturesRetrieved.size()) // can be different map of the current one
&&
(_memory->isIncremental() ||
// In localization mode, the new node should be linked to another node or a landmark already in the graph
graph::filterLinks(signature->getLinks(), Link::kSelfRefLink).size() ||
(landmarkDetected!=0 && _optimizedPoses.find(landmarkDetected)!=_optimizedPoses.end())))
// In localization mode, the new node should be linked to another node or a landmark already in the working memory
graph::filterLinks(signature->getLinks(), Link::kSelfRefLink).size() ||
landmarkDetected!=0))
{
UASSERT(uContains(_optimizedPoses, signature->id()));
@@ -2834,7 +2834,6 @@ bool Rtabmap::process(
}
else
{
UINFO("Update map correction");
std::map<int, Transform> poses = _optimizedPoses;