mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
Remove landmark links when a node is deleted (and removed from the graph) #441
This commit is contained in:
@@ -92,6 +92,7 @@ public:
|
|||||||
|
|
||||||
void addLandmark(const Link & landmark) {_landmarks.insert(std::make_pair(landmark.to(), landmark));}
|
void addLandmark(const Link & landmark) {_landmarks.insert(std::make_pair(landmark.to(), landmark));}
|
||||||
const std::map<int, Link> & getLandmarks() const {return _landmarks;}
|
const std::map<int, Link> & getLandmarks() const {return _landmarks;}
|
||||||
|
void removeLandmarks() {_landmarks.clear();}
|
||||||
|
|
||||||
void setSaved(bool saved) {_saved = saved;}
|
void setSaved(bool saved) {_saved = saved;}
|
||||||
void setModified(bool modified) {_modified = modified; _linksModified = modified;}
|
void setModified(bool modified) {_modified = modified; _linksModified = modified;}
|
||||||
|
|||||||
@@ -2343,6 +2343,7 @@ void Memory::moveToTrash(Signature * s, bool keepLinkedToGraph, std::list<int> *
|
|||||||
|
|
||||||
}
|
}
|
||||||
s->removeLinks(); // remove all links
|
s->removeLinks(); // remove all links
|
||||||
|
s->removeLandmarks(); // remove all landmarks
|
||||||
s->setWeight(0);
|
s->setWeight(0);
|
||||||
s->setLabel(""); // reset label
|
s->setLabel(""); // reset label
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user