From 73cca75ba5497f0b3b3d5510011859e1d5dea9cd Mon Sep 17 00:00:00 2001
From: paleziart <paleziart@laas.fr>
Date: Tue, 13 Apr 2021 10:23:06 +0200
Subject: [PATCH] Move a few lines to fix compilation warnings

---
 include/qrw/FootTrajectoryGenerator.hpp | 6 +++---
 include/qrw/FootstepPlanner.hpp         | 2 +-
 src/FootTrajectoryGenerator.cpp         | 2 +-
 src/FootstepPlanner.cpp                 | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/qrw/FootTrajectoryGenerator.hpp b/include/qrw/FootTrajectoryGenerator.hpp
index 84bc9801..83beef94 100644
--- a/include/qrw/FootTrajectoryGenerator.hpp
+++ b/include/qrw/FootTrajectoryGenerator.hpp
@@ -74,21 +74,21 @@ public:
     MatrixN getFootAcceleration() { return acceleration_; }  ///< Get the next foot acceleration
 
 private:
+    std::shared_ptr<Gait> gait_;         ///< Target lock before the touchdown
     double dt_tsid;     ///<
     int k_mpc;          ///<
     double maxHeight_;  ///< Apex height of the swinging trajectory
     double lockTime_;   ///< Target lock before the touchdown
-    std::shared_ptr<Gait> gait_;         ///< Target lock before the touchdown
 
     std::vector<int> feet;
     Vector4 t0s;
     Vector4 t_swing;
 
+    Matrix34 targetFootstep_;  // Target for the X component
+
     Matrix64 Ax;  ///< Coefficients for the X component
     Matrix64 Ay;  ///< Coefficients for the Y component
 
-    Matrix34 targetFootstep_;  // Target for the X component
-
     Matrix34 position_;      // position computed in updateFootPosition
     Matrix34 velocity_;      // velocity computed in updateFootPosition
     Matrix34 acceleration_;  // acceleration computed in updateFootPosition
diff --git a/include/qrw/FootstepPlanner.hpp b/include/qrw/FootstepPlanner.hpp
index 9cc91060..de7b2219 100644
--- a/include/qrw/FootstepPlanner.hpp
+++ b/include/qrw/FootstepPlanner.hpp
@@ -42,7 +42,7 @@ public:
     ///
     ////////////////////////////////////////////////////////////////////////////////////////////////
     void initialize(double dt_in,
-                    double k_mpc_in,
+                    int k_mpc_in,
                     double T_mpc_in,
                     double h_ref_in,
                     Matrix34 const& shouldersIn,
diff --git a/src/FootTrajectoryGenerator.cpp b/src/FootTrajectoryGenerator.cpp
index d8350bdc..8c21a1b9 100644
--- a/src/FootTrajectoryGenerator.cpp
+++ b/src/FootTrajectoryGenerator.cpp
@@ -31,7 +31,7 @@ void FootTrajectoryGenerator::initialize(double const maxHeightIn,
     dt_tsid = dt_tsid_in;
     k_mpc = k_mpc_in;
     maxHeight_ = maxHeightIn;
-    lockTime_ = lockTime_;
+    lockTime_ = lockTimeIn;
     targetFootstep_ = targetFootstepIn;
     position_ = initialFootPosition;
     gait_ = gaitIn;
diff --git a/src/FootstepPlanner.cpp b/src/FootstepPlanner.cpp
index 440b6ef7..29fe8819 100644
--- a/src/FootstepPlanner.cpp
+++ b/src/FootstepPlanner.cpp
@@ -22,7 +22,7 @@ FootstepPlanner::FootstepPlanner()
 }
 
 void FootstepPlanner::initialize(double dt_in,
-                                 double k_mpc_in,
+                                 int k_mpc_in,
                                  double T_mpc_in,
                                  double h_ref_in,
                                  Matrix34 const& shouldersIn,
-- 
GitLab