mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-10 11:59:50 +08:00
Optimizer:getConnectedGraph() don't add poses not included in the input poses
This commit is contained in:
@@ -202,6 +202,8 @@ void Optimizer::getConnectedGraph(
|
|||||||
for(std::multimap<int, int>::const_iterator iter=biLinks.find(fromId); iter!=biLinks.end() && iter->first==fromId; ++iter)
|
for(std::multimap<int, int>::const_iterator iter=biLinks.find(fromId); iter!=biLinks.end() && iter->first==fromId; ++iter)
|
||||||
{
|
{
|
||||||
int toId = iter->second;
|
int toId = iter->second;
|
||||||
|
if(posesIn.find(toId) != posesIn.end())
|
||||||
|
{
|
||||||
std::multimap<int, Link>::const_iterator kter = graph::findLink(linksIn, fromId, toId);
|
std::multimap<int, Link>::const_iterator kter = graph::findLink(linksIn, fromId, toId);
|
||||||
int nextDepth = toId!=fromId?depth-1:depth;
|
int nextDepth = toId!=fromId?depth-1:depth;
|
||||||
if(depth == 0 || d < nextDepth || curentPoses.find(toId) != curentPoses.end())
|
if(depth == 0 || d < nextDepth || curentPoses.find(toId) != curentPoses.end())
|
||||||
@@ -222,6 +224,7 @@ void Optimizer::getConnectedGraph(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
++d;
|
++d;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user