diff --git a/src/capture/capture_base.cpp b/src/capture/capture_base.cpp index 489d67637c0069c0cd555472571803e5519c6b46..48a01e0035a732b181ebbcbb2f13e0dd3892793f 100644 --- a/src/capture/capture_base.cpp +++ b/src/capture/capture_base.cpp @@ -180,8 +180,8 @@ void CaptureBase::move(FrameBasePtr _frm_ptr) WOLF_WARN_COND(this->getFrame() == nullptr, "moving a capture not linked to any frame"); WOLF_WARN_COND(_frm_ptr == nullptr, "moving a capture to a null FrameBasePtr"); - assert((this->getFrame() == nullptr || this->getFrame()->isKey()) && "Forbidden: moving a capture already linked to a KF"); - assert((_frm_ptr == nullptr || _frm_ptr->isKey()) && "Forbidden: moving a capture to a non-estimated frame"); + assert((this->getFrame() == nullptr || this->getFrame()->getProblem()) && "Forbidden: moving a capture already linked to a KF"); + assert((_frm_ptr == nullptr || !_frm_ptr->getProblem()) && "Forbidden: moving a capture to a non-estimated frame"); // Unlink if (this->getFrame()) @@ -399,7 +399,7 @@ CheckLog CaptureBase::localCheck(bool _verbose, CaptureBasePtr _cap_ptr, std::os match_any_prc_timetolerance = match_any_prc_timetolerance or (time_diff <= prc->getTimeTolerance()); } inconsistency_explanation << "Cap " << id() << " @ " << _cap_ptr - << " ts =" << getTimeStamp() << ((frame->isKey()) ? "KFrm" : "Frm") << frame->id() + << " ts =" << getTimeStamp() << "Frm" << frame->id() << " ts = " << frame->getTimeStamp() << " their time difference (" << time_diff << ") does not match any time tolerance of" << " any processor in sensor " << getSensor()->id() << "\n"; log.assertTrue((match_any_prc_timetolerance), inconsistency_explanation); diff --git a/src/frame/frame_base.cpp b/src/frame/frame_base.cpp index 16a40a9161e37d8286deeda5895d4b60f0acf9e5..a2a3deb19ac18d37d15c82ceb10ee8498e68fd89 100644 --- a/src/frame/frame_base.cpp +++ b/src/frame/frame_base.cpp @@ -307,7 +307,7 @@ void FrameBase::setProblem(ProblemPtr _problem) void FrameBase::printHeader(int _depth, bool _constr_by, bool _metric, bool _state_blocks, std::ostream& _stream, std::string _tabs) const { - _stream << _tabs << (isKey() ? "KFrm" : "Frm") << id() + _stream << _tabs << "Frm" << id() << " " << getStructure() << " ts = " << std::setprecision(3) << getTimeStamp() << ((_depth < 2) ? " -- " + std::to_string(getCaptureList().size()) + "C " : ""); @@ -367,7 +367,7 @@ CheckLog FrameBase::localCheck(bool _verbose, FrameBasePtr _frm_ptr, std::ostrea std::stringstream inconsistency_explanation; if (_verbose) { - _stream << _tabs << (isKey() ? "KFrm" : "Frm") + _stream << _tabs << "Frm" << id() << " @ " << _frm_ptr.get() << std::endl; _stream << _tabs << " " << "-> Prb @ " << getProblem().get() << std::endl; _stream << _tabs << " " << "-> Trj @ " << getTrajectory().get() << std::endl; diff --git a/src/processor/processor_motion.cpp b/src/processor/processor_motion.cpp index a4ef91f15c8b515b2266e6361763c3f65f6ff556..c559334e25ae87a91f4993e5c527185de17b7204 100644 --- a/src/processor/processor_motion.cpp +++ b/src/processor/processor_motion.cpp @@ -972,10 +972,10 @@ void ProcessorMotion::printHeader(int _depth, bool _constr_by, bool _metric, boo { _stream << _tabs << "PrcM" << id() << " " << getType() << " \"" << getName() << "\"" << std::endl; if (getOrigin()) - _stream << _tabs << " " << "o: Cap" << getOrigin()->id() << " - " << (getOrigin()->getFrame()->isKey() ? " KFrm" : " Frm" ) + _stream << _tabs << " " << "o: Cap" << getOrigin()->id() << " - " << " Frm" << getOrigin()->getFrame()->id() << std::endl; if (getLast()) - _stream << _tabs << " " << "l: Cap" << getLast()->id() << " - " << (getLast()->getFrame()->isKey() ? " KFrm" : " Frm") + _stream << _tabs << " " << "l: Cap" << getLast()->id() << " - " << " Frm" << getLast()->getFrame()->id() << std::endl; if (getIncoming()) _stream << _tabs << " " << "i: Cap" << getIncoming()->id() << std::endl; diff --git a/src/processor/processor_tracker.cpp b/src/processor/processor_tracker.cpp index 1a6e53d7ea46e61177c88d399eb1d9f60933b04a..9f9034eaca9f348bcc0f59527e9e7563ee26655b 100644 --- a/src/processor/processor_tracker.cpp +++ b/src/processor/processor_tracker.cpp @@ -276,11 +276,11 @@ void ProcessorTracker::computeProcessingStep() if (buffer_pack_kf_.selectPack(last_ptr_, params_tracker_->time_tolerance)) { - if (last_ptr_->getFrame()->isKey()) + if (last_ptr_->getFrame()->getProblem()) { WOLF_WARN("||*||"); WOLF_INFO(" ... It seems you missed something!"); - WOLF_INFO("Pack's KF and last's KF have matching time stamps (i.e. below time tolerances)"); + WOLF_INFO("Pack's KF and last's Frame have matching time stamps (i.e. below time tolerances)"); WOLF_INFO("Check the following for correctness:"); WOLF_INFO(" - You have all processors installed before starting receiving any data"); WOLF_INFO(" - You have configured all your processors with compatible time tolerances"); @@ -311,10 +311,10 @@ void ProcessorTracker::printHeader(int _depth, bool _constr_by, bool _metric, bo { _stream << _tabs << "PrcT" << id() << " " << getType() << " \"" << getName() << "\"" << std::endl; if (getOrigin()) - _stream << _tabs << " " << "o: Cap" << getOrigin()->id() << " - " << (getOrigin()->getFrame()->isKey() ? " KFrm" : " Frm") + _stream << _tabs << " " << "o: Cap" << getOrigin()->id() << " - " << " Frm" << getOrigin()->getFrame()->id() << std::endl; if (getLast()) - _stream << _tabs << " " << "l: Cap" << getLast()->id() << " - " << (getLast()->getFrame()->isKey() ? " KFrm" : " Frm") + _stream << _tabs << " " << "l: Cap" << getLast()->id() << " - " << " Frm" << getLast()->getFrame()->id() << std::endl; if (getIncoming()) _stream << _tabs << " " << "i: Cap" << getIncoming()->id() << std::endl; diff --git a/src/processor/track_matrix.cpp b/src/processor/track_matrix.cpp index 6d7dd0f50da30dc79e3c5c9cca980bc3364a0349..da6a88b75e98e0ada648f76155f5d12501c21c4d 100644 --- a/src/processor/track_matrix.cpp +++ b/src/processor/track_matrix.cpp @@ -214,7 +214,7 @@ Track TrackMatrix::trackAtKeyframes(size_t _track_id) const { auto& ts = pair_ts_ftr.first; auto& ftr = pair_ts_ftr.second; - if (ftr && ftr->getCapture() && ftr->getCapture()->getFrame() && ftr->getCapture()->getFrame()->isKey()) + if (ftr && ftr->getCapture() && ftr->getCapture()->getFrame() && ftr->getCapture()->getFrame()->getProblem()) track_kf[ts] = ftr; } return track_kf;