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

Make setVertices and computeLinearSystem public methods of FCALS

parent 06193d0a
No related branches found
No related tags found
No related merge requests found
......@@ -151,8 +151,8 @@ FootConstraintsAsLinearSystemForVelRef::setFeetDimensions( CjrlHumanoidDynamicRo
int
FootConstraintsAsLinearSystemForVelRef::setVertices( std::vector<CH_Point> & ZMPConstrVertices,
std::vector<CH_Point> & FeetPosConstrVertices,
double ZMPConvHullAngle,
double FeetPosConvHullAngle,
double & ZMPConvHullAngle,
double & FeetPosConvHullAngle,
support_state_t & PrwSupport)
{
......@@ -215,7 +215,7 @@ FootConstraintsAsLinearSystemForVelRef::setVertices( std::vector<CH_Point> & ZMP
int
FootConstraintsAsLinearSystemForVelRef::computeLinearSystem( vector<CH_Point> aVecOfPoints,
FootConstraintsAsLinearSystemForVelRef::computeLinearSystem( vector<CH_Point> & aVecOfPoints,
MAL_MATRIX(&D,double),
MAL_MATRIX(&Dc,double),
support_state_t & PrwSupport )
......@@ -308,7 +308,6 @@ FootConstraintsAsLinearSystemForVelRef::buildConstraintInequalities( deque< Foot
}
double CurrentSupportAngle = FAP_it->theta*M_PI/180.0;
//initialize the previewed support state before previewing
PrwSupport.Phase = CurrentSupport.Phase;
PrwSupport.Foot = CurrentSupport.Foot;
......@@ -337,7 +336,6 @@ FootConstraintsAsLinearSystemForVelRef::buildConstraintInequalities( deque< Foot
FPConvHullOrientation = PreviewedSupportAngles[PrwSupport.StepNumber-1];
//foot positioning constraints
//
if( PrwSupport.StateChanged && PrwSupport.StepNumber>0 && PrwSupport.Phase != 0)
{
ZMPConvHullOrientation = PreviewedSupportAngles[PrwSupport.StepNumber-1];
......
......@@ -101,6 +101,33 @@ namespace PatternGeneratorJRL
double >&PreviewedSupportAngles,
int &NbOfConstraints);
/// \brief Adapt vertices to the support foot and its orientation
///
/// \param ZMPConstrVertices vertices of the ZMP convex hull
/// \param FeetPosConstrVertices vertices of the foot position convex hull
/// \param ZMPConvHullOrientation
/// \param FeetPosConvHullOrientation
/// \param PrwSupport previewed support state
/// \return 0
int setVertices (std::vector < CH_Point > & ZMPConstrVertices,
std::vector < CH_Point > & FeetPosConstrVertices,
double & ZMPConvHullOrientation,
double & FeetPosConvHullOrientation,
support_state_t & PrwSupport);
/// \brief Compute the linear inequalities \f${\bf A}{\bf x} \geq {\bf b}\f$ associated with the
/// convex hull specified by a vector of points.
///
/// \param aVecOfPoints a vector of vertices
/// \param D left hand side of the inequalities
/// \param Dc right hand side of the inequalities
/// \param PrwSupport previewed support state
/// \return 0
int computeLinearSystem (std::vector < CH_Point > & aVecOfPoints,
MAL_MATRIX (&D, double),
MAL_MATRIX (&Dc, double),
support_state_t & PrwSupport);
/// \brief Reimplement the interface of SimplePluginManager
///
/// \param[in] Method: The method to be called.
......@@ -131,33 +158,6 @@ namespace PatternGeneratorJRL
/// return 0
int initFeetConstraints ();
/// \brief Adapt vertices to the support foot and its orientation
///
/// \param ZMPConstrVertices vertices of the ZMP convex hull
/// \param FeetPosConstrVertices vertices of the foot position convex hull
/// \param ZMPConvHullOrientation
/// \param FeetPosConvHullOrientation
/// \param PrwSupport previewed support state
/// \return 0
int setVertices (std::vector < CH_Point > &ZMPConstrVertices,
std::vector < CH_Point > &FeetPosConstrVertices,
double ZMPConvHullOrientation,
double FeetPosConvHullOrientation,
support_state_t & PrwSupport);
/// \brief Compute the linear inequalities \f${\bf A}{\bf x} \geq {\bf b}\f$ associated with the
/// convex hull specified by a vector of points.
///
/// \param aVecOfPoints a vector of vertices
/// \param D left hand side of the inequalities
/// \param Dc right hand side of the inequalities
/// \param PrwSupport previewed support state
/// \return 0
int computeLinearSystem (std::vector < CH_Point > aVecOfPoints,
MAL_MATRIX (&D, double),
MAL_MATRIX (&Dc, double),
support_state_t & PrwSupport);
//
// Private members
//
......
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