A sparse MPC solver for walking motion generation (old version).
|
00001 00008 #ifndef QP_SOLVER_H 00009 #define QP_SOLVER_H 00010 00011 /**************************************** 00012 * INCLUDES 00013 ****************************************/ 00014 #include "smpc_common.h" 00015 #include "problem_param.h" 00016 00017 #include <vector> 00018 00019 00020 /**************************************** 00021 * Defines 00022 ****************************************/ 00023 00024 00025 using namespace std; 00026 00029 00032 class qp_solver : public problem_parameters 00033 { 00034 public: 00035 // functions 00036 qp_solver( 00037 const int N_, 00038 const double, 00039 const double, 00040 const double, 00041 const double, 00042 const double); 00043 00044 virtual ~qp_solver() 00045 { 00046 if (dX != NULL) 00047 delete dX; 00048 }; 00049 00050 00051 00052 void form_init_fp(const double *, const double *, const double *, double *); 00053 00054 00055 virtual void set_parameters( 00056 const double*, 00057 const double*, 00058 const double, 00059 const double*, 00060 const double*, 00061 const double*, 00062 const double*, 00063 const double*) = 0; 00064 virtual int solve () = 0; 00065 00066 00067 // variables 00071 double *X; 00072 00073 00076 double gain_alpha; 00077 double gain_beta; 00078 double gain_gamma; 00080 00082 double tol; 00083 00084 // variables and descent direction 00085 00087 double *dX; 00088 00090 double alpha; 00091 00094 double h_initial; 00095 }; 00096 00098 #endif /*QP_SOLVER_H*/