wbc
QuadraticProgram.hpp
Go to the documentation of this file.
1#ifndef WBC_TYPES_QUADRATIC_PROGRAM_HPP
2#define WBC_TYPES_QUADRATIC_PROGRAM_HPP
3
4#include <base/Eigen.hpp>
5#include <base/Time.hpp>
6#include <base/samples/Joints.hpp>
7
8namespace wbc{
9
10class JointWeights : public base::NamedVector<double>{
11};
12
25
26 int nq;
27 int neq;
28 int nin;
30 bool bounded;
32 base::MatrixXd H;
33 base::VectorXd g;
34 base::MatrixXd A;
35 base::VectorXd b;
36 base::MatrixXd C;
37 base::VectorXd lower_y;
38 base::VectorXd upper_y;
39 base::VectorXd lower_x;
40 base::VectorXd upper_x;
41 base::VectorXd Wy;
44 void resize(uint nq, uint neq, uint nin, bool bounds);
45
47 void check() const;
48
50 void print() const;
51
52};
53
58 base::Time time;
59 std::vector<QuadraticProgram> prios;
60 base::VectorXd Wq;
62 size_t size() const {
63 return prios.size();
64 }
66 return prios[i];
67 }
68 const QuadraticProgram& operator[](int i) const {
69 return prios[i];
70 }
72 prios.push_back(qp);
73 }
74 void resize(const size_t &n){prios.resize(n);}
75};
76
77}
78
79#endif // LINEAR_EQUALITY_CONSTRAINTS_HPP
Definition QuadraticProgram.hpp:10
Definition ContactsAccelerationConstraint.cpp:3
Describes a hierarchy of quadratic programs.
Definition QuadraticProgram.hpp:57
const QuadraticProgram & operator[](int i) const
Definition QuadraticProgram.hpp:68
base::VectorXd Wq
Definition QuadraticProgram.hpp:60
void resize(const size_t &n)
Definition QuadraticProgram.hpp:74
std::vector< QuadraticProgram > prios
Definition QuadraticProgram.hpp:59
base::Time time
Definition QuadraticProgram.hpp:58
size_t size() const
Definition QuadraticProgram.hpp:62
void operator<<(QuadraticProgram &qp)
Definition QuadraticProgram.hpp:71
QuadraticProgram & operator[](int i)
Definition QuadraticProgram.hpp:65
Describes a quadratic program of the form.
Definition QuadraticProgram.hpp:24
int nin
Definition QuadraticProgram.hpp:28
base::VectorXd g
Definition QuadraticProgram.hpp:33
base::VectorXd lower_y
Definition QuadraticProgram.hpp:37
base::VectorXd upper_x
Definition QuadraticProgram.hpp:40
base::MatrixXd A
Definition QuadraticProgram.hpp:34
void resize(uint nq, uint neq, uint nin, bool bounds)
Definition QuadraticProgram.cpp:6
base::VectorXd lower_x
Definition QuadraticProgram.hpp:39
base::VectorXd Wy
Definition QuadraticProgram.hpp:41
bool bounded
Definition QuadraticProgram.hpp:30
void check() const
Definition QuadraticProgram.cpp:42
int nq
Definition QuadraticProgram.hpp:26
base::MatrixXd H
Definition QuadraticProgram.hpp:32
void print() const
Definition QuadraticProgram.cpp:80
base::VectorXd b
Definition QuadraticProgram.hpp:35
base::VectorXd upper_y
Definition QuadraticProgram.hpp:38
base::MatrixXd C
Definition QuadraticProgram.hpp:36
int neq
Definition QuadraticProgram.hpp:27