A sparse MPC solver for walking motion generation (old version).
|
An abstract class representing state. More...
#include <smpc_solver.h>
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] |
An abstract class representing state.
Definition at line 35 of file smpc_solver.h.
Default constructor (everything set to 0).
Definition at line 120 of file smpc_solver.cpp.
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.
[in] | smpc_solver | initialized 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.
[in] | smpc_solver | initialized solver |
[in] | ind | index 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.
[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.
[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.
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.