Crocoddyl
box-ddp.hpp
1 // BSD 3-Clause License
3 //
4 // Copyright (C) 2019-2020, CNRS-LAAS, University of Edinburgh
5 // Copyright note valid unless otherwise stated in individual files.
6 // All rights reserved.
8 
9 #ifndef CROCODDYL_CORE_SOLVERS_BOX_DDP_HPP_
10 #define CROCODDYL_CORE_SOLVERS_BOX_DDP_HPP_
11 
12 #include "crocoddyl/core/solvers/box-qp.hpp"
13 #include "crocoddyl/core/solvers/ddp.hpp"
14 
15 namespace crocoddyl {
16 
17 class SolverBoxDDP : public SolverDDP {
18  public:
19  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
20 
21  explicit SolverBoxDDP(std::shared_ptr<ShootingProblem> problem);
22  virtual ~SolverBoxDDP();
23 
24  virtual void allocateData();
25  virtual void computeGains(const std::size_t t);
26  virtual void forwardPass(const double steplength);
27  virtual void resizeData();
28 
29  const std::vector<Eigen::MatrixXd>& get_Quu_inv() const;
30 
31  protected:
32  BoxQP qp_;
33  std::vector<Eigen::MatrixXd> Quu_inv_;
34  std::vector<Eigen::VectorXd> du_lb_;
35  std::vector<Eigen::VectorXd> du_ub_;
36 };
37 
38 } // namespace crocoddyl
39 
40 #endif // CROCODDYL_CORE_SOLVERS_BOX_DDP_HPP_
This class implements a Box QP solver based on a Projected Newton method.
Definition: box-qp.hpp:79