Skip to content
Snippets Groups Projects
Commit 76e32bee authored by Andrei Herdt's avatar Andrei Herdt
Browse files

Clean up

parent 136dc7de
No related branches found
No related tags found
No related merge requests found
......@@ -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_;
......
......@@ -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 );
......
......@@ -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;
......
......@@ -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
///
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment