diff --git a/src/ZMPRefTrajectoryGeneration/AnalyticalMorisawaCompact.cpp b/src/ZMPRefTrajectoryGeneration/AnalyticalMorisawaCompact.cpp index 418f860f9e23609a24b30ea1697c3233675e71c6..6359a61de2f309bf59c000c54f3542e6eddb3d82 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 63a43f8aafbfcb8ee699b646320d6876d63f9949..1dfcd551c785f7982e9b0b63745ce3be912e37e1 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\