Simox  2.3.74.0
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

◆ SupportPolygon()

VirtualRobot::SupportPolygon::SupportPolygon ( SceneObjectSetPtr  contactModels)

Member Function Documentation

◆ getContactModels()

VirtualRobot::SceneObjectSetPtr VirtualRobot::SupportPolygon::getContactModels ( )

◆ getFloorPlane()

VirtualRobot::MathTools::Plane VirtualRobot::SupportPolygon::getFloorPlane ( )

◆ getSquaredDistLine()

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

◆ getStabilityIndex()

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.

◆ getSupportPolygon2D()

VirtualRobot::MathTools::ConvexHull2DPtr VirtualRobot::SupportPolygon::getSupportPolygon2D ( )

◆ updateSupportPolygon()

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

Recalculate contacts and compute polygon.

Field Documentation

◆ colModels

std::vector< CollisionModelPtr > VirtualRobot::SupportPolygon::colModels
protected

◆ contactModels

SceneObjectSetPtr VirtualRobot::SupportPolygon::contactModels
protected

◆ currentContactPoints2D

std::vector< Eigen::Vector2f > VirtualRobot::SupportPolygon::currentContactPoints2D
protected

◆ floor

MathTools::Plane VirtualRobot::SupportPolygon::floor
protected

◆ suportPolygonFloor

MathTools::ConvexHull2DPtr VirtualRobot::SupportPolygon::suportPolygonFloor
protected