From 63e79c148773af03803f4237bb041c79a77ee79b Mon Sep 17 00:00:00 2001
From: Jeremie Deray <jeremie.deray@pal-robotics.com>
Date: Sat, 15 Oct 2016 14:14:59 +0200
Subject: [PATCH] Motion class explicit default constructor & full args
 constuctor

---
 src/motion_buffer.h | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/src/motion_buffer.h b/src/motion_buffer.h
index db0e34654..c5a7e5288 100644
--- a/src/motion_buffer.h
+++ b/src/motion_buffer.h
@@ -16,12 +16,25 @@ namespace wolf {
 
 struct Motion
 {
-    public:
-        TimeStamp ts_;                      ///< Time stamp
-        Eigen::VectorXs delta_;             ///< instantaneous motion delta
-        Eigen::VectorXs delta_integr_;      ///< the integrated motion or delta-integral
-        Eigen::MatrixXs delta_cov_;         ///< covariance of the instantaneous delta
-        Eigen::MatrixXs delta_integr_cov_;  ///< covariance of the integrated delta
+public:
+
+  Motion() = default;
+
+  Motion(const TimeStamp& _time_stamp,
+         const Eigen::VectorXs& _delta,     const Eigen::VectorXs& _delta_integr,
+         const Eigen::MatrixXs& _delta_cov, const Eigen::MatrixXs& _delta_integr_cov) :
+    ts_(_time_stamp),
+    delta_(_delta), delta_integr_(_delta_integr),
+    delta_cov_(_delta_cov), delta_integr_cov_(_delta_integr_cov)
+  {
+    //
+  }
+
+  TimeStamp ts_;                      ///< Time stamp
+  Eigen::VectorXs delta_;             ///< instantaneous motion delta
+  Eigen::VectorXs delta_integr_;      ///< the integrated motion or delta-integral
+  Eigen::MatrixXs delta_cov_;         ///< covariance of the instantaneous delta
+  Eigen::MatrixXs delta_integr_cov_;  ///< covariance of the integrated delta
 }; ///< One instance of the buffered data, corresponding to a particular time stamp.
 
 
-- 
GitLab