A sparse MPC solver for walking motion generation (old version).
Functions

Various operations on the vector of states. More...

Functions

void tilde_to_bar (const double sinA, const double cosA, double *state)
 Converts state from X_tilde to X_bar.
void bar_to_tilde (const double sinA, const double cosA, double *state)
 Converts state from X_tilde to X_bar.
void tilde_to_orig (const double h, double *state)
 Converts state from X_tilde to original variables.
void orig_to_tilde (const double h, double *state)
 Converts state from original variables to X_tilde.
void get_state_tilde (const problem_parameters &sp, const double *X, const int ind, double *state)
 Returns the next state as X_tilde.
void get_state (const problem_parameters &sp, const double *X, const int ind, double *state)
 Returns the next state represented by original variables.
void get_controls (const int preview_window_size, const double *X, const int ind, double *controls)
 Returns the controls,that must be applied to reach the next state.

Detailed Description

Various operations on the vector of states.


Function Documentation

void state_handling::bar_to_tilde ( const double  sinA,
const double  cosA,
double *  state 
)

Converts state from X_tilde to X_bar.

Parameters:
[in]sinAsin of the rotation angle.
[in]cosAcos of the rotation angle.
[in,out]statethe state (X_bar).

Definition at line 44 of file state_handling.cpp.

void state_handling::get_controls ( const int  preview_window_size,
const double *  X,
const int  ind,
double *  controls 
)

Returns the controls,that must be applied to reach the next state.

Parameters:
[in]preview_window_sizesize of the preview window
[in]Xa solution
[in]indindex of the state.
[in,out]controlsthe controls (2 double values)

Definition at line 138 of file state_handling.cpp.

void state_handling::get_state ( const problem_parameters sp,
const double *  X,
const int  ind,
double *  state 
)

Returns the next state represented by original variables.

Parameters:
[in]spparameters.
[in]Xa solution.
[in]indindex of the state.
[in,out]statethe state (SMPC_NUM_STATE_VAR elements).

Definition at line 114 of file state_handling.cpp.

void state_handling::get_state_tilde ( const problem_parameters sp,
const double *  X,
const int  ind,
double *  state 
)

Returns the next state as X_tilde.

Parameters:
[in]spparameters.
[in]Xa solution.
[in]indindex of the state.
[in,out]statethe state (SMPC_NUM_STATE_VAR elements).

Definition at line 85 of file state_handling.cpp.

void state_handling::orig_to_tilde ( const double  h,
double *  state 
)

Converts state from original variables to X_tilde.

Parameters:
[in]hhCoM/gravity.
[in,out]statethe state (position, velocity and acceleration of CoM).

Definition at line 70 of file state_handling.cpp.

void state_handling::tilde_to_bar ( const double  sinA,
const double  cosA,
double *  state 
)

Converts state from X_tilde to X_bar.

Parameters:
[in]sinAsin of the rotation angle.
[in]cosAcos of the rotation angle.
[in,out]statethe state (X_tilde).

Definition at line 30 of file state_handling.cpp.

void state_handling::tilde_to_orig ( const double  h,
double *  state 
)

Converts state from X_tilde to original variables.

Parameters:
[in]hhCoM/gravity.
[in,out]statethe state (X_tilde).

Definition at line 58 of file state_handling.cpp.