mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
fixed lastSignature set to loop closure child instead of neighbor
This commit is contained in:
@@ -1523,13 +1523,13 @@ void Memory::moveToTrash(Signature * s, bool saveToDatabase, std::list<int> * de
|
|||||||
}
|
}
|
||||||
|
|
||||||
// child
|
// child
|
||||||
if(iter->second.type() > Link::kNeighbor && s->id() > sTo->id())
|
if(iter->second.type() == Link::kGlobalClosure && s->id() > sTo->id())
|
||||||
{
|
{
|
||||||
sTo->setWeight(sTo->getWeight() + s->getWeight()); // copy weight
|
sTo->setWeight(sTo->getWeight() + s->getWeight()); // copy weight
|
||||||
}
|
}
|
||||||
|
|
||||||
sTo->removeLink(s->id());
|
sTo->removeLink(s->id());
|
||||||
if(s == _lastSignature)
|
if(s == _lastSignature && iter->second.type() == Link::kNeighbor)
|
||||||
{
|
{
|
||||||
_lastSignature = sTo;
|
_lastSignature = sTo;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user