Loading...
Searching...
No Matches
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
25namespace tsid
26{
27 namespace solvers
28 {
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__
Definition: solver-HQP-output.hpp:33
Abstract interface for a Quadratic Program (HQP) solver.
Definition: solver-HQP-base.hpp:37
Implementation of Quadratic Program (HQP) solver using qpmad.
Definition: solver-HQP-qpmad.hpp:34
Vector m_ub
Definition: solver-HQP-qpmad.hpp:71
math::ConstRefMatrix ConstRefMatrix
Definition: solver-HQP-qpmad.hpp:42
math::Vector Vector
Definition: solver-HQP-qpmad.hpp:39
Vector m_cu
Definition: solver-HQP-qpmad.hpp:74
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Matrix Matrix
Definition: solver-HQP-qpmad.hpp:38
Matrix m_H
Definition: solver-HQP-qpmad.hpp:68
Settings m_settings
Definition: solver-HQP-qpmad.hpp:64
math::RefVector RefVector
Definition: solver-HQP-qpmad.hpp:40
Settings & settings()
Definition: solver-HQP-qpmad.hpp:57
qpmad::SolverParameters Settings
Definition: solver-HQP-qpmad.hpp:44
qpmad::Solver m_solver
Definition: solver-HQP-qpmad.hpp:63
unsigned int m_n
number of equality-inequality constraints
Definition: solver-HQP-qpmad.hpp:79
unsigned int m_nc
Definition: solver-HQP-qpmad.hpp:78
double m_hessian_regularization
Definition: solver-HQP-qpmad.hpp:76
math::ConstRefVector ConstRefVector
Definition: solver-HQP-qpmad.hpp:41
Vector m_cl
Definition: solver-HQP-qpmad.hpp:73
Vector m_lb
Definition: solver-HQP-qpmad.hpp:70
bool m_has_bounds
Definition: solver-HQP-qpmad.hpp:66
Vector m_g
Definition: solver-HQP-qpmad.hpp:69
Matrix m_C
Definition: solver-HQP-qpmad.hpp:72
#define TSID_DLLAPI
Definition: config.hh:64
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: fwd.hpp:37
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > Matrix
Definition: fwd.hpp:38
const Eigen::Ref< const Matrix > ConstRefMatrix
Definition: fwd.hpp:53
const Eigen::Ref< const Vector > ConstRefVector
Definition: fwd.hpp:50
Eigen::Ref< Vector > RefVector
Definition: fwd.hpp:49
pinocchio::container::aligned_vector< ConstraintLevel > HQPData
Definition: fwd.hpp:91
Definition: constraint-bound.hpp:27