Klamp't  0.8.1
Public Member Functions | Public Attributes | List of all members
ZMPTimeScaling Class Reference

A time scaling with Zero Moment Point constraints. Each section of the multipath corresponds with one of the support polygons. More...

#include <ContactTimeScaling.h>

Inheritance diagram for ZMPTimeScaling:
CustomTimeScaling

Public Member Functions

 ZMPTimeScaling (Robot &robot)
 
void SetParams (const MultiPath &path, const vector< Real > &colocationParams, const vector< ConvexPolygon2D > &supportPolys, const vector< Real > &groundHeights)
 Sets a multi-stance ZMP optimization problem.
 
void SetParams (const MultiPath &path, const vector< Real > &colocationParams, const vector< Vector2 > &supportPoly, Real groundHeight=0)
 1-stance convenience version of the above
 
bool Check (const MultiPath &path)
 double-check whether the solution is actually feasible
 
- Public Member Functions inherited from CustomTimeScaling
 CustomTimeScaling (Robot &robot)
 
void SetPath (const GeneralizedCubicBezierSpline &path, const vector< Real > &colocationParams)
 Sets up the path.
 
void SetPath (const MultiPath &path, const vector< Real > &colocationParams)
 Sets up the path – multipath version.
 
void SetStartStop ()
 Sets up the path to start and stop at zero velocity.
 
void SetDefaultBounds ()
 Sets up velocity and acceleration bounds.
 
bool Optimize ()
 Runs the optimizer with the custom constraints.
 
bool IsFeasible (const vector< Real > &ds) const
 Returns true if the time scaling derivatives are feasible under the current constraints.
 
void PrintActiveConstraints (ostream &out)
 After running Optimize, prints out all the active constraints.
 

Public Attributes

vector< ConvexPolygon2D > supportPolys
 
vector< Real > groundHeights
 
- Public Attributes inherited from CustomTimeScaling
RobotCSpace cspace
 
TimeScaledBezierCurve traj
 Output trajectory.
 
vector< Real > paramDivs
 colocation grid
 
vector< int > paramSections
 index from grid to section of multipath, if multipath is given
 
vector< Vector > xs
 colocation points
 
vector< Vector > dxs
 
vector< Vector > ddxs
 
vector< Real > dsmax
 time scaling maxima. Defaults to Inf
 
vector< vector< Vector2 > > ds2ddsConstraintNormals
 
vector< vector< Real > > ds2ddsConstraintOffsets
 
bool saveConstraintNames
 Names of each constraint plane.
 
vector< vector< string > > ds2ddsConstraintNames
 
bool computeLagrangeMultipliers
 Whether the lagrange multipliers of a solution are requested.
 
vector< Real > variableLagrangeMultipliers
 
vector< vector< Real > > constraintLagrangeMultipliers
 

Detailed Description

A time scaling with Zero Moment Point constraints. Each section of the multipath corresponds with one of the support polygons.

Assuming no change in angular momentum and no z acceleration of the CM, the ZMP is given by Zx = Cx - Cz/g Cx'' Zy = Cy - Cz/g Cy'' Where Cz is the height of the CM over the ground plane, and (Cx,Cy) are its x-y coordinates. CM(q) => CM'(q) = dCM/dq(q)*q' => CM''(q) = q'^T ddCM/ddq(q)*q' + dCM/dq(q)*q''

For motions with more complex contact formations, use ContactTimeScaling.


The documentation for this class was generated from the following file: