iDynTree::BoundingBoxProjectionConstraint class

BoundingBoxProjectionConstraint helper.

Public functions

void setActive(const bool isActive)
Set if the constraint is active or not.
auto isActive() -> bool
Get if the constraint is active or not.
auto getNrOfConstraints() -> size_t
Get the number of constraints (i.e.
auto buildBoundingBox(const iDynTree::Direction xAxisOfPlaneInWorld, const iDynTree::Direction yAxisOfPlaneInWorld, const iDynTree::Position originOfPlaneInWorld, const std::vector<Polygon>& supportPolygonsExpressedInSupportFrame, const std::vector<Transform>& absoluteFrame_X_supportFrame) -> bool
Build the projected bounding box.
auto project(iDynTree::Position& posIn3dInAbsoluteFrame) -> Vector2
Project a point in the plane of the bounding box.
void setProjectionAlongDirection(Vector3 direction)
auto projectAlongDirection(iDynTree::Position& posIn3dInAbsoluteFrame) -> Vector2

Public variables

Polygon2D projectedBoundingBox
bounding box expressed in the 2D project constraint plane.
MatrixDynSize A
A constraint matrix, such that Ax <= b iff the com projection x is in the bounding box.
VectorDynSize b
b vector, such that Ax <= b iff the com projection x is in the bounding box.
Matrix2x3 P
Projection matrix P, Note that x = P*(c-o), where x is the projection and c is the 3d COM .
Matrix2x3 Pdirection
Projection matrix 'Pdirection' defined by a given direction.
MatrixDynSize AtimesP
Matrix obtained multiplying the matrix A for the matrix P.
iDynTree::Position o
Plane offset o Note that x = P*(c-o), where x is the projection and c is the 3d COM .
std::vector<int> supportFrameIndices
List of support frames.
std::vector<Transform> absoluteFrame_X_supportFrame
List of absolue_X_supportFrames.

Function documentation

bool iDynTree::BoundingBoxProjectionConstraint::isActive()

Get if the constraint is active or not.

Returns true if the constraint is active, false otherwise.

size_t iDynTree::BoundingBoxProjectionConstraint::getNrOfConstraints()

Get the number of constraints (i.e.

Returns the number of constraints.

the number rows of the matrix A).

bool iDynTree::BoundingBoxProjectionConstraint::buildBoundingBox(const iDynTree::Direction xAxisOfPlaneInWorld, const iDynTree::Direction yAxisOfPlaneInWorld, const iDynTree::Position originOfPlaneInWorld, const std::vector<Polygon>& supportPolygonsExpressedInSupportFrame, const std::vector<Transform>& absoluteFrame_X_supportFrame)

Build the projected bounding box.

Parameters
xAxisOfPlaneInWorld
yAxisOfPlaneInWorld
originOfPlaneInWorld
supportPolygonsExpressedInSupportFrame Vector of the support polygons, expressed in the support frames.
absoluteFrame_X_supportFrame Vector of the transform between each support frame and the absolute frame.
Returns true if all went well, false otherwise.

Vector2 iDynTree::BoundingBoxProjectionConstraint::project(iDynTree::Position& posIn3dInAbsoluteFrame)

Project a point in the plane of the bounding box.

The point is expressed in the absolute frame of the constriant.

void iDynTree::BoundingBoxProjectionConstraint::setProjectionAlongDirection(Vector3 direction)

Parameters
direction vector along which we want to project a point

Set the projection matrix 'Pdirection' given a desired projection direction.

Vector2 iDynTree::BoundingBoxProjectionConstraint::projectAlongDirection(iDynTree::Position& posIn3dInAbsoluteFrame)

Parameters
posIn3dInAbsoluteFrame a point we want to project

Project a point along a direction defined by the projection matrix 'Pdirection'

Variable documentation

Polygon2D iDynTree::BoundingBoxProjectionConstraint::projectedBoundingBox

bounding box expressed in the 2D project constraint plane.

This is computed by the buildBoundingBox method.

Matrix2x3 iDynTree::BoundingBoxProjectionConstraint::Pdirection

Projection matrix 'Pdirection' defined by a given direction.

The projection 'x' of a 3D point 'c' along a given vector is obtained as: x = Pdirection*(c-o).