A sparse MPC solver for walking motion generation (old version).
Public Member Functions | Public Attributes

Defines rectangular constraints (of the form D*z <= d) for the ZMP. More...

#include <rect_constraint.h>

Inheritance diagram for RectangularConstraint_ZMP:
footstep

List of all members.

Public Member Functions

 RectangularConstraint_ZMP (const double *)
 A constructor.
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)].
void Constraints2Vert ()
 Computes the vertices of a polygon from the constraints (D*x <= d)

Public Attributes

double D [4 *2]
 Matrix of the constraints D*z <= d (where z is a 2D point).
double d [4]
double d_orig [4]
 Size of the support polygon for a single support (no rotation / translation).
MatrixXd vert
 Absolute coordinates of vertices.

Detailed Description

Defines rectangular constraints (of the form D*z <= d) for the ZMP.

Definition at line 30 of file rect_constraint.h.


Constructor & Destructor Documentation

A constructor.

Parameters:
[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 41 of file rect_constraint.cpp.


Member Function Documentation

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 103 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)].

Parameters:
[in]cacos(angle)
[in]sasin(angle)
[in]xx coordinate of the reference point
[in]yy coordinate of the reference point
Note:
This is used when the constraints are initialized (only then the orientation can be set).

Definition at line 74 of file rect_constraint.cpp.


Member Data Documentation

Matrix of the constraints D*z <= d (where z is a 2D point).

Note:
D is a [4 x 2] matrix stored column-wise (Fortran style). D is always initialized as (later it could be rotated using D*R'):
            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.

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.

Size of the support polygon for a single support (no rotation / translation).

Definition at line 65 of file rect_constraint.h.

Absolute coordinates of vertices.

Definition at line 68 of file rect_constraint.h.


The documentation for this class was generated from the following files: