solver-HQP-eiquadprog-rt.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2017 CNRS
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_eiquadprog_rt_hpp__
19 #define __invdyn_solvers_hqp_eiquadprog_rt_hpp__
20 
21 #include "tsid/math/fwd.hpp"
22 #include "tsid/solvers/fwd.hpp"
24 
26 
27 namespace tsid {
28 namespace solvers {
32 template <int nVars, int nEqCon, int nIneqCon>
33 class TSID_DLLAPI SolverHQuadProgRT : public SolverHQPBase {
34  public:
35  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
36 
42 
43  SolverHQuadProgRT(const std::string& name);
44 
45  void resize(unsigned int n, unsigned int neq, unsigned int nin);
46 
49  const HQPOutput& solve(const HQPData& problemData);
50 
51  // TODO: change eiquadprog-rt to new API
53  void retrieveQPData(const HQPData& /*problemData*/,
54  const bool /*hessianRegularization = true*/){};
55 
56  // /** Return the QP data object. */
57  // const QPDataQuadProg getQPData() const { return m_qpData; }
58 
60  double getObjectiveValue();
61 
63  bool setMaximumIterations(unsigned int maxIter);
64 
65  protected:
66  void sendMsg(const std::string& s);
67 
69 
75  m_CI;
77  double m_objValue;
78 
80 
84 
85  // Eigen::FullPivLU<template RtMatrixX<nEqCon, nVars> > m_CE_lu;
86  // ColPivHouseholderQR
87 
88  int m_neq;
89  int m_nin;
90  int m_n;
91 };
92 } // namespace solvers
93 } // namespace tsid
94 
95 #endif // ifndef __invdyn_solvers_hqp_eiquadprog_rt_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
RtVectorX< 2 *nIneqCon >::d m_ci0
twice the rows because inequality constraints are bilateral
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: math/fwd.hpp:35
RtMatrixX< nEqCon, nVars >::d m_CE
class TSID_DLLAPI SolverHQuadProgRT
Definition: solvers/fwd.hpp:75
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Matrix Matrix
int m_nin
number of equality constraints
int m_n
number of inequality constraints
int m_activeSetSize
vector containing the indexes of the active inequalities
const Eigen::Ref< const Vector > ConstRefVector
Definition: math/fwd.hpp:48
eiquadprog::solvers::RtEiquadprog< nVars, nEqCon, 2 *nIneqCon > m_solver
RtMatrixX< 2 *nIneqCon, nVars >::d m_CI
Mat & solve(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< Mat > &y)
void retrieveQPData(const HQPData &, const bool)
Eigen::VectorXi VectorXi
Definition: math/fwd.hpp:37
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