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) override;
45 
48  const HQPOutput& solve(const HQPData& problemData) override;
49 
51  void retrieveQPData(const HQPData& problemData,
52  const bool hessianRegularization = true) override;
53 
55  double getObjectiveValue() override;
56 
57  Settings& settings() { return m_settings; }
58 
59  protected:
60  void sendMsg(const std::string& s);
61 
62  qpmad::Solver m_solver;
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__
tsid::solvers::SolverHQpmad::ConstRefMatrix
math::ConstRefMatrix ConstRefMatrix
Definition: solver-HQP-qpmad.hpp:38
tsid::solvers::SolverHQpmad::m_cu
Vector m_cu
Definition: solver-HQP-qpmad.hpp:73
test_Solvers.neq
int neq
Definition: test_Solvers.py:13
tsid::solvers::SolverHQpmad::m_hessian_regularization
double m_hessian_regularization
Definition: solver-HQP-qpmad.hpp:75
tsid::solvers::SolverHQpmad::m_has_bounds
bool m_has_bounds
Definition: solver-HQP-qpmad.hpp:65
tsid::solvers::SolverHQpmad::m_C
Matrix m_C
Definition: solver-HQP-qpmad.hpp:71
tsid::solvers::SolverHQpmad::m_ub
Vector m_ub
Definition: solver-HQP-qpmad.hpp:70
tsid::solvers::SolverHQpmad::m_H
Matrix m_H
Definition: solver-HQP-qpmad.hpp:67
tsid::solvers::SolverHQpmad::m_settings
Settings m_settings
Definition: solver-HQP-qpmad.hpp:63
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:72
tsid::solvers::SolverHQpmad::m_g
Vector m_g
Definition: solver-HQP-qpmad.hpp:68
solve
Mat & solve(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< Mat > &y)
tsid::math::RefVector
Eigen::Ref< Vector > RefVector
Definition: math/fwd.hpp:47
tsid::solvers::HQPOutput
Definition: solver-HQP-output.hpp:29
tsid::solvers::SolverHQpmad::RefVector
math::RefVector RefVector
Definition: solver-HQP-qpmad.hpp:36
tsid::solvers::SolverHQPBase
Abstract interface for a Quadratic Program (HQP) solver.
Definition: solver-HQP-base.hpp:34
test_Solvers.nin
int nin
Definition: test_Solvers.py:14
tsid::solvers::SolverHQpmad::m_lb
Vector m_lb
Definition: solver-HQP-qpmad.hpp:69
tsid::solvers::SolverHQpmad::m_nc
unsigned int m_nc
Definition: solver-HQP-qpmad.hpp:77
tsid::math::Matrix
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > Matrix
Definition: math/fwd.hpp:36
setup.name
name
Definition: setup.in.py:179
solver-HQP-base.hpp
tsid::solvers::SolverHQpmad::m_n
unsigned int m_n
number of equality-inequality constraints
Definition: solver-HQP-qpmad.hpp:78
tsid::math::ConstRefVector
const typedef Eigen::Ref< const Vector > ConstRefVector
Definition: math/fwd.hpp:48
tsid::math::Vector
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: math/fwd.hpp:35
tsid::solvers::SolverHQpmad
Implementation of Quadratic Program (HQP) solver using qpmad.
Definition: solver-HQP-qpmad.hpp:30
tsid
Definition: bindings/python/constraint/constraint-bound.cpp:21
test_Formulation.s
s
Definition: test_Formulation.py:115
tsid::solvers::SolverHQpmad::Matrix
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Matrix Matrix
Definition: solver-HQP-qpmad.hpp:34
tsid::solvers::SolverHQpmad::m_solver
qpmad::Solver m_solver
Definition: solver-HQP-qpmad.hpp:62
tsid::math::ConstRefMatrix
const typedef Eigen::Ref< const Matrix > ConstRefMatrix
Definition: math/fwd.hpp:51
tsid::solvers::SolverHQpmad::ConstRefVector
math::ConstRefVector ConstRefVector
Definition: solver-HQP-qpmad.hpp:37
tsid::solvers::SolverHQpmad::Settings
qpmad::SolverParameters Settings
Definition: solver-HQP-qpmad.hpp:40
tsid::solvers::HQPData
pinocchio::container::aligned_vector< ConstraintLevel > HQPData
Definition: solvers/fwd.hpp:99
tsid::solvers::SolverHQpmad::Vector
math::Vector Vector
Definition: solver-HQP-qpmad.hpp:35
n
Vec3f n


tsid
Author(s): Andrea Del Prete, Justin Carpentier
autogenerated on Sat May 3 2025 02:48:17