hpp-centroidal-dynamics 5.0.0
Utility classes for testing (robust) equilibrium of a system in contact with the environment, and other centroidal dynamics methods.
Loading...
Searching...
No Matches
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
14namespace 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
28 virtual ~Solver_LP_qpoases() {}
29
35 LP_status solve(Cref_vectorX c, Cref_vectorX lb, Cref_vectorX ub,
37 Ref_vectorX sol);
38
40 virtual LP_status getStatus();
41
43 virtual double getObjectiveValue() { return m_solver.getObjVal(); }
44
45 virtual void getDualSolution(Ref_vectorX res) {
46 m_solver.getDualSolution(res.data());
47 }
48};
49
50} // end namespace centroidal_dynamics
51
52#endif // HPP_CENTROIDAL_DYNAMICS_SOLVER_LP_QPOASES_HH
Abstract interface for a Linear Program (LP) solver.
Definition: solver_LP_abstract.hh:41
Definition: solver_LP_qpoases.hh:16
virtual void getDualSolution(Ref_vectorX res)
Definition: solver_LP_qpoases.hh:45
virtual double getObjectiveValue()
Definition: solver_LP_qpoases.hh:43
virtual ~Solver_LP_qpoases()
Definition: solver_LP_qpoases.hh:28
#define CENTROIDAL_DYNAMICS_DLLAPI
Definition: local_config.hh:52
Definition: centroidal_dynamics.hh:14
Eigen::Ref< VectorX > Ref_vectorX
Definition: util.hh:53
const Eigen::Ref< const VectorX > & Cref_vectorX
Definition: util.hh:63
const Eigen::Ref< const MatrixXX > & Cref_matrixXX
Definition: util.hh:69
Eigen::Matrix< value_type, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > MatrixXX
Definition: util.hh:49