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

A configuration space that constrains a robot to the IK constraints in a stance, and checks for stability against gravity. More...

#include <StanceCSpace.h>

Inheritance diagram for StanceCSpace:
ContactCSpace SingleRobotCSpace RobotCSpace

Public Member Functions

 StanceCSpace (RobotWorld &world, int index, WorldPlannerSettings *settings)
 
 StanceCSpace (const SingleRobotCSpace &space)
 
 StanceCSpace (const StanceCSpace &space)
 
void SetStance (const Stance &s)
 Sets the current stance for this space.
 
void SetHold (const Hold &h)
 Adds the given hold to the space's stance.
 
void CalculateSP ()
 Calculates the support polygon for faster equilibrium testing.
 
void SetSPMargin (Real margin)
 Enables robust equilbrium solving by shrinking the margin.
 
void InitTorqueSolver ()
 
bool CheckRBStability (const Config &x)
 
bool CheckTorqueStability (const Config &x)
 
- Public Member Functions inherited from ContactCSpace
 ContactCSpace (RobotWorld &world, int index, WorldPlannerSettings *settings)
 
 ContactCSpace (const SingleRobotCSpace &space)
 
 ContactCSpace (const ContactCSpace &space)
 
virtual void Sample (Config &q)
 
virtual void SampleNeighborhood (const Config &c, Real r, Config &q)
 
virtual void Interpolate (const Config &x, const Config &y, Real u, Config &out)
 
virtual EdgePlannerPtr PathChecker (const Config &a, const Config &b)
 
virtual void Properties (PropertyMap &)
 
void AddContact (const IKGoal &goal)
 
void AddContact (int link, const Vector3 &localPos, const Vector3 &worldPos)
 
void AddContact (int link, const vector< Vector3 > &localPos, const vector< Vector3 > &worldPos)
 
void RemoveContact (int link)
 
bool SolveContact (int numIters=0, Real tol=0)
 
Real ContactDistance ()
 
Real ContactDistance (const Config &q)
 Same as ContactDistance(). Note: sets the robot's configuration to q.
 
bool CheckContact (Real dist=0)
 Checks whether the contact constraints are satisfied at the robot's. More...
 
bool CheckContact (const Config &q, Real dist=0)
 Same as CheckContact(Real). Note: sets the robot's configuration to q.
 
- Public Member Functions inherited from SingleRobotCSpace
 SingleRobotCSpace (RobotWorld &world, int index, WorldPlannerSettings *settings)
 
 SingleRobotCSpace (const SingleRobotCSpace &space)
 
void FixDof (int dof, Real value)
 Fixes a single DOF to a given value.
 
void IgnoreCollisions (int a, int b)
 Ignores collisions between world ID a and world ID b.
 
void Init ()
 
virtual bool IsFeasible (const Config &x)
 
virtual EdgePlannerPtr PathChecker (const Config &a, const Config &b, int obstacle)
 
virtual void GetJointLimits (Vector &bmin, Vector &bmax)
 
bool UpdateGeometry (const Config &x)
 
bool CheckJointLimits (const Config &x)
 
bool CheckCollisionFree (const Config &x)
 
- Public Member Functions inherited from RobotCSpace
 RobotCSpace (Robot &robot)
 
 RobotCSpace (const RobotCSpace &space)
 
virtual int NumDimensions ()
 
virtual string VariableName (int i)
 
virtual Real Distance (const Config &x, const Config &y)
 
virtual void InterpolateDeriv (const Config &a, const Config &b, Real u, Vector &dx)
 
virtual void InterpolateDerivA (const Config &a, const Config &b, Real u, const Vector &da, Vector &dx)
 
virtual void InterpolateDerivB (const Config &a, const Config &b, Real u, const Vector &db, Vector &dx)
 
virtual void InterpolateDeriv2 (const Config &a, const Config &b, Real u, Vector &ddx)
 
virtual void Integrate (const Config &a, const Vector &da, Config &b)
 

Public Attributes

Stance stance
 
Vector3 gravity
 
int numFCEdges
 
bool spCalculated
 
Real spMargin
 
SupportPolygon sp
 
ContactFormation formation
 
TorqueSolver torqueSolver
 
- Public Attributes inherited from ContactCSpace
vector< IKGoal > contactIK
 
int numSolveContact
 
double solveContactTime
 
- Public Attributes inherited from SingleRobotCSpace
RobotWorldworld
 
int index
 
WorldPlannerSettingssettings
 
vector< pair< int, int > > collisionPairs
 
vector< Geometry::AnyCollisionQuery > collisionQueries
 
vector< int > fixedDofs
 
vector< Real > fixedValues
 
vector< pair< int, int > > ignoreCollisions
 
bool constraintsDirty
 
- Public Attributes inherited from RobotCSpace
Robotrobot
 
Real norm
 
vector< Real > jointWeights
 
Real floatingRotationWeight
 
vector< Real > jointRadiusScale
 
Real floatingRotationRadiusScale
 

Detailed Description

A configuration space that constrains a robot to the IK constraints in a stance, and checks for stability against gravity.

The kinematic contraints of contact are handled by the ContactCSpace superclass. Collisions are handled by the SingleRobotCSpace2 superclass of ContactCSpace.

This class adds the functionality of testing two stability conditions:

This supports from-scratch testing of RB equilibrium or batch testing using the SupportPolygon class by calling CalculateSP(). The latter is more expensive at first but each IsFeasible call will be faster.

Uing support polygons you can modify the margin using SetSPMargin().

Member Function Documentation

bool StanceCSpace::CheckRBStability ( const Config &  x)

Check if the current robot COM satisfies rigid body equilibrium NOTE: x is ignored

bool StanceCSpace::CheckTorqueStability ( const Config &  x)

Check if the current robot configuration satisfies articulated robot equilibrium with torque limits NOTE: x is ignored

void StanceCSpace::InitTorqueSolver ( )

Initializes the torque solver. This is done automatically, and you only should use this if you are modifying the torque solver's parameters


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