diff --git a/src/processor/processor_loop_closure.cpp b/src/processor/processor_loop_closure.cpp index 574ac512ea39816335e5db8119da7465fe328b4a..67e724a538057be1e82ff0c4892c4320bedde1dc 100644 --- a/src/processor/processor_loop_closure.cpp +++ b/src/processor/processor_loop_closure.cpp @@ -15,7 +15,7 @@ ProcessorLoopClosure::ProcessorLoopClosure(const std::string& _type, void ProcessorLoopClosure::processCapture(CaptureBasePtr _capture) { /* This function has 3 scenarios: - * 1. Capture already linked to a frame -> process + * 1. Capture already linked to a frame (in trajectory) -> process * 2. Capture has a timestamp compatible with any stored frame -> link + process * 3. Otherwise -> store capture (Note that more than one processor can be emplacing frames, so an older frame can arrive later than this one) */ @@ -23,7 +23,7 @@ void ProcessorLoopClosure::processCapture(CaptureBasePtr _capture) WOLF_DEBUG("ProcessorLoopClosure::processCapture capture ", _capture->id()); // CASE 1: - if (_capture->getFrame()) + if (_capture->getFrame() and _capture->getFrame()->getTrajectory()) { WOLF_DEBUG("CASE 1"); @@ -39,7 +39,7 @@ void ProcessorLoopClosure::processCapture(CaptureBasePtr _capture) auto frame_pack = buffer_pack_kf_.select(_capture->getTimeStamp(), params_->time_tolerance); // CASE 2: - if (frame_pack) + if (_capture->getFrame() == nullptr and frame_pack) { WOLF_DEBUG("CASE 2");