From d64301f1b93771ae277ada9fb505b4c8793641e3 Mon Sep 17 00:00:00 2001
From: Olivier Stasse <olivier.stasse@gmail.com>
Date: Thu, 2 Oct 2014 16:20:41 +0200
Subject: [PATCH] To make it feasible by the robot, the step have to be two
 times slower.

---
 .../AnalyticalMorisawaCompact.cpp                 |  3 ++-
 tests/TestMorisawa2007.cpp                        | 15 +++++++++++++--
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/src/ZMPRefTrajectoryGeneration/AnalyticalMorisawaCompact.cpp b/src/ZMPRefTrajectoryGeneration/AnalyticalMorisawaCompact.cpp
index 418f860f..6359a61d 100644
--- a/src/ZMPRefTrajectoryGeneration/AnalyticalMorisawaCompact.cpp
+++ b/src/ZMPRefTrajectoryGeneration/AnalyticalMorisawaCompact.cpp
@@ -2867,7 +2867,7 @@ new step has to be generate.
     double upRight1 = 0.9 ,upLeft1 = 0.0;
     double up_a=0.0, up_b=0.0;
 
-    double down = 0.3, downRight =0.9, downLeft = 0.0;
+    double down = 0.5, downRight =0.9, downLeft = 0.0;
     double down_a=0.0, down_b=0.0;
 
     if (t>moving_time){ // we start analyze since 2nd step
@@ -2961,6 +2961,7 @@ new step has to be generate.
         else if (m_AbsoluteSupportFootPositions[Index].z == m_AbsoluteSupportFootPositions[Index-1].z && 
                  m_RelativeFootPositions[Index-1].sz < 0) //second leg
         {
+
           deltaZ = -(m_AbsoluteSupportFootPositions[Index-2].z - m_AbsoluteSupportFootPositions[Index].z );
           if (t <= Index*moving_time + m_RelativeFootPositions[Index].SStime )
             CoMz = (t-Index*moving_time)*(1-down)*deltaZ/(m_RelativeFootPositions[Index].SStime) +  
diff --git a/tests/TestMorisawa2007.cpp b/tests/TestMorisawa2007.cpp
index 63a43f8a..1dfcd551 100644
--- a/tests/TestMorisawa2007.cpp
+++ b/tests/TestMorisawa2007.cpp
@@ -784,6 +784,7 @@ protected:
       aPGI.ParseCmd(strm2);
     }
 
+
     {
      istringstream strm2(":stepstairseq 0.0 -0.105 0.0 0.0\
                                         0.32 0.19 -0.15 0.0\
@@ -806,11 +807,21 @@ protected:
       aPGI.ParseCmd(strm2);
     }
 
+    {
+      istringstream strm2(":singlesupporttime 1.4");
+      aPGI.ParseCmd(strm2);
+    }
+
+    {
+      istringstream strm2(":doublesupporttime 0.2");
+      aPGI.ParseCmd(strm2);
+    }
+
     {
       istringstream strm2(":stepstairseq 0.0 -0.105 0.0 0.0\
-                                        0.3 0.19 0.05 0.0\
+                                        0.25 0.19 0.05 0.0\
                                         0.2 -0.19 0.05 0.0\
-                                        0.2 0.19 0.05 0.0\
+                                        0.25 0.19 0.05 0.0\
                                         0.2 -0.19 0.05 0.0\
                                         0.2 0.19 0.0 0.0\
                                         0.2 -0.19 -0.05 0.0\
-- 
GitLab