Klamp't  0.8.1
StanceCSpace.h
1 #ifndef ROBOT_STANCE_CSPACE_H
2 #define ROBOT_STANCE_CSPACE_H
3 
4 #include "ContactCSpace.h"
5 #include "Contact/Stance.h"
6 #include <KrisLibrary/robotics/Stability.h>
7 #include <KrisLibrary/robotics/TorqueSolver.h>
8 
26 {
27  public:
28  StanceCSpace(RobotWorld& world,int index,
29  WorldPlannerSettings* settings);
30  StanceCSpace(const SingleRobotCSpace& space);
31  StanceCSpace(const StanceCSpace& space);
32  virtual ~StanceCSpace() {}
33 
35  void SetStance(const Stance& s);
37  void SetHold(const Hold& h);
39  void CalculateSP();
41  void SetSPMargin(Real margin);
44  void InitTorqueSolver();
45 
48  bool CheckRBStability(const Config& x);
52  bool CheckTorqueStability(const Config& x);
53 
54  Stance stance;
55  Vector3 gravity;
56  int numFCEdges;
57  bool spCalculated;
58  Real spMargin;
59  SupportPolygon sp;
60  ContactFormation formation;
61  TorqueSolver torqueSolver;
62 };
63 
64 #endif
A single contact between the robot and the environment.
Definition: Hold.h:26
void CalculateSP()
Calculates the support polygon for faster equilibrium testing.
bool CheckTorqueStability(const Config &x)
A structure containing settings that should be used for collision detection, contact solving...
Definition: PlannerSettings.h:41
A collection of holds.
Definition: Stance.h:19
The main world class containing multiple robots, objects, and static geometries (terrains). Lights and other viewport information may also be stored here.
Definition: World.h:20
bool CheckRBStability(const Config &x)
A SingleRobotCSpace for a robot maintaining contact.
Definition: ContactCSpace.h:17
A cspace consisting of a single robot configuration in a RobotWorld. Feasibility constraints are join...
Definition: RobotCSpace.h:100
void SetSPMargin(Real margin)
Enables robust equilbrium solving by shrinking the margin.
void InitTorqueSolver()
A configuration space that constrains a robot to the IK constraints in a stance, and checks for stabi...
Definition: StanceCSpace.h:25
void SetStance(const Stance &s)
Sets the current stance for this space.
void SetHold(const Hold &h)
Adds the given hold to the space&#39;s stance.