A sparse MPC solver for walking motion generation.
|
Defines rectangular constraints (of the form D*z <= d) for the ZMP. More...
#include <rect_constraint.h>
Public Member Functions | |
RectangularConstraint_ZMP (const double *) | |
A constructor. More... | |
void | rotate_translate (const double, const double, const double, const double) |
translates from [0;0] to "p" and rotates from 0 to "angle". The 0 initial angle implies that D = [eye(2); -eye(2)]. More... | |
void | Constraints2Vert () |
Computes the vertices of a polygon from the constraints (D*x <= d) More... | |
Public Attributes | |
double | D [4 *2] |
Matrix of the constraints D*z <= d (where z is a 2D point). More... | |
double | d [4] |
double | d_orig [4] |
Size of the support polygon for a single support (no rotation / translation). More... | |
MatrixXd | vert |
Absolute coordinates of vertices. More... | |
Defines rectangular constraints (of the form D*z <= d) for the ZMP.
Definition at line 30 of file rect_constraint.h.
RectangularConstraint_ZMP::RectangularConstraint_ZMP | ( | const double * | d_ | ) |
A constructor.
[in] | d_ | a [4x1] array of constraints. |
The constraints are 4 positive numbers, their meaning is illustrated by the following picture:
---------------------------------- | |d(2) | | d(3) | d(1) | |---------- p -------------------| | | | | |d(4) | ----------------------------------
At creation p is assumed to be [0;0] and rotation angle = 0.
Definition at line 37 of file rect_constraint.cpp.
void RectangularConstraint_ZMP::Constraints2Vert | ( | ) |
Computes the vertices of a polygon from the constraints (D*x <= d)
The numbering of the vertices is
3---------2 | | | | 4---------1
Definition at line 99 of file rect_constraint.cpp.
void RectangularConstraint_ZMP::rotate_translate | ( | const double | ca, |
const double | sa, | ||
const double | x, | ||
const double | y | ||
) |
translates from [0;0] to "p" and rotates from 0 to "angle". The 0 initial angle implies that D = [eye(2); -eye(2)].
[in] | ca | cos(angle) |
[in] | sa | sin(angle) |
[in] | x | x coordinate of the reference point |
[in] | y | y coordinate of the reference point |
Definition at line 70 of file rect_constraint.cpp.
double RectangularConstraint_ZMP::D[4 *2] |
Matrix of the constraints D*z <= d (where z is a 2D point).
D[0] = 1.0; D[4] = 0.0; D[1] = 0.0; D[5] = 1.0; D[2] = -1.0; D[6] = 0.0; D[3] = 0.0; D[7] = -1.0; D = [ 1 0; 0 1; -1 0; 0 -1] * [cos(a) -sin(a) sin(a) cos(a)].
Definition at line 57 of file rect_constraint.h.
double RectangularConstraint_ZMP::d[4] |
Size of the support polygon for a single support. Vector d of the constraints D*z <= d (where z is a 2D point).
Definition at line 62 of file rect_constraint.h.
double RectangularConstraint_ZMP::d_orig[4] |
Size of the support polygon for a single support (no rotation / translation).
Definition at line 65 of file rect_constraint.h.
MatrixXd RectangularConstraint_ZMP::vert |
Absolute coordinates of vertices.
Definition at line 68 of file rect_constraint.h.