tsid 1.9.0
Efficient Task Space Inverse Dynamics for Multi-body Systems based on Pinocchio
Loading...
Searching...
No Matches
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"
24
26
27namespace tsid {
28namespace solvers {
32template <int nVars, int nEqCon, int nIneqCon>
33class 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) override;
46
49 const HQPOutput& solve(const HQPData& problemData) override;
50
51 // TODO: change eiquadprog-rt to new API
53 void retrieveQPData(const HQPData& /*problemData*/,
54 const bool /*hessianRegularization = true*/) override {}
55
56 // /** Return the QP data object. */
57 // const QPDataQuadProg getQPData() const { return m_qpData; }
58
60 double getObjectiveValue() override;
61
63 bool setMaximumIterations(unsigned int maxIter) override;
64
65 protected:
66 void sendMsg(const std::string& s);
67
69
77 double m_objValue;
78
80
81 Eigen::VectorXi
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__
Definition solver-HQP-output.hpp:29
SolverHQPBase(const std::string &name)
Definition solver-HQP-base.cpp:16
virtual const std::string & name() const
Definition solver-HQP-base.hpp:47
math::ConstRefVector ConstRefVector
Definition solver-HQP-eiquadprog-rt.hpp:40
eiquadprog::solvers::RtEiquadprog< nVars, nEqCon, 2 *nIneqCon > m_solver
Definition solver-HQP-eiquadprog-rt.hpp:68
RtVectorX< 2 *nIneqCon >::d m_ci0
twice the rows because inequality constraints are bilateral
Definition solver-HQP-eiquadprog-rt.hpp:76
int m_n
number of inequality constraints
Definition solver-HQP-eiquadprog-rt.hpp:90
double m_objValue
Definition solver-HQP-eiquadprog-rt.hpp:77
RtMatrixX< nVars, nVars >::d m_H
Definition solver-HQP-eiquadprog-rt.hpp:70
int m_activeSetSize
vector containing the indexes of the active inequalities
Definition solver-HQP-eiquadprog-rt.hpp:83
RtVectorX< nVars >::d m_g
Definition solver-HQP-eiquadprog-rt.hpp:71
const HQPOutput & solve(const HQPData &problemData) override
Definition solver-HQP-eiquadprog-rt.hxx:51
RtMatrixX< 2 *nIneqCon, nVars >::d m_CI
Definition solver-HQP-eiquadprog-rt.hpp:75
void retrieveQPData(const HQPData &, const bool) override
Definition solver-HQP-eiquadprog-rt.hpp:53
math::ConstRefMatrix ConstRefMatrix
Definition solver-HQP-eiquadprog-rt.hpp:41
Eigen::VectorXi m_activeSet
Definition solver-HQP-eiquadprog-rt.hpp:82
int m_nin
number of equality constraints
Definition solver-HQP-eiquadprog-rt.hpp:89
RtVectorX< nEqCon >::d m_ce0
Definition solver-HQP-eiquadprog-rt.hpp:73
void resize(unsigned int n, unsigned int neq, unsigned int nin) override
Definition solver-HQP-eiquadprog-rt.hxx:38
SolverHQuadProgRT(const std::string &name)
Definition solver-HQP-eiquadprog-rt.hxx:22
math::RefVector RefVector
Definition solver-HQP-eiquadprog-rt.hpp:39
RtMatrixX< nEqCon, nVars >::d m_CE
Definition solver-HQP-eiquadprog-rt.hpp:72
int m_neq
Definition solver-HQP-eiquadprog-rt.hpp:88
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Matrix Matrix
Definition solver-HQP-eiquadprog-rt.hpp:37
double m_hessian_regularization
Definition solver-HQP-eiquadprog-rt.hpp:79
math::Vector Vector
Definition solver-HQP-eiquadprog-rt.hpp:38
const Eigen::Ref< const Matrix > ConstRefMatrix
Definition fwd.hpp:38
const Eigen::Ref< const Vector > ConstRefVector
Definition fwd.hpp:35
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition fwd.hpp:22
Eigen::Ref< Vector > RefVector
Definition fwd.hpp:34
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > Matrix
Definition fwd.hpp:23
Definition fwd.hpp:31
pinocchio::container::aligned_vector< ConstraintLevel > HQPData
Definition fwd.hpp:99
Definition constraint-bound.hpp:25
Eigen::Matrix< double, Rows, Cols > d
Eigen::Matrix< double, Rows, 1 > d