From 1f8f772408d48642f8c844217189d7b210bf3c30 Mon Sep 17 00:00:00 2001
From: mnaveau <maximilien.naveau@laas.fr>
Date: Wed, 23 Mar 2016 10:53:13 +0100
Subject: [PATCH] put back the huge weight on the zmp : less constraint active
 and less computationnal expensive

---
 src/ZMPRefTrajectoryGeneration/ZMPVelocityReferencedSQP.cpp | 4 ++--
 src/ZMPRefTrajectoryGeneration/nmpc_generator.cpp           | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/ZMPRefTrajectoryGeneration/ZMPVelocityReferencedSQP.cpp b/src/ZMPRefTrajectoryGeneration/ZMPVelocityReferencedSQP.cpp
index 33d89691..0c3e51f4 100644
--- a/src/ZMPRefTrajectoryGeneration/ZMPVelocityReferencedSQP.cpp
+++ b/src/ZMPRefTrajectoryGeneration/ZMPVelocityReferencedSQP.cpp
@@ -63,8 +63,8 @@ ZMPRefTrajectoryGeneration(SPM),OFTG_(NULL),dynamicFilter_(NULL),CurrentIndexUpp
   SQP_N_ = 16 ;
   SQP_nf_ = 2 ;
   m_SamplingPeriod = 0.005 ;
-  //outputPreviewDuration_ = m_SamplingPeriod ;
-  outputPreviewDuration_ = SQP_T_ ;
+  outputPreviewDuration_ = m_SamplingPeriod ;
+  //outputPreviewDuration_ = SQP_T_ ;
 
   // Generator Management
   InterpolationPeriod_ = m_SamplingPeriod*7;
diff --git a/src/ZMPRefTrajectoryGeneration/nmpc_generator.cpp b/src/ZMPRefTrajectoryGeneration/nmpc_generator.cpp
index 54552f92..83000647 100644
--- a/src/ZMPRefTrajectoryGeneration/nmpc_generator.cpp
+++ b/src/ZMPRefTrajectoryGeneration/nmpc_generator.cpp
@@ -212,8 +212,8 @@ void NMPCgenerator::initNMPCgenerator(support_state_t & currentSupport,
   T_ = T ;
   Tfirst_ = T ;
   T_step_ = T_step ;
-  alpha_ = 1 ;// 1     ; // weight for CoM velocity tracking  : 0.5 * a ; 2.5
-  beta_  = 1 ;// 1     ; // weight for ZMP reference tracking : 0.5 * b ; 1e+03
+  alpha_ = 5 ;// 1     ; // weight for CoM velocity tracking  : 0.5 * a ; 2.5
+  beta_  = 1e+03 ;// 1     ; // weight for ZMP reference tracking : 0.5 * b ; 1e+03
   gamma_ = 1e-05 ;// 1e-05 ; // weight for jerk minimization      : 0.5 * c ; 1e-04
   SecurityMarginX_ = 0.09 ;
   SecurityMarginY_ = 0.05 ;
-- 
GitLab