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 <Eigen/Cholesky>
13 #include <vector>
14 
15 #include "crocoddyl/core/solvers/box-qp.hpp"
16 #include "crocoddyl/core/solvers/ddp.hpp"
17 
18 namespace crocoddyl {
19 
20 class SolverBoxDDP : public SolverDDP {
21  public:
22  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
23 
24  explicit SolverBoxDDP(boost::shared_ptr<ShootingProblem> problem);
25  virtual ~SolverBoxDDP();
26 
27  virtual void allocateData();
28  virtual void computeGains(const std::size_t t);
29  virtual void forwardPass(const double steplength);
30  virtual void resizeData();
31 
32  const std::vector<Eigen::MatrixXd>& get_Quu_inv() const;
33 
34  protected:
35  BoxQP qp_;
36  std::vector<Eigen::MatrixXd> Quu_inv_;
37  std::vector<Eigen::VectorXd> du_lb_;
38  std::vector<Eigen::VectorXd> du_ub_;
39 };
40 
41 } // namespace crocoddyl
42 
43 #endif // CROCODDYL_CORE_SOLVERS_BOX_DDP_HPP_
This class implements a Box QP solver based on a Projected Newton method.
Definition: box-qp.hpp:82