diff --git a/src/PreviewControl/SupportFSM.h b/src/PreviewControl/SupportFSM.h index 2b1ca7083923b19e65193879ab737dff11a6bfbb..32d6456dac37882816131b34b6024816d3ecea2f 100644 --- a/src/PreviewControl/SupportFSM.h +++ b/src/PreviewControl/SupportFSM.h @@ -129,7 +129,7 @@ namespace PatternGeneratorJRL int NbStepsAfterRotation_; /// \brief Current support foot type (SS, DS) - FootType CurrentSupportFoot_; + foot_type_e CurrentSupportFoot_; /// \brief True if the end phase of the rotation has begun bool PostRotationPhase_; diff --git a/src/ZMPRefTrajectoryGeneration/ZMPVelocityReferencedQP.cpp b/src/ZMPRefTrajectoryGeneration/ZMPVelocityReferencedQP.cpp index 6587256fca7c3a78ef19ebf0cb54b478d1c59c11..753e530d4d3bc01b6238ab9f52f318128659f598 100644 --- a/src/ZMPRefTrajectoryGeneration/ZMPVelocityReferencedQP.cpp +++ b/src/ZMPRefTrajectoryGeneration/ZMPVelocityReferencedQP.cpp @@ -353,14 +353,11 @@ ZMPVelocityReferencedQP::OnLine(double Time, // --------------------- Problem_.reset(); Solution_.reset(); - - VRQPGenerator_->CurrentTime( Time ); VelRef_=NewVelRef_; - SupportFSM_->update_vel_reference(VelRef_, IntermedData_->SupportState()); IntermedData_->Reference( VelRef_ ); - IntermedData_->CoM( CoM_() );// TODO: still necessary? + IntermedData_->CoM( CoM_() ); // PREVIEW SUPPORT STATES FOR THE WHOLE PREVIEW WINDOW: @@ -407,11 +404,8 @@ ZMPVelocityReferencedQP::OnLine(double Time, // SOLVE PROBLEM: // -------------- - - if (Solution_.useWarmStart){ + if (Solution_.useWarmStart) VRQPGenerator_->computeWarmStart(Solution_); - } - Problem_.solve(QPProblem_s::QLD, Solution_, QPProblem_s::NONE ); if(Solution_.Fail>0) Problem_.dump( Time ); diff --git a/src/ZMPRefTrajectoryGeneration/generator-vel-ref.cpp b/src/ZMPRefTrajectoryGeneration/generator-vel-ref.cpp index 843d342ebedc39f0fc3038ff258b589d5cda3a95..71756488c78b12d196b8fc3b933aac6b9a4e7ec0 100755 --- a/src/ZMPRefTrajectoryGeneration/generator-vel-ref.cpp +++ b/src/ZMPRefTrajectoryGeneration/generator-vel-ref.cpp @@ -566,7 +566,7 @@ void GeneratorVelRef::computeWarmStart( solution_t & Solution){ Solution.initialSolution.resize(2*N+2*M); // Current support state - FootType CurrentSupportFoot = Solution.SupportStates_deq[0].Foot; + foot_type_e CurrentSupportFoot = Solution.SupportStates_deq[0].Foot; double currentSupportFoot_x = Solution.SupportStates_deq[0].X; double currentSupportFoot_y = Solution.SupportStates_deq[0].Y; double currentYaw = Solution.SupportStates_deq[0].Yaw; diff --git a/src/ZMPRefTrajectoryGeneration/generator-vel-ref.hh b/src/ZMPRefTrajectoryGeneration/generator-vel-ref.hh index 86fd05871f6fd0558ce52042d4333244d11bb97e..5207bcc0c0f1255ac4a8a5e52619f9d7c3e2d603 100644 --- a/src/ZMPRefTrajectoryGeneration/generator-vel-ref.hh +++ b/src/ZMPRefTrajectoryGeneration/generator-vel-ref.hh @@ -45,7 +45,7 @@ namespace PatternGeneratorJRL { - + /// \brief Generate optimization problem as proposed in Herdt2010IROS class GeneratorVelRef : public MPCTrajectoryGeneration { @@ -180,7 +180,7 @@ namespace PatternGeneratorJRL /// \param[in] NbStepsPreviewed /// \param[out] Pb void build_constraints_cop( const linear_inequality_t & IneqCoP, unsigned int NbStepsPreviewed, - QPProblem & Pb ); + QPProblem & Pb ); /// \brief Compute feet constraints corresponding to the set of inequalities /// diff --git a/src/privatepgtypes.h b/src/privatepgtypes.h index 268ea23099ff3be42e5586c16b2f31b96b31db83..c62248e227aacc8faae343550cbfd7adfdf3b568 100644 --- a/src/privatepgtypes.h +++ b/src/privatepgtypes.h @@ -170,7 +170,7 @@ namespace PatternGeneratorJRL void resize( int NbRows, int NbCols, bool Preserve ); }; - enum FootType + enum foot_type_e { LEFT, RIGHT }; @@ -187,7 +187,7 @@ namespace PatternGeneratorJRL /// \brief Support phase PhaseType Phase; /// \brief Support foot - FootType Foot; + foot_type_e Foot; /// \brief Number steps left before double support unsigned int NbStepsLeft; /// \brief Number of step previewed