From d8e8d5d112a3554b2a847319062c2a9688df2fb4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Sol=C3=A0?= <jsola@iri.upc.edu>
Date: Tue, 13 Aug 2019 17:25:02 +0200
Subject: [PATCH] Move the insertion of motionZero from MotionBuffer to
 ProcessorMotion

---
 src/processor/processor_motion.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/processor/processor_motion.cpp b/src/processor/processor_motion.cpp
index 06d9d37f2..44561aeb1 100644
--- a/src/processor/processor_motion.cpp
+++ b/src/processor/processor_motion.cpp
@@ -61,6 +61,8 @@ void ProcessorMotion::splitBuffer(const wolf::CaptureMotionPtr& _capture_source,
 //        // add to old buffer
 //        _capture_target->getBuffer().get().push_back(motion_interpolated);
 //    }
+    // start with empty motion
+    _capture_source->getBuffer().get().push_front(motionZero(_keyframe_target->getTimeStamp()));
 
     // Update the existing capture
     _capture_source->setOriginFrame(_keyframe_target);
@@ -407,9 +409,9 @@ void ProcessorMotion::integrateOneStep()
 
 void ProcessorMotion::reintegrateBuffer(CaptureMotionPtr _capture_ptr)
 {
-    // start with empty motion
-    _capture_ptr->getBuffer().get().push_front(motionZero(_capture_ptr->getOriginFrame()->getTimeStamp()));
-
+//    // start with empty motion
+//    _capture_ptr->getBuffer().get().push_front(motionZero(_capture_ptr->getOriginFrame()->getTimeStamp()));
+//
     VectorXs calib = _capture_ptr->getCalibrationPreint();
 
     // Iterate all the buffer
-- 
GitLab