Skip to content
Snippets Groups Projects
Commit 49198fb7 authored by Andrei Herdt's avatar Andrei Herdt Committed by Olivier Stasse
Browse files

Change name of class

- FootConstraintsAsLinear... to RelativeFeetInequalities
parent 8a239ae0
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ using namespace PatternGeneratorJRL;
FootConstraintsAsLinearSystemForVelRef::FootConstraintsAsLinearSystemForVelRef( SimplePluginManager *aSPM,
RelativeFeetInequalities::RelativeFeetInequalities( SimplePluginManager *aSPM,
CjrlHumanoidDynamicRobot *aHS ) :
SimplePlugin(aSPM)
{
......@@ -66,7 +66,7 @@ FootConstraintsAsLinearSystemForVelRef::FootConstraintsAsLinearSystemForVelRef(
}
}
FootConstraintsAsLinearSystemForVelRef::~FootConstraintsAsLinearSystemForVelRef()
RelativeFeetInequalities::~RelativeFeetInequalities()
{
}
......@@ -74,7 +74,7 @@ FootConstraintsAsLinearSystemForVelRef::~FootConstraintsAsLinearSystemForVelRef(
int
FootConstraintsAsLinearSystemForVelRef::initConvexHulls()
RelativeFeetInequalities::initConvexHulls()
{
double lxcoefsRight[4] = { 1.0, 1.0, -1.0, -1.0};
......@@ -123,7 +123,7 @@ FootConstraintsAsLinearSystemForVelRef::initConvexHulls()
int
FootConstraintsAsLinearSystemForVelRef::setFeetDimensions( CjrlHumanoidDynamicRobot *aHS )
RelativeFeetInequalities::setFeetDimensions( CjrlHumanoidDynamicRobot *aHS )
{
// Read feet specificities.
......@@ -156,7 +156,7 @@ FootConstraintsAsLinearSystemForVelRef::setFeetDimensions( CjrlHumanoidDynamicRo
int
FootConstraintsAsLinearSystemForVelRef::setVertices( convex_hull_t & ConvexHull,
RelativeFeetInequalities::setVertices( convex_hull_t & ConvexHull,
double Orientation,
const support_state_t & PrwSupport,
int constraints_type)
......@@ -199,7 +199,7 @@ FootConstraintsAsLinearSystemForVelRef::setVertices( convex_hull_t & ConvexHull,
int
FootConstraintsAsLinearSystemForVelRef::computeLinearSystem( const convex_hull_t & ConvexHull,
RelativeFeetInequalities::computeLinearSystem( const convex_hull_t & ConvexHull,
MAL_MATRIX(&D,double),
MAL_MATRIX(&Dc,double),
const support_state_t & PrwSupport ) const
......@@ -259,7 +259,7 @@ FootConstraintsAsLinearSystemForVelRef::computeLinearSystem( const convex_hull_t
int
FootConstraintsAsLinearSystemForVelRef::computeLinearSystem (const convex_hull_t & ConvexHull,
RelativeFeetInequalities::computeLinearSystem (const convex_hull_t & ConvexHull,
double * D_x, double * D_y, double * d,
const support_state_t & PrwSupport) const
{
......@@ -315,7 +315,7 @@ FootConstraintsAsLinearSystemForVelRef::computeLinearSystem (const convex_hull_t
void
FootConstraintsAsLinearSystemForVelRef::CallMethod( std::string &Method, std::istringstream &Args )
RelativeFeetInequalities::CallMethod( std::string &Method, std::istringstream &Args )
{
if ( Method==":setfeetconstraint" )
......
......@@ -53,7 +53,7 @@ namespace PatternGeneratorJRL
{
/// \brief Generate a stack of inequalities relative to feet centers for the whole preview window.
class FootConstraintsAsLinearSystemForVelRef:public SimplePlugin
class RelativeFeetInequalities:public SimplePlugin
{
//
......@@ -70,9 +70,9 @@ namespace PatternGeneratorJRL
/// \name Constructors and destructors.
/// \{
FootConstraintsAsLinearSystemForVelRef (SimplePluginManager * aSPM,
RelativeFeetInequalities (SimplePluginManager * aSPM,
CjrlHumanoidDynamicRobot * aHS);
~FootConstraintsAsLinearSystemForVelRef ();
~RelativeFeetInequalities ();
/// \}
......
......@@ -360,7 +360,7 @@ namespace PatternGeneratorJRL
/*! \brief Object creating Linear inequalities constraints
based on the foot position. Those constraints are *NOT* the
one put in the QP, but they are a necessary intermediate step. */
FootConstraintsAsLinearSystemForVelRef * m_fCALS;
RelativeFeetInequalities * m_fCALS;
FootTrajectoryGenerationStandard * m_FTGS;
......
......@@ -66,7 +66,7 @@ ZMPVelocityReferencedQP::ZMPVelocityReferencedQP(SimplePluginManager *lSPM,
// For computing the equilibrium constraints from the feet positions.
RFC_ = new FootConstraintsAsLinearSystemForVelRef(lSPM,aHS);
RFC_ = new RelativeFeetInequalities(lSPM,aHS);
OFTG_ = new OnLineFootTrajectoryGeneration(lSPM,aHS->leftFoot());
OFTG_->InitializeInternalDataStructures();
......@@ -316,7 +316,8 @@ ZMPVelocityReferencedQP::OnLine(double time,
CoM_(com);
}
// UPDATE WALKING TRAJECTORIES:
// --------------------
if(time + 0.00001 > m_UpperTimeLimitToUpdate)
{
double TotalAmountOfCPUTime=0.0,CurrentCPUTime=0.0;
......@@ -324,8 +325,8 @@ ZMPVelocityReferencedQP::OnLine(double time,
gettimeofday(&start,0);
// UPDATE DATA:
// ------------
// UPDATE INTERNAL DATA:
// ---------------------
VRQPGenerator_->setReference(VelRef_);
VRQPGenerator_->setCurrentTime(time+TimeBuffer_);
VRQPGenerator_->setCoM(CoM_());
......@@ -430,15 +431,8 @@ ZMPVelocityReferencedQP::OnLine(double time,
m_UpperTimeLimitToUpdate = m_UpperTimeLimitToUpdate+QP_T_;
if(CurrentSupport.StepsLeft == 0)
m_EndingPhase = true;
// Specify that we are in the ending phase.
if (m_EndingPhase==false)
{
......@@ -449,6 +443,8 @@ ZMPVelocityReferencedQP::OnLine(double time,
}
m_UpperTimeLimitToUpdate = m_UpperTimeLimitToUpdate+QP_T_;
// Compute CPU consumption time.
gettimeofday(&end,0);
CurrentCPUTime = end.tv_sec - start.tv_sec +
......
......@@ -150,7 +150,7 @@ namespace PatternGeneratorJRL
GeneratorVelRef * VRQPGenerator_;
/// \brief Object creating linear inequalities relative to feet centers.
FootConstraintsAsLinearSystemForVelRef * RFC_;
RelativeFeetInequalities * RFC_;
/// \brief Standard polynomial trajectories for the feet.
OnLineFootTrajectoryGeneration * OFTG_;
......
......@@ -282,7 +282,7 @@ GeneratorVelRef::initializeMatrices( IntermedQPMat::dynamics_t & Dynamics)
void
GeneratorVelRef::buildInequalitiesCoP(linear_inequality_t & Inequalities,
FootConstraintsAsLinearSystemForVelRef * FCALS,
RelativeFeetInequalities * FCALS,
const std::deque< FootAbsolutePosition> & AbsoluteLeftFootPositions,
const std::deque<FootAbsolutePosition> & AbsoluteRightFootPositions,
const std::deque<support_state_t> & SupportStates_deq,
......@@ -299,7 +299,7 @@ GeneratorVelRef::buildInequalitiesCoP(linear_inequality_t & Inequalities,
FCALS->setVertices( ZMPFeasibilityEdges,
CurrentSupportAngle,
CurrentSupport,
FootConstraintsAsLinearSystemForVelRef::ZMP_CONSTRAINTS);
RelativeFeetInequalities::ZMP_CONSTRAINTS);
//set constraints for the whole preview window
double SupportAngle = CurrentSupportAngle;
......@@ -318,7 +318,7 @@ GeneratorVelRef::buildInequalitiesCoP(linear_inequality_t & Inequalities,
FCALS->setVertices( ZMPFeasibilityEdges,
SupportAngle,
PrwSupport,
FootConstraintsAsLinearSystemForVelRef::ZMP_CONSTRAINTS);
RelativeFeetInequalities::ZMP_CONSTRAINTS);
FCALS->computeLinearSystem( ZMPFeasibilityEdges, D_x, D_y, dc, PrwSupport );
......@@ -336,7 +336,7 @@ GeneratorVelRef::buildInequalitiesCoP(linear_inequality_t & Inequalities,
void
GeneratorVelRef::buildInequalitiesFeet(linear_inequality_t & Inequalities,
FootConstraintsAsLinearSystemForVelRef * FCALS,
RelativeFeetInequalities * FCALS,
const std::deque< FootAbsolutePosition> & AbsoluteLeftFootPositions,
const std::deque<FootAbsolutePosition> & AbsoluteRightFootPositions,
const std::deque<support_state_t> & SupportStates_deq,
......@@ -384,7 +384,7 @@ GeneratorVelRef::buildInequalitiesFeet(linear_inequality_t & Inequalities,
FCALS->setVertices( FootFeasibilityEdges,
SupportAngle, PrwSupport,
FootConstraintsAsLinearSystemForVelRef::FOOT_CONSTRAINTS);
RelativeFeetInequalities::FOOT_CONSTRAINTS);
FCALS->computeLinearSystem( FootFeasibilityEdges, D_x, D_y, dc, PrwSupport );
......@@ -478,7 +478,7 @@ GeneratorVelRef::buildConstraintsFeet(const linear_inequality_t & IneqFeet,
void
GeneratorVelRef::buildConstraints( QPProblem & Pb,
FootConstraintsAsLinearSystemForVelRef * FCALS,
RelativeFeetInequalities * FCALS,
const std::deque< FootAbsolutePosition> & AbsoluteLeftFootPositions,
const std::deque<FootAbsolutePosition> & AbsoluteRightFootPositions,
const std::deque<support_state_t> & SupportStates_deq,
......
......@@ -127,7 +127,7 @@ namespace PatternGeneratorJRL
/// \param[in] deqSupportStates
/// \param[in] PreviewedSupportAngles
void buildInequalitiesCoP(linear_inequality_t & Inequalities,
FootConstraintsAsLinearSystemForVelRef * FCALS,
RelativeFeetInequalities * FCALS,
const std::deque< FootAbsolutePosition> & AbsoluteLeftFootPositions,
const std::deque<FootAbsolutePosition> & AbsoluteRightFootPositions,
const std::deque<support_state_t> & deqSupportStates,
......@@ -143,7 +143,7 @@ namespace PatternGeneratorJRL
/// \param[in] deqSupportStates
/// \param[in] PreviewedSupportAngles
void buildInequalitiesFeet(linear_inequality_t & Inequalities,
FootConstraintsAsLinearSystemForVelRef * FCALS,
RelativeFeetInequalities * FCALS,
const std::deque< FootAbsolutePosition> & AbsoluteLeftFootPositions,
const std::deque<FootAbsolutePosition> & AbsoluteRightFootPositions,
const std::deque<support_state_t> & deqSupportStates,
......@@ -181,7 +181,7 @@ namespace PatternGeneratorJRL
/// \param[in] deqSupportStates
/// \param[in] PreviewedSupportAngles
void buildConstraints( QPProblem & Pb,
FootConstraintsAsLinearSystemForVelRef * FCALS,
RelativeFeetInequalities * FCALS,
const std::deque< FootAbsolutePosition> & AbsoluteLeftFootPositions,
const std::deque<FootAbsolutePosition> & AbsoluteRightFootPositions,
const std::deque<support_state_t> & deqSupportStates,
......
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