Simox  2.3.50
VirtualRobot::SupportPolygon Class Reference
Inheritance diagram for VirtualRobot::SupportPolygon:

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW SupportPolygon (SceneObjectSetPtr contactModels)
 
MathTools::ConvexHull2DPtr updateSupportPolygon (float maxFloorDist=5.0f)
 Recalculate contacts and compute polygon. More...
 
MathTools::ConvexHull2DPtr getSupportPolygon2D ()
 
MathTools::Plane getFloorPlane ()
 
float getStabilityIndex (RobotNodeSetPtr rns, bool update=true)
 
SceneObjectSetPtr getContactModels ()
 

Protected Member Functions

float getSquaredDistLine (Eigen::Vector2f &p, Eigen::Vector2f &pt1, Eigen::Vector2f &pt2)
 

Protected Attributes

SceneObjectSetPtr contactModels
 
std::vector< CollisionModelPtrcolModels
 
std::vector< Eigen::Vector2f > currentContactPoints2D
 
MathTools::Plane floor
 
MathTools::ConvexHull2DPtr suportPolygonFloor
 

Detailed Description

The support polygon is defined through the contacts between a set of CollisionModels and the floor plane. In this implementation, contacts are defined as all surface points of the passed collision models which have a distance to MathTools::FloorPlane that is lower than 5mm.

Constructor & Destructor Documentation

VirtualRobot::SupportPolygon::SupportPolygon ( SceneObjectSetPtr  contactModels)

Member Function Documentation

VirtualRobot::SceneObjectSetPtr VirtualRobot::SupportPolygon::getContactModels ( )
VirtualRobot::MathTools::Plane VirtualRobot::SupportPolygon::getFloorPlane ( )
float VirtualRobot::SupportPolygon::getSquaredDistLine ( Eigen::Vector2f &  p,
Eigen::Vector2f &  pt1,
Eigen::Vector2f &  pt2 
)
protected
float VirtualRobot::SupportPolygon::getStabilityIndex ( VirtualRobot::RobotNodeSetPtr  rns,
bool  update = true 
)

Computes quality index between 0 and 1 of the CoM projection of the robotNodeSet. 1 means that the current 2D CoM lies at the center of the support polygon 0 means it is outside.

VirtualRobot::MathTools::ConvexHull2DPtr VirtualRobot::SupportPolygon::getSupportPolygon2D ( )
VirtualRobot::MathTools::ConvexHull2DPtr VirtualRobot::SupportPolygon::updateSupportPolygon ( float  maxFloorDist = 5.0f)

Recalculate contacts and compute polygon.

Field Documentation

std::vector< CollisionModelPtr > VirtualRobot::SupportPolygon::colModels
protected
SceneObjectSetPtr VirtualRobot::SupportPolygon::contactModels
protected
std::vector< Eigen::Vector2f > VirtualRobot::SupportPolygon::currentContactPoints2D
protected
MathTools::Plane VirtualRobot::SupportPolygon::floor
protected
MathTools::ConvexHull2DPtr VirtualRobot::SupportPolygon::suportPolygonFloor
protected