PatternGeneratorJRL::LinearizedInvertedPendulum2D Class Reference

#include <PreviewControl/LinearizedInvertedPendulum2D.hh>

List of all members.

Public Member Functions

 LinearizedInvertedPendulum2D ()
 ~LinearizedInvertedPendulum2D ()
int InitializeSystem ()
 Initialize the system.
int Interpolation (std::deque< COMState > &COMStates, std::deque< ZMPPosition > &ZMPRefPositions, int CurrentPosition, double CX, double CY)
 Interpolation during a simulation period with control parameters.
int OneIteration (double CX, double CY)
 Simulate one iteration of the LIPM.
Getter and setter of variables
const double & GetComHeight () const
void SetComHeight (const double &)
const double & GetSimulationControlPeriod () const
void SetSimulationControlPeriod (const double &)
const double & GetRobotControlPeriod ()
void SetRobotControlPeriod (const double &)
void GetState (MAL_VECTOR_TYPE(double)&lxk)
void setState (MAL_VECTOR_TYPE(double) lxk)

Constructor & Destructor Documentation


Member Function Documentation

Getter for the CoM height

Getter for the control period of the robot (for interpolation) .

Getter for the simulation period specifically

Get state.

References MAL_VECTOR_TYPE.

Initialize the system.

Returns:
0 if the initialization is fine, -1 if the control period is not initialized, -2 if the Com height is not initialized.
int LinearizedInvertedPendulum2D::Interpolation ( std::deque< COMState > &  COMStates,
std::deque< ZMPPosition > &  ZMPRefPositions,
int  CurrentPosition,
double  CX,
double  CY 
)

Interpolation during a simulation period with control parameters.

Parameters:
[out]NewFinalZMPPositions: queue of ZMP positions interpolated.
[out]COMStates: queue of COM positions interpolated.
[in]ZMPRefPositions: Reference positions of ZMP (Kajita's heuristic every 5 ms).
[in]CurrentPosition: index of the current position of the ZMP reference (this allow to propagate some parameters define by a heuristic to the CoM positions).
[in]CX: command parameter in the forward direction.
[in]CY: command parameter in the perpendicular direction.

References PatternGeneratorJRL::ZMPPosition_s::px, PatternGeneratorJRL::ZMPPosition_s::py, PatternGeneratorJRL::ZMPPosition_s::theta, PatternGeneratorJRL::COMState_s::x, PatternGeneratorJRL::COMState_s::y, PatternGeneratorJRL::COMState_s::yaw, and PatternGeneratorJRL::COMState_s::z.

int LinearizedInvertedPendulum2D::OneIteration ( double  CX,
double  CY 
)

Simulate one iteration of the LIPM.

Parameters:
[in]CX,:control value in the forward direction.
[in]CY,:control value in the left-right direction.
Returns:
0 if the object has been properly initialized -1, otherwise.

Vector to compute the command applied to the LIPM

References MAL_C_eq_A_by_B, MAL_RET_A_by_B, and MAL_VECTOR_DIM.

void LinearizedInvertedPendulum2D::SetComHeight ( const double &  aComHeight)

Setter for the CoM height

Setter for the control period of the robot (for interpolation) .

Setter for the simulation period specifically

Get state.

References MAL_VECTOR_TYPE.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines