diff --git a/include/core/capture/capture_motion.h b/include/core/capture/capture_motion.h index 22beb90dd2dfc14aa78728149cdd387729a711db..95d2b8d5c945d4a16a555dbea78491f8bbfef8e5 100644 --- a/include/core/capture/capture_motion.h +++ b/include/core/capture/capture_motion.h @@ -97,8 +97,6 @@ class CaptureMotion : public CaptureBase virtual VectorXs correctDelta(const VectorXs& _delta, const VectorXs& _delta_error) const; // Origin frame and capture - FrameBasePtr getOriginFrame(); - void setOriginFrame(FrameBasePtr _frame_ptr); CaptureBasePtr getOriginCapture(); void setOriginCapture(CaptureBasePtr _origin_capture); @@ -108,7 +106,6 @@ class CaptureMotion : public CaptureBase Eigen::MatrixXs data_cov_; ///< Motion data covariance Eigen::VectorXs calib_preint_; ///< Calibration parameters used during pre-integration MotionBuffer buffer_; ///< Buffer of motions between this Capture and the next one. -// FrameBaseWPtr origin_frame_ptr_; ///< Pointer to the origin frame of the motion CaptureBaseWPtr origin_capture_; ///< Pointer to the origin capture of the motion }; @@ -161,18 +158,6 @@ inline Eigen::VectorXs CaptureMotion::correctDelta(const VectorXs& _delta, const return _delta + _delta_error; } -inline FrameBasePtr CaptureMotion::getOriginFrame() -{ - return getOriginCapture()->getFrame(); -} - -inline void CaptureMotion::setOriginFrame(FrameBasePtr _frame_ptr) -{ - auto sensor = getSensor(); - if (_frame_ptr && sensor) - origin_capture_ = _frame_ptr->getCaptureOf(sensor); -} - inline wolf::CaptureBasePtr CaptureMotion::getOriginCapture() { return origin_capture_.lock(); diff --git a/src/processor/processor_motion.cpp b/src/processor/processor_motion.cpp index d077e156dcaa869b231a44dca924732e60899531..4e381ca5db3127a47256f20f5ce80f40631fdd2c 100644 --- a/src/processor/processor_motion.cpp +++ b/src/processor/processor_motion.cpp @@ -348,8 +348,8 @@ bool ProcessorMotion::getState(const TimeStamp& _ts, Eigen::VectorXs& _x) if (capture_motion) // We found a CaptureMotion whose buffer contains the time stamp { // Get origin state and calibration - VectorXs state_0 = capture_motion->getOriginFrame()->getState(); CaptureBasePtr cap_orig = capture_motion->getOriginCapture(); + VectorXs state_0 = cap_orig->getFrame()->getState(); VectorXs calib = cap_orig->getCalibration(); // Get delta and correct it with new calibration params