10 #ifndef __ONE_LEVEL_SOLVER_H__ 11 #define __ONE_LEVEL_SOLVER_H__ 30 #include <qpOASES.hpp> 47 typedef Eigen::Matrix<double,Eigen::Dynamic,Eigen::Dynamic,Eigen::RowMajor>
MatrixXdRm;
64 virtual ~OneLevelSolver();
91 virtual OneLevelSolver::Ptr
clone()
const = 0;
108 void reduceConstraints(
const Eigen::MatrixXd& A,
const Eigen::VectorXd& b, Eigen::MatrixXd& Ar, Eigen::VectorXd& br,
double tolerance=1e-6);
156 virtual OneLevelSolver::Ptr
clone()
const{
return std::make_shared<OneLevelSolverWithQuadProg>();}
158 virtual ~OneLevelSolverWithQuadProg();
188 virtual OneLevelSolver::Ptr
clone()
const{
return std::make_shared<OneLevelSolverWithQPOASES>();}
194 std::unique_ptr<qpOASES::SQProblem> sqp_prob;
197 std::vector<qpOASES::real_t>
H;
212 Eigen::VectorXd _lbA,_lbG,_ubA,
_ubG;
249 virtual OneLevelSolver::Ptr
clone()
const{
return std::make_shared<OneLevelSolverWithQLD>();}
void removeObjective(ObjectiveType &obj)
void addObjective(ObjectiveType &obj)
Eigen::Map< Eigen::VectorXd > VectorMap
Eigen::VectorXd Xsolution
void internalAddObjective(const GenericObjective &objective)
const Eigen::VectorXd & getQuadraticVector()
Declaration file of the SquaredLinearFunction class.
Declaration file of the Model class.
virtual void prepareMatrices()
virtual OneLevelSolver::Ptr clone() const =0
ocra::ObjQLD * _QLDsolver
virtual OneLevelSolver::Ptr clone() const
const Eigen::MatrixXd & getQuadraticMatrix()
Solver class that only consider one level of importance for all tasks using Quadprog++.
std::vector< ocra::LinearConstraint * > _inequalityConstraints
Eigen::Map< Eigen::MatrixXd > MatrixMap
#define DEFINE_CLASS_POINTER_TYPEDEFS(Class)
void internalRemoveObjective(const GenericObjective &objective)
void writePerformanceInStream(std::ostream &myOstream, bool addCommaAtEnd)
Optimization-based Robot Controller namespace. a library of classes to write and solve optimization p...
virtual OneLevelSolver::Ptr clone() const
virtual void updateObjectiveEquations()=0
virtual std::string toString()
virtual void doConclude()
void reduceConstraints(const Eigen::MatrixXd &A, const Eigen::VectorXd &b, Eigen::MatrixXd &Ar, Eigen::VectorXd &br, double tolerance=1e-6)
void removeConstraint(ocra::LinearConstraint &constraint)
void addConstraint(ocra::LinearConstraint &constraint)
const std::vector< ObjectiveType * > & getObjectives()
Declaration file of the Solver class.
virtual void updateConstraintEquations()=0
Declaration file of the ObjQLD class. This class should be merged with ocra::ObjQLD. It has been created to have a cml-free solver.
A generic abstract class the solvers that can be used in the wOcra Controller.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > MatrixXdRm
virtual void printValuesAtSolution()
qpOASES::Options sqp_options
Solver class that only consider one level of importance for all tasks using QLD.
std::vector< qpOASES::real_t > H
virtual void setObjectiveLevel(ocra::GenericObjective &obj, int level)
virtual ~OneLevelSolverWithQPOASES()
Declaration file of the Objective class.
std::vector< ObjectiveType * > _objectives
Solver class that only consider one level of importance for all tasks using QPOASES.
virtual OneLevelSolver::Ptr clone() const
Declaration file of the QuadraticFunction class.
Some enumerations for the control.
std::vector< ocra::LinearConstraint * > _equalityConstraints