Skip to content
Snippets Groups Projects
Commit 57082085 authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

bug fixed in processor_loop_closure.cpp

parent 113de502
No related branches found
No related tags found
1 merge request!413Resolve "New ProcessorLoopClosure"
Pipeline #6508 passed
This commit is part of merge request !413. Comments created here will be created in the context of that merge request.
......@@ -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");
......
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