mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-03 16:27:46 +08:00
Rtabmap::detectMoreLoopClosures(): use Memory::computeTransform() with signature parameters
This commit is contained in:
@@ -3290,7 +3290,8 @@ int Rtabmap::detectMoreLoopClosures(float clusterRadius, float clusterAngle, int
|
|||||||
|
|
||||||
std::map<int, Transform> poses;
|
std::map<int, Transform> poses;
|
||||||
std::multimap<int, Link> links;
|
std::multimap<int, Link> links;
|
||||||
this->getGraph(poses, links, true, true);
|
std::map<int, Signature> signatures;
|
||||||
|
this->getGraph(poses, links, true, true, &signatures);
|
||||||
|
|
||||||
for(int n=0; n<iterations; ++n)
|
for(int n=0; n<iterations; ++n)
|
||||||
{
|
{
|
||||||
@@ -3335,8 +3336,12 @@ int Rtabmap::detectMoreLoopClosures(float clusterRadius, float clusterAngle, int
|
|||||||
{
|
{
|
||||||
checkedLoopClosures.insert(std::make_pair(from, to));
|
checkedLoopClosures.insert(std::make_pair(from, to));
|
||||||
|
|
||||||
|
UASSERT(signatures.find(from) != signatures.end());
|
||||||
|
UASSERT(signatures.find(to) != signatures.end());
|
||||||
|
|
||||||
RegistrationInfo info;
|
RegistrationInfo info;
|
||||||
Transform t = _memory->computeTransform(from, to, Transform(), &info);
|
// use signatures instead of IDs because some signatures may not be in WM
|
||||||
|
Transform t = _memory->computeTransform(signatures.at(from), signatures.at(to), Transform(), &info);
|
||||||
|
|
||||||
if(!t.isNull())
|
if(!t.isNull())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user