From 1893c174d2c7ab0bd7bfb81852920c7e44040697 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Sol=C3=A0?= <jsola@iri.upc.edu>
Date: Sat, 11 Apr 2020 01:58:44 +0200
Subject: [PATCH] remove sizes info from Motion

---
 include/core/processor/motion_buffer.h |  2 --
 src/processor/motion_buffer.cpp        | 22 ----------------------
 2 files changed, 24 deletions(-)

diff --git a/include/core/processor/motion_buffer.h b/include/core/processor/motion_buffer.h
index a5b41ebfe..a8e06e0e1 100644
--- a/include/core/processor/motion_buffer.h
+++ b/include/core/processor/motion_buffer.h
@@ -21,7 +21,6 @@ using namespace Eigen;
 struct Motion
 {
     public:
-        SizeEigen data_size_, delta_size_, cov_size_, calib_size_;
         TimeStamp ts_;                          ///< Time stamp
         Eigen::VectorXd data_;                  ///< instantaneous motion data
         Eigen::MatrixXd data_cov_;              ///< covariance of the instantaneous data
@@ -47,7 +46,6 @@ struct Motion
                const MatrixXd& _jacobian_calib);
         ~Motion();
     private:
-        void resize(SizeEigen _data_s, SizeEigen _delta_s, SizeEigen _delta_cov_s, SizeEigen _calib_s);
 
 }; ///< One instance of the buffered data, corresponding to a particular time stamp.
 
diff --git a/src/processor/motion_buffer.cpp b/src/processor/motion_buffer.cpp
index 5d0a59567..e7e349e91 100644
--- a/src/processor/motion_buffer.cpp
+++ b/src/processor/motion_buffer.cpp
@@ -12,10 +12,6 @@ Motion::Motion(const TimeStamp& _ts,
                const MatrixXd& _jac_delta,
                const MatrixXd& _jac_delta_int,
                const MatrixXd& _jac_calib) :
-        data_size_(_data.size()),
-        delta_size_(_delta.size()),
-        cov_size_(_delta_cov.cols()),
-        calib_size_(_jac_calib.cols()),
         ts_(_ts),
         data_(_data),
         data_cov_(_data_cov),
@@ -34,32 +30,14 @@ Motion::Motion(const TimeStamp& _ts,
                SizeEigen _delta_size,
                SizeEigen _cov_size,
                SizeEigen _calib_size) :
-        data_size_(_data_size),
-        delta_size_(_delta_size),
-        cov_size_(_cov_size),
-        calib_size_(_calib_size),
         ts_(_ts)
 {
-    resize(_data_size, _delta_size, _cov_size, _calib_size);
 }
 
 Motion::~Motion()
 {
 }
 
-void Motion::resize(SizeEigen _data_s, SizeEigen _delta_s, SizeEigen _delta_cov_s, SizeEigen _calib_s)
-{
-    data_.resize(_data_s);
-    data_cov_.resize(_data_s, _data_s);
-    delta_.resize(_delta_s);
-    delta_cov_.resize(_delta_cov_s, _delta_cov_s);
-    delta_integr_.resize(_delta_s);
-    delta_integr_cov_.resize(_delta_cov_s, _delta_cov_s);
-    jacobian_delta_.resize(_delta_cov_s, _delta_cov_s);
-    jacobian_delta_integr_.resize(_delta_cov_s, _delta_cov_s);
-    jacobian_calib_.resize(_delta_cov_s, _calib_s);
-}
-
 ////////////////////////////////////////////////////////////////////////////////////////
 
 MotionBuffer::MotionBuffer()
-- 
GitLab