wbc
ProxQPSolver.hpp
Go to the documentation of this file.
1#ifndef WBC_SOLVERS_PROXQP_SOLVER_HPP
2#define WBC_SOLVERS_PROXQP_SOLVER_HPP
3
5
6#include <memory>
7#include <iostream>
8#include <base/Time.hpp>
9
10#include <proxsuite/proxqp/dense/wrapper.hpp>
11
12namespace wbc {
13
14class HierarchicalQP;
15
27class ProxQPSolver : public QPSolver{
28private:
30
31public:
33 virtual ~ProxQPSolver() noexcept { };
34
41 virtual void solve(const wbc::HierarchicalQP& hierarchical_qp, base::VectorXd& solver_output);
42
44 void setMaxNIter(const uint& n){ _n_iter = n; }
45
47 uint getMaxNIter(){ return _n_iter; }
48
50 int getNter(){ return _actual_n_iter; }
51
52protected:
53
54 std::shared_ptr<proxsuite::proxqp::dense::QP<double>> _solver_ptr;
55
56 double _eps_abs = 1e-9;
59
60 size_t _n_var_init; // number of variables in the configured solver instance
61 size_t _n_eq_init; // number of equalities in the configured solver instance
62 size_t _n_in_init; // number of inequalities in the configured solver instance (inclusing bounds)
63
64 Eigen::MatrixXd _C_mtx; // inequalities matrix (including bounds)
65 Eigen::VectorXd _l_vec; // inequalities lower bounds
66 Eigen::VectorXd _u_vec; // inequalities upper bounds
67};
68
69}
70
71#endif
The ProxQPSolver class is a wrapper for the qp-solver prox-qp (see https://github....
Definition ProxQPSolver.hpp:27
uint getMaxNIter()
Definition ProxQPSolver.hpp:47
virtual ~ProxQPSolver() noexcept
Definition ProxQPSolver.hpp:33
double _eps_abs
Definition ProxQPSolver.hpp:56
std::shared_ptr< proxsuite::proxqp::dense::QP< double > > _solver_ptr
Definition ProxQPSolver.hpp:54
int getNter()
Definition ProxQPSolver.hpp:50
size_t _n_in_init
Definition ProxQPSolver.hpp:62
Eigen::MatrixXd _C_mtx
Definition ProxQPSolver.hpp:64
virtual void solve(const wbc::HierarchicalQP &hierarchical_qp, base::VectorXd &solver_output)
solve Solve the given quadratic program
Definition ProxQPSolver.cpp:24
ProxQPSolver()
Definition ProxQPSolver.cpp:14
size_t _n_eq_init
Definition ProxQPSolver.hpp:61
Eigen::VectorXd _u_vec
Definition ProxQPSolver.hpp:66
size_t _n_var_init
Definition ProxQPSolver.hpp:60
int _actual_n_iter
Definition ProxQPSolver.hpp:58
Eigen::VectorXd _l_vec
Definition ProxQPSolver.hpp:65
int _n_iter
Definition ProxQPSolver.hpp:57
void setMaxNIter(const uint &n)
Definition ProxQPSolver.hpp:44
Definition QPSolver.hpp:14
Definition ContactsAccelerationConstraint.cpp:3
Describes a hierarchy of quadratic programs.
Definition QuadraticProgram.hpp:57
Definition QPSolver.hpp:67