KrisLibrary
1.0.0
|
Calculation of the support polygon given a number of contacts. More...
#include <Stability.h>
Public Member Functions | |
bool | Set (const std::vector< ContactPoint > &contacts, const Vector3 &fext, int numFCEdges, int maxExpandDepth=6) |
bool | Set (const std::vector< CustomContactPoint > &contacts, const Vector3 &fext, int maxExpandDepth=6) |
bool | Set (const CustomContactFormation &contacts, const Vector3 &fext, int maxExpandDepth=6) |
bool | Empty () const |
bool | TestCOM (const Vector3 &com) const |
Real | COMMargin (const Vector3 &com) const |
Public Member Functions inherited from Geometry::UnboundedPolytope2D | |
void | CalcPlanes () |
Converts the vertex representation in vertices to planes. | |
void | CalcVertices () |
Converts the plane representation to vertices. | |
bool | Contains (const Vector2 &x) const |
Returns true if the point is within the polytope. | |
Real | Margin (const Vector2 &x) const |
Returns the orthogonal distance to the nearest plane (<0 means outside) | |
Real | ClosestPoint (const Vector2 &x, Vector2 &cp) const |
Public Attributes | |
Vector3 | fext |
int | numFCEdges |
std::vector< ContactPoint > | contacts |
Public Attributes inherited from Geometry::UnboundedPolytope2D | |
std::vector< PointRay2D > | vertices |
Vertex representation of the polygon. | |
std::vector< Plane2D > | planes |
Calculation of the support polygon given a number of contacts.
To test stability call the Set() method, then call the TestCOM() method. This first computes the entire support polygon, and the second tests for inclusion in the polygon. This is faster than the static TestCOMEquilibrium() method if you need to test a large number of COMs.
In the future, the incremental, adaptive algorithm of Bretl 2006 may be implemented.
Notes: