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 namespace solvers {
30 class TSID_DLLAPI SolverHQpmad : public SolverHQPBase {
31  public:
32  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
33 
39 
40  typedef qpmad::SolverParameters Settings;
41 
42  SolverHQpmad(const std::string& name);
43 
44  void resize(unsigned int n, unsigned int neq, unsigned int nin);
45 
48  const HQPOutput& solve(const HQPData& problemData);
49 
51  void retrieveQPData(const HQPData& problemData,
52  const bool hessianRegularization = true);
53 
55  double getObjectiveValue();
56 
57  Settings& settings() { return m_settings; }
58 
59  protected:
60  void sendMsg(const std::string& s);
61 
62  qpmad::Solver m_solver;
63  Settings m_settings;
64 
66 
67  Matrix m_H; // hessian matrix
68  Vector m_g; // gradient vector
69  Vector m_lb; // gradient vector
70  Vector m_ub; // gradient vector
71  Matrix m_C; // constraint matrix
72  Vector m_cl; // constraints lower bound
73  Vector m_cu; // constraints upper bound
74 
76 
77  unsigned int m_nc;
78  unsigned int m_n;
79 };
80 } // namespace solvers
81 } // namespace tsid
82 
83 #endif // ifndef __invdyn_solvers_hqp_qpmad_hpp__
Eigen::Ref< Vector > RefVector
Definition: math/fwd.hpp:47
const Eigen::Ref< const Matrix > ConstRefMatrix
Definition: math/fwd.hpp:51
s
Vec3f n
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > Matrix
Definition: math/fwd.hpp:36
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Matrix Matrix
math::ConstRefVector ConstRefVector
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: math/fwd.hpp:35
unsigned int m_n
number of equality-inequality constraints
Implementation of Quadratic Program (HQP) solver using qpmad.
const Eigen::Ref< const Vector > ConstRefVector
Definition: math/fwd.hpp:48
Mat & solve(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< Mat > &y)
qpmad::SolverParameters Settings
math::ConstRefMatrix ConstRefMatrix
Abstract interface for a Quadratic Program (HQP) solver.


tsid
Author(s): Andrea Del Prete, Justin Carpentier
autogenerated on Sun Jul 2 2023 02:21:51