Walk motion generator for humanoid legged robot. More...
#include <hpp/walkgen/bspline-based.hh>
Classes | |
struct | BoundaryCondition |
Public Types | |
typedef std::vector< PiecewisePoly3 > | ZmpTrajectory_t |
typedef std::vector< ZmpTrajectory_t > | ZmpTrajectories_t |
typedef std::vector< BoundaryCondition, Eigen::aligned_allocator< BoundaryCondition > > | BoundaryConditions_t |
typedef std::vector< value_type > | StepHeights_t |
Public Member Functions | |
void | timeSequence (const Times_t ×) |
set time sequence More... | |
const Times_t & | timeSequence () const |
get time sequence More... | |
void | footPrintSequence (const FootPrints_t &footPrints) |
set sequence of foot prints More... | |
const FootPrints_t & | footPrintSequence () const |
get sequence of foot prints More... | |
void | defaultStepHeight (const value_type &stepHeight) |
Set default step height. More... | |
const value_type & | defaultStepHeight () const |
Get default step height. More... | |
void | stepHeights (const StepHeights_t &stepHeights) |
Set sequence of step heights. More... | |
const StepHeights_t & | stepHeights () const |
Get sequence of step heights. More... | |
void | zmpRefBoundaryConditions (const vector2_t &init, const vector2_t &end) |
Specify zmpref boundary conditions. More... | |
void | add (const BoundaryCondition &boundaryCondition) |
Add a boundary condition on center of mass trajectory. More... | |
void | setInitialComState (const vector2_t &position, const vector2_t &velocity) |
Set initial position and velocity of center of mass. More... | |
void | setEndComState (const vector2_t &position, const vector2_t &velocity) |
Set final position and velocity of center of mass. More... | |
CubicBSplinePtr_t | solve () const |
Solve quadratic program and return resulting cubic B spline. More... | |
const PathVectorPtr_t & | leftFootTrajectory () const |
Get trajectory of left foot. More... | |
const PathVectorPtr_t & | rightFootTrajectory () const |
Get trajectory of right foot. More... | |
DevicePtr_t | leftFoot () const |
DevicePtr_t | rightFoot () const |
const ZmpTrajectory_t & | zmpRefx () const |
Getter to representation of zmp ref abscissa. More... | |
const ZmpTrajectory_t & | zmpRefy () const |
Getter to representation of zmp ref abscissa. More... | |
value_type | cost (const vector_t &controlPoints) |
Compute the cost of a com trajectory defined by way points. More... | |
value_type | cost () const |
Compute the cost of the current com trajectory. More... | |
const ZmpTrajectories_t & | zmpBasisFunctions () const |
Get base functions of Zmp. More... | |
Static Public Member Functions | |
static SplineBasedPtr_t | create (const value_type &height) |
Create instance and return shared pointer. More... | |
static value_type | integral (value_type lower, value_type upper, const PiecewisePoly3 &P1, const PiecewisePoly3 &P2) |
Static Public Attributes | |
static EIGEN_MAKE_ALIGNED_OPERATOR_NEW value_type | gravity = 9.81 |
static size_type | l = 3 |
Protected Member Functions | |
SplineBased (const value_type &height) | |
Constructor. More... | |
void | init (const SplineBasedWkPtr_t &self) |
initialization Store weak pointer to instance More... | |
void | computeFootTrajectory () const |
Compute trajectory of the feet. More... | |
Walk motion generator for humanoid legged robot.
This class computes the reference trajectory of the center of mass of a humanoid robot, given as input a list of time-stamped foot-prints.
The trajectory of the center of mass is obtained by optimization for the linear so called table cart model.
typedef std::vector<BoundaryCondition, Eigen::aligned_allocator <BoundaryCondition> > hpp::walkgen::SplineBased::BoundaryConditions_t |
typedef std::vector<value_type> hpp::walkgen::SplineBased::StepHeights_t |
typedef std::vector<ZmpTrajectory_t> hpp::walkgen::SplineBased::ZmpTrajectories_t |
typedef std::vector<PiecewisePoly3> hpp::walkgen::SplineBased::ZmpTrajectory_t |
|
protected |
void hpp::walkgen::SplineBased::add | ( | const BoundaryCondition & | boundaryCondition | ) |
Add a boundary condition on center of mass trajectory.
t | time when position of center of mass is constrained, |
position | required position of the center of mass. |
|
protected |
Compute trajectory of the feet.
Swap the foot
Check if this step was the last one
References hpp::core::PathVector::create(), hpp::walkgen::Step::create(), and hpp::walkgen::SupportFoot::create().
Referenced by solve().
value_type hpp::walkgen::SplineBased::cost | ( | const vector_t & | controlPoints | ) |
Compute the cost of a com trajectory defined by way points.
References cost().
value_type hpp::walkgen::SplineBased::cost | ( | ) | const |
Compute the cost of the current com trajectory.
References gravity, and integral().
|
static |
Create instance and return shared pointer.
height | height of the center of mass |
References init(), and SplineBased().
|
inline |
Set default step height.
|
inline |
Get default step height.
void hpp::walkgen::SplineBased::footPrintSequence | ( | const FootPrints_t & | footPrints | ) |
set sequence of foot prints
footPrints | a vector of foot prints |
References l.
|
inline |
get sequence of foot prints
|
protected |
initialization Store weak pointer to instance
Referenced by create().
|
static |
References assert(), hppDout, l, hpp::walkgen::PiecewisePoly3::lower, and hpp::walkgen::PiecewisePoly3::upper.
Referenced by cost().
|
inline |
|
inline |
Get trajectory of left foot.
Method solve should have been called first
|
inline |
|
inline |
Get trajectory of right foot.
Method solve should have been called first
void hpp::walkgen::SplineBased::setEndComState | ( | const vector2_t & | position, |
const vector2_t & | velocity | ||
) |
Set final position and velocity of center of mass.
position | position of the center of mass at end ![]() |
velocity | velocity of the center of mass at start ![]() |
References assert(), roboptim::trajectory::Polynomial< N >::derivative(), and gravity.
void hpp::walkgen::SplineBased::setInitialComState | ( | const vector2_t & | position, |
const vector2_t & | velocity | ||
) |
Set initial position and velocity of center of mass.
position | position of the center of mass at start ![]() |
velocity | velocity of the center of mass at start ![]() |
CubicBSplinePtr_t hpp::walkgen::SplineBased::solve | ( | ) | const |
Solve quadratic program and return resulting cubic B spline.
References computeFootTrajectory(), cost(), HPP_DEBUG_SVDCHECK, and hppDout.
|
inline |
Set sequence of step heights.
stepHeights | sequence of step heights |
|
inline |
Get sequence of step heights.
void hpp::walkgen::SplineBased::timeSequence | ( | const Times_t & | times | ) |
set time sequence
times | sequence of times corresponding to support phases. |
|
inline |
get time sequence
|
inline |
Get base functions of Zmp.
References init().
|
inline |
Getter to representation of zmp ref abscissa.
|
inline |
Getter to representation of zmp ref abscissa.
References hpp::walkgen::PiecewisePoly3::lower, and hpp::walkgen::PiecewisePoly3::upper.
|
static |
Referenced by cost(), and setEndComState().
|
static |
Referenced by footPrintSequence(), and integral().