Skip to content
Snippets Groups Projects

Resolve "New ProcessorLoopClosure"

Merged Joan Vallvé Navarro requested to merge 398-new-processorloopclosure into devel
1 file
+ 3
3
Compare changes
  • Side-by-side
  • Inline
@@ -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");
Loading