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

A time scaling with torque/contact constraints. More...

#include <ContactTimeScaling.h>

Inheritance diagram for ContactTimeScaling:
CustomTimeScaling

Public Member Functions

 ContactTimeScaling (Robot &robot)
 
bool SetParams (const MultiPath &path, const vector< Real > &colocationParams, int numFCEdges=4)
 
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

Real torqueLimitShift
 offsets the torque limits by a fixed amount (default 0)
 
Real torqueLimitScale
 from 0 to 1, scales the torque limits (default 1)
 
Real frictionRobustness
 from 0 to 1, indicates the amount of increased robustness in friction cones (default 0)
 
Real forceRobustness
 >= 0, indicates the absolute margin for forces to be contained within the friction cone
 
- 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 torque/contact constraints.

Uses dynamic equation B(q)*q''+C(q,q')+G(q) = t+J^T(q)*f |t| <= tmax f FC with f being the contact forces, J being the jacobian of the contact points, tmax being the torque limits, and FC being the (polygonalized) friction cones.

Can shift/scale torque limits, reduce the friction coefficients, and add a robustness margin to the friction cones.

Member Function Documentation

bool ContactTimeScaling::SetParams ( const MultiPath path,
const vector< Real > &  colocationParams,
int  numFCEdges = 4 
)

Uses the stances inside the multipath to determine the contacts. Discretizes friction cone into pyramid with numFCEdges edges.


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