This is a support polygon class. More...
#include <hpp/gik/robot/foot-print-related.hh>
Public Member Functions | |
ChppGikSupportPolygon (const ChppGikFootprint &inFootprint, bool isRight) | |
Constructor for one-foot support polygon. More... | |
ChppGikSupportPolygon (const ChppGikFootprint &inLeftFootprint, const ChppGikFootprint &inRightFootprint) | |
Constructor for two-foot support polygon. More... | |
ChppGikSupportPolygon (const ChppGikSupportPolygon &sourceObject) | |
Deep copy constructor. More... | |
void | applyStep (const ChppGikFootprint *inTargetFootprint, bool isRight) |
Apply step. More... | |
const ChppGikFootprint * | leftFootprint () const |
Get left footprint. More... | |
const ChppGikFootprint * | rightFootprint () const |
Get right footprint. More... | |
bool | isLeftLegSupporting () const |
bool | isRightLegSupporting () const |
bool | isDoubleSupport () const |
void | print () const |
print the current support polygon More... | |
void | center (double &outX, double &outY) |
Get the center of the support polygon: single support: ankle projection, double support: middle point of ankle projections. More... | |
vector3d | meanOrientation () |
Get the "mean orientation vector" defined by (xf1 (+ xf2) )/2 where xfi is the x axis of foot i. More... | |
bool | isPointInsideSafeZone (double x, double y) const |
Tell if the given 2D point is inside this support polygon's safe zone. More... | |
vector3d | nearestCenterPointTo (const vector3d &inPoint) |
Compute a point on the line segment linking the projections of the ankles on the ground such as M is the nearest to the parameter point inPoint. More... | |
const matrix4d * | rfootTransformation () const |
Get a pointer to a stored transformation matrix for the right foot. More... | |
const matrix4d * | lfootTransformation () const |
Get a pointer to a stored transformation matrix for the left foot. More... | |
void | rfootTransformation (const matrix4d &inMatrix) |
store a transformation matrix for the right foot. More... | |
void | lfootTransformation (const matrix4d &inMatrix) |
store matrix for the left foot. More... | |
~ChppGikSupportPolygon () | |
Static Public Member Functions | |
static ChppGikSupportPolygon * | makeSupportPolygon (const matrix4d &leftFootH, const matrix4d &rightFootH, double normalAnkleHeight) |
try to construct the support polygon from the given transformation. More... | |
This is a support polygon class.
A support polygon is defined by at least one foot print.
ChppGikSupportPolygon::ChppGikSupportPolygon | ( | const ChppGikFootprint & | inFootprint, |
bool | isRight | ||
) |
Constructor for one-foot support polygon.
ChppGikSupportPolygon::ChppGikSupportPolygon | ( | const ChppGikFootprint & | inLeftFootprint, |
const ChppGikFootprint & | inRightFootprint | ||
) |
Constructor for two-foot support polygon.
ChppGikSupportPolygon::ChppGikSupportPolygon | ( | const ChppGikSupportPolygon & | sourceObject | ) |
Deep copy constructor.
ChppGikSupportPolygon::~ChppGikSupportPolygon | ( | ) |
void ChppGikSupportPolygon::applyStep | ( | const ChppGikFootprint * | inTargetFootprint, |
bool | isRight | ||
) |
Apply step.
void ChppGikSupportPolygon::center | ( | double & | outX, |
double & | outY | ||
) |
Get the center of the support polygon: single support: ankle projection, double support: middle point of ankle projections.
bool ChppGikSupportPolygon::isDoubleSupport | ( | ) | const |
bool ChppGikSupportPolygon::isLeftLegSupporting | ( | ) | const |
bool ChppGikSupportPolygon::isPointInsideSafeZone | ( | double | x, |
double | y | ||
) | const |
Tell if the given 2D point is inside this support polygon's safe zone.
if the support polygon is simple, check wether the given point is in the disc centered on the orthogonal projection of the foot ankle on the ground. The radius is arbitrarily set to 4 cm. If the support is double, see if the point is in the area covered by the continuous translation of the same disc from one ankle projection to the other.
bool ChppGikSupportPolygon::isRightLegSupporting | ( | ) | const |
const ChppGikFootprint* ChppGikSupportPolygon::leftFootprint | ( | ) | const |
Get left footprint.
const matrix4d* ChppGikSupportPolygon::lfootTransformation | ( | ) | const |
Get a pointer to a stored transformation matrix for the left foot.
Temporary method (until new version is ready):
void ChppGikSupportPolygon::lfootTransformation | ( | const matrix4d & | inMatrix | ) |
store matrix for the left foot.
Temporary method (until new version is ready):
|
static |
try to construct the support polygon from the given transformation.
vector3d ChppGikSupportPolygon::meanOrientation | ( | ) |
Get the "mean orientation vector" defined by (xf1 (+ xf2) )/2 where xfi is the x axis of foot i.
Compute a point on the line segment linking the projections of the ankles on the ground such as M is the nearest to the parameter point inPoint.
void ChppGikSupportPolygon::print | ( | ) | const |
print the current support polygon
const matrix4d* ChppGikSupportPolygon::rfootTransformation | ( | ) | const |
Get a pointer to a stored transformation matrix for the right foot.
Temporary method (until new version is ready):
void ChppGikSupportPolygon::rfootTransformation | ( | const matrix4d & | inMatrix | ) |
store a transformation matrix for the right foot.
Temporary method (until new version is ready):
const ChppGikFootprint* ChppGikSupportPolygon::rightFootprint | ( | ) | const |
Get right footprint.