A sparse MPC solver for walking motion generation.
Public Member Functions | Public Attributes | List of all members

Defines a footstep. More...

#include <footstep.h>

Inheritance diagram for footstep:
RectangularConstraint_ZMP

Public Member Functions

 footstep (const double, const Transform< double, 3 > &, const Vector3d &, const unsigned int, const fs_type, const double *)
 Defines a footstep at a given position with a given orientation. More...
 
 footstep (const footstep &)
 A copy constructor. More...
 
 ~footstep ()
 Destructor. More...
 
void changePosture (const double *, const bool)
 Correct position of the footstep. More...
 
double x ()
 
double y ()
 
- Public Member Functions inherited from RectangularConstraint_ZMP
 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 angle
 Angle (relative to the world frame) of a footstep [rad.]. More...
 
double ca
 cos(angle). More...
 
double sa
 sin(angle). More...
 
unsigned int time_period
 the period of time spent in this support More...
 
unsigned int time_left
 the amount of time left in this support (=time_period on initialization) More...
 
fs_type type
 type of the step. More...
 
Vector3d ZMPref
 Reference ZMP point. More...
 
Transform< double, 3 > * posture
 
- Public Attributes inherited from RectangularConstraint_ZMP
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...
 

Detailed Description

Defines a footstep.

Definition at line 29 of file footstep.h.

Constructor & Destructor Documentation

◆ footstep() [1/2]

footstep::footstep ( const double  angle_,
const Transform< double, 3 > &  posture_,
const Vector3d &  ZMPref_,
const unsigned int  time_period_,
const fs_type  type_,
const double *  d_ 
)

Defines a footstep at a given position with a given orientation.

Parameters
[in]angle_absolute rotation angle.
[in]posture_absolute position and orientation of the foot.
[in]ZMPref_absolute reference ZMP position for the foot.
[in]time_period_amount of time to spend in the step (ms.).
[in]type_type of the step.
[in]d_ZMP constraints as defined in RectangularConstraint_ZMP::RectangularConstraint_ZMP.

Definition at line 32 of file footstep.cpp.

◆ footstep() [2/2]

footstep::footstep ( const footstep copy_from)

A copy constructor.

Parameters
[in]copy_fromoriginal class instance

Definition at line 57 of file footstep.cpp.

◆ ~footstep()

footstep::~footstep ( )

Destructor.

Definition at line 75 of file footstep.cpp.

Member Function Documentation

◆ changePosture()

void footstep::changePosture ( const double *  new_posture,
const bool  zero_z_coordinate 
)

Correct position of the footstep.

Parameters
[in]new_posturenew posture of the step.
[in]zero_z_coordinateset z coordinate to 0.0

Definition at line 106 of file footstep.cpp.

◆ x()

double footstep::x ( )
Returns
x coordinate

Definition at line 84 of file footstep.cpp.

◆ y()

double footstep::y ( )
Returns
y coordinate

Definition at line 93 of file footstep.cpp.

Member Data Documentation

◆ angle

double footstep::angle

Angle (relative to the world frame) of a footstep [rad.].

Definition at line 49 of file footstep.h.

◆ ca

double footstep::ca

cos(angle).

Definition at line 52 of file footstep.h.

◆ posture

Transform<double, 3>* footstep::posture

Definition at line 70 of file footstep.h.

◆ sa

double footstep::sa

sin(angle).

Definition at line 55 of file footstep.h.

◆ time_left

unsigned int footstep::time_left

the amount of time left in this support (=time_period on initialization)

Definition at line 61 of file footstep.h.

◆ time_period

unsigned int footstep::time_period

the period of time spent in this support

Definition at line 58 of file footstep.h.

◆ type

fs_type footstep::type

type of the step.

Definition at line 64 of file footstep.h.

◆ ZMPref

Vector3d footstep::ZMPref

Reference ZMP point.

Definition at line 67 of file footstep.h.


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