ocra-recipes
Doxygen documentation for the ocra-recipes repository
CascadeQP.h
Go to the documentation of this file.
1 
11 #ifndef _OCRABASE_CASCADE_QP_H_
12 #define _OCRABASE_CASCADE_QP_H_
13 
15 #include <memory>
16 #include <vector>
17 
18 //#ifdef USE_QPOASES
19 #include <qpOASES.hpp>
20 //#endif
26 namespace ocra
27 {
31 class CascadeQP
32 {
34 public:
35  CascadeQP();
36  virtual ~CascadeQP();
37 
38 public:
39  std::size_t addHierarchyLevel(ocra::HierarchyLevel::Ptr h);
40  std::size_t addHierarchyLevel(const std::vector<HierarchyLevel::Ptr>& v);
41 
42  void clear(void);
44 
45  const FinalSolution& getSolution() const;
46  const Eigen::VectorXd& getSolutionOfLevel(int i) const;
47  HierarchyLevel::Ptr getHierarchyLevel(int i) const;
48  std::size_t getNumberOfHierarchyLevel() const;
49 protected:
50  void addHierarchyLevel_barre(int i);
51 
52  std::size_t initializeHierarchyLevel_barre();
53 
54  void computeMatrixPQ(int i);
55  void computeEqualitiesConstraints(int i);
57  void computeHierarchyLevel_barre(int i);
58 
59 protected:
60  std::vector<Solution::Ptr> allSolution;
61  std::vector<HierarchyLevel::Ptr> allHierarchyLevel;
62  std::vector<HierarchyLevel_barre::Ptr> allHierarchyLevel_barre;
63  std::vector<MatrixPQ::Ptr> allMatrixPQ;
64  std::vector<EqualitiesConstraints::Ptr> allEqualitiesConstraints;
65  std::vector<InequalitiesConstraints::Ptr> allInequalitiesConstraints;
66  std::vector<int> indexConstraintsViolated ;
67  std::vector<int> indexConstraintsNotViolated ;
69 
70 };
71 }
72 
73 #endif //_OCRABASE_CASCADE_QP_H_
std::vector< Solution::Ptr > allSolution
Definition: CascadeQP.h:60
void clear(void)
std::size_t initializeHierarchyLevel_barre()
std::vector< HierarchyLevel::Ptr > allHierarchyLevel
Definition: CascadeQP.h:61
std::vector< MatrixPQ::Ptr > allMatrixPQ
Definition: CascadeQP.h:63
HierarchyLevel::Ptr getHierarchyLevel(int i) const
std::size_t addHierarchyLevel(ocra::HierarchyLevel::Ptr h)
#define DEFINE_CLASS_POINTER_TYPEDEFS(Class)
Definition: Macros.h:8
FinalSolution f
Definition: CascadeQP.h:68
Optimization-based Robot Controller namespace. a library of classes to write and solve optimization p...
void computeHierarchyLevel_barre(int i)
std::vector< EqualitiesConstraints::Ptr > allEqualitiesConstraints
Definition: CascadeQP.h:64
void computeMatrixPQ(int i)
std::size_t getNumberOfHierarchyLevel() const
const Eigen::VectorXd & getSolutionOfLevel(int i) const
void computeInequalitiesConstraints(int i)
std::vector< HierarchyLevel_barre::Ptr > allHierarchyLevel_barre
Definition: CascadeQP.h:62
void addHierarchyLevel_barre(int i)
std::vector< int > indexConstraintsViolated
Definition: CascadeQP.h:66
const FinalSolution & solveCascadeQP()
virtual ~CascadeQP()
const FinalSolution & getSolution() const
Declaration file of the structures needed in CascadeQP.
std::vector< int > indexConstraintsNotViolated
Definition: CascadeQP.h:67
CascadeQP class.
Definition: CascadeQP.h:31
std::vector< InequalitiesConstraints::Ptr > allInequalitiesConstraints
Definition: CascadeQP.h:65
void computeEqualitiesConstraints(int i)