File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -666,7 +666,9 @@ bool TrajectoryGenerator::getIsStancePhase(std::vector<bool>& isStancePhase)
666666 {
667667 // decreased the counter only if it is different from zero.
668668 // it is required to add a delay in the beginning of the stance phase
669- stancePhaseDelayCounter = stancePhaseDelayCounter == 0 ? 0 : stancePhaseDelayCounter--;
669+ stancePhaseDelayCounter = (stancePhaseDelayCounter == 0 )
670+ ? 0
671+ : (stancePhaseDelayCounter - 1 );
670672
671673 // the delay expired the robot can be considered stance
672674 if (stancePhaseDelayCounter == 0 )
Original file line number Diff line number Diff line change @@ -84,6 +84,9 @@ bool WalkingModule::advanceReferenceSignals()
8484 m_comHeightVelocity.pop_front ();
8585 m_comHeightVelocity.push_back (m_comHeightVelocity.back ());
8686
87+ m_isStancePhase.pop_front ();
88+ m_isStancePhase.push_back (m_isStancePhase.back ());
89+
8790 // at each sampling time the merge points are decreased by one.
8891 // If the first merge point is equal to 0 it will be dropped.
8992 // A new trajectory will be merged at the first merge point or if the deque is empty
You can’t perform that action at this time.
0 commit comments