mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-05 17:47:49 +08:00
Landmark constraints can now be rejected (in case we see same landmark at two different spots or constraint is poorly estimated). Optimizer/Robust can now be used with landmark constraints with orientation.
This commit is contained in:
@@ -2770,6 +2770,19 @@ void Memory::removeLink(int oldId, int newId)
|
||||
UERROR("Signatures %d and %d don't have bidirectional link!", oldS->id(), newS->id());
|
||||
}
|
||||
}
|
||||
else if(this->_getSignature(newId<0?oldId:newId))
|
||||
{
|
||||
int landmarkId = newId<0?newId:oldId;
|
||||
Signature * s = this->_getSignature(newId<0?oldId:newId);
|
||||
s->removeLandmark(newId<0?newId:oldId);
|
||||
_linksChanged = true;
|
||||
// Update landmark index
|
||||
std::map<int, std::set<int> >::iterator nter = _landmarksIndex.find(landmarkId);
|
||||
if(nter!=_landmarksIndex.end())
|
||||
{
|
||||
nter->second.erase(s->id());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!newS)
|
||||
|
||||
Reference in New Issue
Block a user