hpp-centroidal-dynamics  4.9.0
Utility classes for testing (robust) equilibrium of a system in contact with the environment, and other centroidal dynamics methods.
solver_LP_qpoases.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2015, LAAS-CNRS
3  * Author: Andrea Del Prete
4  */
5 
6 #ifndef HPP_CENTROIDAL_DYNAMICS_SOLVER_LP_QPOASES_HH
7 #define HPP_CENTROIDAL_DYNAMICS_SOLVER_LP_QPOASES_HH
8 
12 #include <qpOASES.hpp>
13 
14 namespace centroidal_dynamics {
15 
17  private:
18  qpOASES::Options m_options; // solver options
19  qpOASES::SQProblem m_solver; // qpoases solver
20 
21  MatrixXX m_H; // Hessian matrix
22  bool m_init_succeeded; // true if solver has been successfully initialized
23  qpOASES::returnValue m_status; // status code returned by the solver
24 
25  public:
27 
33  LP_status solve(Cref_vectorX c, Cref_vectorX lb, Cref_vectorX ub, Cref_matrixXX A, Cref_vectorX Alb,
34  Cref_vectorX Aub, Ref_vectorX sol);
35 
37  virtual LP_status getStatus();
38 
40  virtual double getObjectiveValue() { return m_solver.getObjVal(); }
41 
42  virtual void getDualSolution(Ref_vectorX res) { m_solver.getDualSolution(res.data()); }
43 };
44 
45 } // end namespace centroidal_dynamics
46 
47 #endif // HPP_CENTROIDAL_DYNAMICS_SOLVER_LP_QPOASES_HH
solver_LP_abstract.hh
util.hh
centroidal_dynamics::Solver_LP_qpoases
Definition: solver_LP_qpoases.hh:16
centroidal_dynamics::Solver_LP_qpoases::getObjectiveValue
virtual double getObjectiveValue()
Definition: solver_LP_qpoases.hh:40
centroidal_dynamics::MatrixXX
Eigen::Matrix< value_type, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > MatrixXX
Definition: util.hh:47
CENTROIDAL_DYNAMICS_DLLAPI
#define CENTROIDAL_DYNAMICS_DLLAPI
Definition: local_config.hh:52
centroidal_dynamics::Cref_matrixXX
const typedef Eigen::Ref< const MatrixXX > & Cref_matrixXX
Definition: util.hh:67
local_config.hh
centroidal_dynamics::Ref_vectorX
Eigen::Ref< VectorX > Ref_vectorX
Definition: util.hh:51
centroidal_dynamics
Definition: centroidal_dynamics.hh:14
centroidal_dynamics::Cref_vectorX
const typedef Eigen::Ref< const VectorX > & Cref_vectorX
Definition: util.hh:61
centroidal_dynamics::Solver_LP_qpoases::getDualSolution
virtual void getDualSolution(Ref_vectorX res)
Definition: solver_LP_qpoases.hh:42
centroidal_dynamics::Solver_LP_abstract
Abstract interface for a Linear Program (LP) solver.
Definition: solver_LP_abstract.hh:41