fwd.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_fwd_hpp__
19 #define __invdyn_solvers_fwd_hpp__
20 
21 #include <memory>
22 
23 #include "tsid/config.hh"
24 #include "tsid/math/fwd.hpp"
25 #include <pinocchio/container/aligned-vector.hpp>
26 
27 #define DEFAULT_HESSIAN_REGULARIZATION 1e-8
28 
29 namespace tsid
30 {
31  namespace solvers
32  {
33 
37  enum TSID_DLLAPI SolverHQP
38  {
41  SOLVER_HQP_EIQUADPROG_RT = 2
42 #ifdef TSID_QPMAD_FOUND
43  ,SOLVER_HQP_QPMAD
44 #endif
45 #ifdef QPOASES_FOUND
46  ,SOLVER_HQP_OASES
47 #endif
48  };
49 
50 
54  enum TSID_DLLAPI HQPStatus
55  {
61  HQP_STATUS_ERROR=4
62  };
63 
64  class HQPOutput;
65 
66  class TSID_DLLAPI SolverHQPBase;
67 
68  template<int nVars, int nEqCon, int nIneqCon>
69  class TSID_DLLAPI SolverHQuadProgRT;
70 
71  template<typename T1, typename T2>
73  {
74  public:
75  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
76 
77  aligned_pair(const T1 & t1, const T2 & t2) : first(t1), second(t2) {}
78 
79  T1 first;
80  T2 second;
81 
82  };
83 
84  template<typename T1, typename T2>
85  inline aligned_pair<T1,T2> make_pair(const T1 & t1, const T2 & t2)
86  { return aligned_pair<T1,T2>(t1,t2); }
87 
88 
89  typedef pinocchio::container::aligned_vector< aligned_pair<double, std::shared_ptr<math::ConstraintBase> > > ConstraintLevel;
90  typedef pinocchio::container::aligned_vector< aligned_pair<double, std::shared_ptr<const math::ConstraintBase> > > ConstConstraintLevel;
91  typedef pinocchio::container::aligned_vector<ConstraintLevel> HQPData;
92  typedef pinocchio::container::aligned_vector<ConstConstraintLevel> ConstHQPData;
93 
94 
95  }
96 }
97 
98 #endif // ifndef __invdyn_solvers_fwd_hpp__
tsid::solvers::ConstHQPData
pinocchio::container::aligned_vector< ConstConstraintLevel > ConstHQPData
Definition: fwd.hpp:92
tsid::solvers::make_pair
aligned_pair< T1, T2 > make_pair(const T1 &t1, const T2 &t2)
Definition: fwd.hpp:85
tsid::solvers::aligned_pair::second
T2 second
Definition: fwd.hpp:80
tsid::solvers::ConstraintLevel
pinocchio::container::aligned_vector< aligned_pair< double, std::shared_ptr< math::ConstraintBase > > > ConstraintLevel
Definition: fwd.hpp:89
tsid::solvers::aligned_pair
Definition: fwd.hpp:72
tsid::solvers::SolverHQuadProgRT
Definition: solver-HQP-eiquadprog-rt.hpp:35
tsid::solvers::aligned_pair::aligned_pair
EIGEN_MAKE_ALIGNED_OPERATOR_NEW aligned_pair(const T1 &t1, const T2 &t2)
Definition: fwd.hpp:77
HQP_STATUS_UNKNOWN
HQP_STATUS_UNKNOWN
Definition: fwd.hpp:56
tsid::solvers::SolverHQPBase
Abstract interface for a Quadratic Program (HQP) solver.
Definition: solver-HQP-base.hpp:36
tsid::solvers::aligned_pair::first
T1 first
Definition: fwd.hpp:79
fwd.hpp
HQP_STATUS_UNBOUNDED
HQP_STATUS_UNBOUNDED
Definition: fwd.hpp:59
SOLVER_HQP_EIQUADPROG
SOLVER_HQP_EIQUADPROG
Definition: fwd.hpp:39
HQP_STATUS_OPTIMAL
HQP_STATUS_OPTIMAL
Definition: fwd.hpp:57
HQP_STATUS_MAX_ITER_REACHED
HQP_STATUS_MAX_ITER_REACHED
Definition: fwd.hpp:60
tsid
Definition: constraint-bound.hpp:26
HQP_STATUS_INFEASIBLE
HQP_STATUS_INFEASIBLE
Definition: fwd.hpp:58
tsid::solvers::HQPData
pinocchio::container::aligned_vector< ConstraintLevel > HQPData
Definition: fwd.hpp:91
SOLVER_HQP_EIQUADPROG_FAST
SOLVER_HQP_EIQUADPROG_FAST
Definition: fwd.hpp:40
tsid::solvers::ConstConstraintLevel
pinocchio::container::aligned_vector< aligned_pair< double, std::shared_ptr< const math::ConstraintBase > > > ConstConstraintLevel
Definition: fwd.hpp:90