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

API of the sparse MPC solver. More...

#include <smpc_solver.h>

List of all members.

Public Member Functions

 solver (const int N, const double Alpha=150.0, const double Beta=2000.0, const double Gamma=1.0, const double regularization=0.01, const double tol=1e-7)
 Constructor: initialize an active set method solver.
 solver (const int N, const int max_iter, const double Alpha=150.0, const double Beta=2000.0, const double Gamma=1.0, const double regularization=0.01, const double tol=1e-3, const double tol_out=1e-2, const double t=100, const double mu=15, const double bs_alpha=0.01, const double bs_beta=0.5)
 Constructor: initialize an interior-point method solver.
 ~solver ()
void enable_fexceptions ()
 Enable floating point exceptions: die rather than processing incorrect data). SIGFPE is sent to the program, when an error occurs.
void set_parameters (const double *T, const double *h, const double h_initial, const double *angle, const double *zref_x, const double *zref_y, const double *lb, const double *ub)
 Initializes quadratic problem.
void form_init_fp (const double *x_coord, const double *y_coord, const state_orig &init_state, double *X)
 Generates an initial feasible point.
int solve ()
 Solve QP problem.

Public Attributes

qp_solverqp_sol
 Internal representation.

Detailed Description

API of the sparse MPC solver.

Definition at line 243 of file smpc_solver.h.


Constructor & Destructor Documentation

smpc::solver::solver ( const int  N,
const double  Alpha = 150.0,
const double  Beta = 2000.0,
const double  Gamma = 1.0,
const double  regularization = 0.01,
const double  tol = 1e-7 
)

Constructor: initialize an active set method solver.

Parameters:
[in]NNumber of sampling times in a preview window
[in]AlphaVelocity gain
[in]BetaPosition gain
[in]GammaJerk gain
[in]regularizationregularization
[in]toltolerance

Definition at line 34 of file smpc_solver.cpp.

smpc::solver::solver ( const int  N,
const int  max_iter,
const double  Alpha = 150.0,
const double  Beta = 2000.0,
const double  Gamma = 1.0,
const double  regularization = 0.01,
const double  tol = 1e-3,
const double  tol_out = 1e-2,
const double  t = 100,
const double  mu = 15,
const double  bs_alpha = 0.01,
const double  bs_beta = 0.5 
)

Constructor: initialize an interior-point method solver.

Parameters:
[in]NNumber of sampling times in a preview window
[in]max_itermaximum number of internal loop iterations
[in]AlphaVelocity gain
[in]BetaPosition gain
[in]GammaJerk gain
[in]regularizationregularization
[in]toltolerance (internal loop)
[in]tol_outtolerance of the outer loop, which resolves the problem with new t (kappa) parameter.
[in]tlogarithmic barrier parameter
[in]mumultiplier of t, >1.
[in]bs_alphabacktracking search parameter 0 < alpha < 0.5
[in]bs_betabacktracking search parameter 0 < beta < 1

Definition at line 43 of file smpc_solver.cpp.

Definition at line 59 of file smpc_solver.cpp.


Member Function Documentation

Enable floating point exceptions: die rather than processing incorrect data). SIGFPE is sent to the program, when an error occurs.

Note:
If feenableexcept() is not present on the system, the function does nothing.

Definition at line 68 of file smpc_solver.cpp.

void smpc::solver::form_init_fp ( const double *  x_coord,
const double *  y_coord,
const state_orig init_state,
double *  X 
)

Generates an initial feasible point.

Parameters:
[in]x_coordx coordinates of points satisfying constraints
[in]y_coordy coordinates of points satisfying constraints
[in]init_stateinitial state
[in,out]Xsolution of optimization problem

Definition at line 93 of file smpc_solver.cpp.

void smpc::solver::set_parameters ( const double *  T,
const double *  h,
const double  h_initial,
const double *  angle,
const double *  zref_x,
const double *  zref_y,
const double *  lb,
const double *  ub 
)

Initializes quadratic problem.

Parameters:
[in]Tsampling time for each time step [sec.]
[in]hheight of the center of mass divided by gravity for each time step
[in]h_initialinitial value of height of the center of mass divided by gravity
[in]anglerotation angle for each state relative to the world frame
[in]zref_xreference values of x coordinate of ZMP
[in]zref_yreference values of y coordinate of ZMP
[in]lbarray of lower bounds for coordinates of ZMP
[in]ubarray of upper bounds for coordinates of ZMP

Definition at line 79 of file smpc_solver.cpp.

Solve QP problem.

Returns:
A negative number on error. Number of activated constraints for active set method and 0 for interior-point method on success.

Definition at line 107 of file smpc_solver.cpp.


Member Data Documentation

Internal representation.

Definition at line 367 of file smpc_solver.h.


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