A sparse MPC solver for walking motion generation (old version).
Public Member Functions | Public Attributes
smpc::state Class Reference

An abstract class representing state. More...

#include <smpc_solver.h>

Inheritance diagram for smpc::state:
smpc::state_orig smpc::state_tilde

List of all members.

Public Member Functions

 state ()
 Default constructor (everything set to 0).
double & x ()
 X coordinate.
double & vx ()
 Velocity along X axis.
double & ax ()
 Acceleration along X axis.
double & y ()
 Y coordinate.
double & vy ()
 Velocity along Y axis.
double & ay ()
 Acceleration along Y axis.
virtual void get_next_state (const solver &smpc_solver)=0
 Returns the next state.
virtual void get_state (const solver &smpc_solver, const int ind)=0
 The same as get_next_state, but takes an additional parameter - index of the desired state in the state vector.
void set (double x_, double y_)
 Set coordinates, velocities and accelerations are assumed to be zero.
void set (double x_, double vx_, double ax_, double y_, double vy_, double ay_)
 Set state to given values.

Public Attributes

double state_vector [SMPC_NUM_STATE_VAR]

Detailed Description

An abstract class representing state.

Definition at line 35 of file smpc_solver.h.


Constructor & Destructor Documentation

Default constructor (everything set to 0).

Definition at line 120 of file smpc_solver.cpp.


Member Function Documentation

double& smpc::state::ax ( ) [inline]

Acceleration along X axis.

Definition at line 70 of file smpc_solver.h.

double& smpc::state::ay ( ) [inline]

Acceleration along Y axis.

Definition at line 83 of file smpc_solver.h.

virtual void smpc::state::get_next_state ( const solver smpc_solver) [pure virtual]

Returns the next state.

Parameters:
[in]smpc_solverinitialized solver

Implemented in smpc::state_tilde, and smpc::state_orig.

virtual void smpc::state::get_state ( const solver smpc_solver,
const int  ind 
) [pure virtual]

The same as get_next_state, but takes an additional parameter - index of the desired state in the state vector.

Parameters:
[in]smpc_solverinitialized solver
[in]indindex of a state [0 : N-1].

Implemented in smpc::state_tilde, and smpc::state_orig.

void smpc::state::set ( double  x_,
double  y_ 
)

Set coordinates, velocities and accelerations are assumed to be zero.

Parameters:
[in]x_x CoM/ZMP position [meter]
[in]y_y CoM/ZMP position [meter]

Definition at line 131 of file smpc_solver.cpp.

void smpc::state::set ( double  x_,
double  vx_,
double  ax_,
double  y_,
double  vy_,
double  ay_ 
)

Set state to given values.

Parameters:
[in]x_x CoM/ZMP position [meter]
[in]vx_x CoM velocity [meter/s]
[in]ax_x CoM acceleration [meter/s^2]
[in]y_y CoM/ZMP position [meter]
[in]vy_y CoM velocity [meter/s]
[in]ay_y CoM acceleration [meter/s^2]

Definition at line 137 of file smpc_solver.cpp.

double& smpc::state::vx ( ) [inline]

Velocity along X axis.

Definition at line 66 of file smpc_solver.h.

double& smpc::state::vy ( ) [inline]

Velocity along Y axis.

Definition at line 79 of file smpc_solver.h.

double& smpc::state::x ( ) [inline]

X coordinate.

Definition at line 62 of file smpc_solver.h.

double& smpc::state::y ( ) [inline]

Y coordinate.

Definition at line 75 of file smpc_solver.h.


Member Data Documentation

                state[0] - x CoM or ZMP position [meter]
                state[1] - x CoM velocity [meter/s]
                state[2] - x CoM acceleration [meter/s^2]
                state[3] - y CoM or ZMP position [meter]
                state[4] - y CoM velocity [meter/s]
                state[5] - y CoM acceleration [meter/s^2]

Definition at line 48 of file smpc_solver.h.


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