solver-HQP-qpmad.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2022 Inria
3 //
4 // This file is part of tsid
5 // tsid is free software: you can redistribute it
6 // and/or modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation, either version
8 // 3 of the License, or (at your option) any later version.
9 // tsid is distributed in the hope that it will be
10 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
11 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // General Lesser Public License for more details. You should have
13 // received a copy of the GNU Lesser General Public License along with
14 // tsid If not, see
15 // <http://www.gnu.org/licenses/>.
16 //
17 
18 #ifndef __invdyn_solvers_hqp_qpmad_hpp__
19 #define __invdyn_solvers_hqp_qpmad_hpp__
20 
22 
23 #include <qpmad/solver.h>
24 
25 namespace tsid
26 {
27  namespace solvers
28  {
32  class TSID_DLLAPI SolverHQpmad:
33  public SolverHQPBase
34  {
35  public:
36  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
37 
43 
44  typedef qpmad::SolverParameters Settings;
45 
46  SolverHQpmad(const std::string & name);
47 
48  void resize(unsigned int n, unsigned int neq, unsigned int nin);
49 
52  const HQPOutput & solve(const HQPData & problemData);
53 
55  double getObjectiveValue();
56 
57  Settings& settings() { return m_settings; }
58 
59  protected:
60 
61  void sendMsg(const std::string & s);
62 
63  qpmad::Solver m_solver;
65 
67 
68  Matrix m_H; // hessian matrix
69  Vector m_g; // gradient vector
70  Vector m_lb; // gradient vector
71  Vector m_ub; // gradient vector
72  Matrix m_C; // constraint matrix
73  Vector m_cl; // constraints lower bound
74  Vector m_cu; // constraints upper bound
75 
77 
78  unsigned int m_nc;
79  unsigned int m_n;
80  };
81  }
82 }
83 
84 #endif // ifndef __invdyn_solvers_hqp_qpmad_hpp__
tsid::solvers::SolverHQpmad::ConstRefMatrix
math::ConstRefMatrix ConstRefMatrix
Definition: solver-HQP-qpmad.hpp:42
tsid::solvers::SolverHQpmad::m_cu
Vector m_cu
Definition: solver-HQP-qpmad.hpp:74
tsid::math::Vector
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: fwd.hpp:37
tsid::solvers::SolverHQpmad::m_hessian_regularization
double m_hessian_regularization
Definition: solver-HQP-qpmad.hpp:76
tsid::solvers::SolverHQpmad::m_has_bounds
bool m_has_bounds
Definition: solver-HQP-qpmad.hpp:66
tsid::solvers::SolverHQpmad::m_C
Matrix m_C
Definition: solver-HQP-qpmad.hpp:72
tsid::solvers::SolverHQpmad::m_ub
Vector m_ub
Definition: solver-HQP-qpmad.hpp:71
tsid::solvers::SolverHQpmad::m_H
Matrix m_H
Definition: solver-HQP-qpmad.hpp:68
tsid::solvers::SolverHQpmad::m_settings
Settings m_settings
Definition: solver-HQP-qpmad.hpp:64
tsid::math::Matrix
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > Matrix
Definition: fwd.hpp:38
tsid::solvers::SolverHQpmad::settings
Settings & settings()
Definition: solver-HQP-qpmad.hpp:57
tsid::solvers::SolverHQpmad::m_cl
Vector m_cl
Definition: solver-HQP-qpmad.hpp:73
tsid::solvers::SolverHQpmad::m_g
Vector m_g
Definition: solver-HQP-qpmad.hpp:69
tsid::math::RefVector
Eigen::Ref< Vector > RefVector
Definition: fwd.hpp:49
tsid::solvers::HQPOutput
Definition: solver-HQP-output.hpp:32
tsid::solvers::SolverHQpmad::RefVector
math::RefVector RefVector
Definition: solver-HQP-qpmad.hpp:40
tsid::solvers::SolverHQPBase
Abstract interface for a Quadratic Program (HQP) solver.
Definition: solver-HQP-base.hpp:36
tsid::solvers::SolverHQpmad::m_lb
Vector m_lb
Definition: solver-HQP-qpmad.hpp:70
tsid::solvers::SolverHQpmad::m_nc
unsigned int m_nc
Definition: solver-HQP-qpmad.hpp:78
solver-HQP-base.hpp
tsid::solvers::SolverHQpmad::m_n
unsigned int m_n
number of equality-inequality constraints
Definition: solver-HQP-qpmad.hpp:79
tsid::math::ConstRefVector
const typedef Eigen::Ref< const Vector > ConstRefVector
Definition: fwd.hpp:50
tsid::solvers::SolverHQpmad
Implementation of Quadratic Program (HQP) solver using qpmad.
Definition: solver-HQP-qpmad.hpp:32
tsid
Definition: constraint-bound.hpp:26
tsid::solvers::SolverHQpmad::Matrix
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Matrix Matrix
Definition: solver-HQP-qpmad.hpp:38
tsid::solvers::SolverHQpmad::m_solver
qpmad::Solver m_solver
Definition: solver-HQP-qpmad.hpp:63
tsid::math::ConstRefMatrix
const typedef Eigen::Ref< const Matrix > ConstRefMatrix
Definition: fwd.hpp:53
tsid::solvers::SolverHQpmad::ConstRefVector
math::ConstRefVector ConstRefVector
Definition: solver-HQP-qpmad.hpp:41
tsid::solvers::SolverHQpmad::Settings
qpmad::SolverParameters Settings
Definition: solver-HQP-qpmad.hpp:44
tsid::solvers::HQPData
pinocchio::container::aligned_vector< ConstraintLevel > HQPData
Definition: fwd.hpp:91
tsid::solvers::SolverHQpmad::Vector
math::Vector Vector
Definition: solver-HQP-qpmad.hpp:39