From ac3b1fe97ad4973bbe29eab7d9dcb60b17d81b41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Sol=C3=A0?= <jsola@iri.upc.edu> Date: Thu, 11 Aug 2022 19:35:20 +0200 Subject: [PATCH] Check for map existance before preocessKnown --- src/processor/processor_tracker.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/processor/processor_tracker.cpp b/src/processor/processor_tracker.cpp index d499c2613..bba0f4417 100644 --- a/src/processor/processor_tracker.cpp +++ b/src/processor/processor_tracker.cpp @@ -115,7 +115,8 @@ void ProcessorTracker::processCapture(CaptureBasePtr _incoming_ptr) // Process info // TrackerFeature: We only process new features in Last, here last = nullptr, so we do not have anything to do. // TrackerLandmark: If we have been given a map, all landmarks in the map are known. Process them. - processKnown(); + if (not getProblem()->getMap()->getLandmarkList().empty()) + processKnown(); // Issue KF callback with new KF getProblem()->keyFrameCallback(keyframe, shared_from_this()); @@ -158,7 +159,9 @@ void ProcessorTracker::processCapture(CaptureBasePtr _incoming_ptr) // Process info // TrackerLandmark: If we have been given a map, all landmarks in the map are known. Process them. - processKnown(); + if (not getProblem()->getMap()->getLandmarkList().empty()) + processKnown(); + // Both Trackers: We have a last_ Capture with not enough features, so populate it. processNew(params_tracker_->max_new_features); -- GitLab