A sparse MPC solver for walking motion generation (old version).
|
Solve a quadratic program with a specific structure. More...
#include <qp_solver.h>
Public Member Functions | |
qp_solver (const int N_, const double, const double, const double, const double, const double) | |
Constructor: initialization of the constant parameters. | |
virtual | ~qp_solver () |
void | form_init_fp (const double *, const double *, const double *, double *) |
Generates an initial feasible point. First we perform a change of variable to X_tilde generate a feasible point, and then we go back to X_bar. | |
virtual void | set_parameters (const double *, const double *, const double, const double *, const double *, const double *, const double *, const double *)=0 |
virtual int | solve ()=0 |
Public Attributes | |
double * | X |
double | tol |
tolerance | |
double * | dX |
double | alpha |
double | h_initial |
Height of the CoM at initial state divided by the gravity, this initial state precede the first state in the preview window. | |
double | gain_alpha |
Gains used in objective function. | |
double | gain_beta |
Gains used in objective function. | |
double | gain_gamma |
Gains used in objective function. |
Solve a quadratic program with a specific structure.
Definition at line 32 of file qp_solver.h.
qp_solver::qp_solver | ( | const int | N_, |
const double | Alpha, | ||
const double | Beta, | ||
const double | Gamma, | ||
const double | regularization, | ||
const double | tol_ | ||
) |
Constructor: initialization of the constant parameters.
[in] | N_ | Number of sampling times in a preview window |
[in] | Alpha | Velocity gain |
[in] | Beta | Position gain |
[in] | Gamma | Jerk gain |
[in] | regularization | regularization |
[in] | tol_ | tolerance |
Definition at line 29 of file qp_solver.cpp.
virtual qp_solver::~qp_solver | ( | ) | [inline, virtual] |
Definition at line 44 of file qp_solver.h.
void qp_solver::form_init_fp | ( | const double * | x_coord, |
const double * | y_coord, | ||
const double * | init_state, | ||
double * | X_ | ||
) |
Generates an initial feasible point. First we perform a change of variable to X_tilde generate a feasible point, and then we go back to X_bar.
[in] | x_coord | x coordinates of points satisfying constraints |
[in] | y_coord | y coordinates of points satisfying constraints |
[in] | init_state | current state |
[in,out] | X_ | initial guess / solution of optimization problem |
Definition at line 58 of file qp_solver.cpp.
virtual void qp_solver::set_parameters | ( | const double * | , |
const double * | , | ||
const double | , | ||
const double * | , | ||
const double * | , | ||
const double * | , | ||
const double * | , | ||
const double * | |||
) | [pure virtual] |
virtual int qp_solver::solve | ( | ) | [pure virtual] |
double qp_solver::alpha |
double* qp_solver::dX |
Feasible descent direction (to be used for updating X).
Definition at line 87 of file qp_solver.h.
double qp_solver::gain_alpha |
Gains used in objective function.
Definition at line 76 of file qp_solver.h.
double qp_solver::gain_beta |
Gains used in objective function.
Definition at line 77 of file qp_solver.h.
double qp_solver::gain_gamma |
Gains used in objective function.
Definition at line 78 of file qp_solver.h.
double qp_solver::h_initial |
Height of the CoM at initial state divided by the gravity, this initial state precede the first state in the preview window.
Definition at line 94 of file qp_solver.h.
double qp_solver::tol |
tolerance
Definition at line 82 of file qp_solver.h.
double* qp_solver::X |
Variables for the QP (contain the states + control variables). Initial feasible point with respect to the equality and inequality constraints.
Definition at line 71 of file qp_solver.h.