Klamp't
0.9.0
|
A configuration space that constrains a robot to the IK constraints in a stance, and checks for stability against gravity. More...
#include <StanceCSpace.h>
Public Member Functions | |
StanceCSpace (WorldModel &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 Klampt::ContactCSpace | |
ContactCSpace (WorldModel &world, int index, WorldPlannerSettings *settings) | |
ContactCSpace (const SingleRobotCSpace &space) | |
ContactCSpace (const ContactCSpace &space) | |
virtual void | Sample (Config &q) override |
virtual void | SampleNeighborhood (const Config &c, Real r, Config &q) override |
virtual void | Interpolate (const Config &x, const Config &y, Real u, Config &out) override |
virtual EdgePlannerPtr | PathChecker (const Config &a, const Config &b) override |
virtual void | Properties (PropertyMap &) override |
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 Klampt::SingleRobotCSpace | |
SingleRobotCSpace (WorldModel &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) override |
virtual EdgePlannerPtr | PathChecker (const Config &a, const Config &b, int obstacle) override |
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 Klampt::RobotCSpace | |
RobotCSpace (RobotModel &robot) | |
RobotCSpace (const RobotCSpace &space) | |
virtual int | NumDimensions () override |
virtual string | VariableName (int i) override |
virtual Real | Distance (const Config &x, const Config &y) override |
virtual void | InterpolateDeriv (const Config &a, const Config &b, Real u, Vector &dx) override |
virtual void | InterpolateDerivA (const Config &a, const Config &b, Real u, const Vector &da, Vector &dx) override |
virtual void | InterpolateDerivB (const Config &a, const Config &b, Real u, const Vector &db, Vector &dx) override |
virtual void | InterpolateDeriv2 (const Config &a, const Config &b, Real u, Vector &ddx) override |
virtual void | Integrate (const Config &a, const Vector &da, Config &b) override |
Public Attributes | |
Stance | stance |
Vector3 | gravity |
int | numFCEdges |
bool | spCalculated |
Real | spMargin |
SupportPolygon | sp |
ContactFormation | formation |
TorqueSolver | torqueSolver |
Public Attributes inherited from Klampt::ContactCSpace | |
vector< IKGoal > | contactIK |
int | numSolveContact |
double | solveContactTime |
Public Attributes inherited from Klampt::SingleRobotCSpace | |
WorldModel & | world |
int | index |
WorldPlannerSettings * | settings |
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 Klampt::RobotCSpace | |
RobotModel & | robot |
Real | norm |
vector< Real > | jointWeights |
Real | floatingRotationWeight |
vector< Real > | jointRadiusScale |
Real | floatingRotationRadiusScale |
Real | unboundedStdDeviation |
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().
bool Klampt::StanceCSpace::CheckRBStability | ( | const Config & | x | ) |
Check if the current robot COM satisfies rigid body equilibrium NOTE: x is ignored
bool Klampt::StanceCSpace::CheckTorqueStability | ( | const Config & | x | ) |
Check if the current robot configuration satisfies articulated robot equilibrium with torque limits NOTE: x is ignored
void Klampt::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