Skip to content
Snippets Groups Projects
Commit 21049017 authored by PierreGtch's avatar PierreGtch
Browse files

ProcessorLoopClosureBase test if the two captures are linked to kf of come from the same kf

parent 4201f9bc
No related branches found
No related tags found
1 merge request!290Resolve "ProcessorLoopClosureBase class"
This commit is part of merge request !290. Comments created here will be created in the context of that merge request.
......@@ -34,8 +34,16 @@ void ProcessorLoopClosureBase::process(CaptureBasePtr _incoming_ptr)
{
CaptureBasePtr capture_1 = pairKC.second;
CaptureBasePtr capture_2 = findLoopCandidate(capture_1);
if (capture_2==nullptr) return;
if (validateLoop(capture_1, capture_2)==false) return;
if (validateLoop(capture_1, capture_2)==false) return;
if (capture_2==nullptr) return;
if (capture_1->getFrame() == nullptr || capture_2->getFrame() == nullptr) {
WOLF_WARN("ProcessorLoopClosureBase : tried to close a loop with captures linked to no KF");
return;
};
if (capture_1->getFrame() == capture_2->getFrame()) {
WOLF_WARN("ProcessorLoopClosureBase : findLoopCandidate() returned two captures of the same frame");
return;
};
createFactors(capture_1, capture_2);
};
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment