crocoddyl  1.6.0
Contact RObot COntrol by Differential DYnamic programming Library (Crocoddyl)
fddp.hpp
1 // BSD 3-Clause License
3 //
4 // Copyright (C) 2019-2020, LAAS-CNRS, University of Edinburgh
5 // Copyright note valid unless otherwise stated in individual files.
6 // All rights reserved.
8 
9 #ifndef CROCODDYL_CORE_SOLVERS_FDDP_HPP_
10 #define CROCODDYL_CORE_SOLVERS_FDDP_HPP_
11 
12 #include <Eigen/Cholesky>
13 #include <vector>
14 
15 #include "crocoddyl/core/solvers/ddp.hpp"
16 
17 namespace crocoddyl {
18 
50 class SolverFDDP : public SolverDDP {
51  public:
52  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
53 
57  explicit SolverFDDP(boost::shared_ptr<ShootingProblem> problem);
58  virtual ~SolverFDDP();
59 
60  virtual bool solve(const std::vector<Eigen::VectorXd>& init_xs = DEFAULT_VECTOR,
61  const std::vector<Eigen::VectorXd>& init_us = DEFAULT_VECTOR, const std::size_t& maxiter = 100,
62  const bool& is_feasible = false, const double& regInit = 1e-9);
63 
76  virtual const Eigen::Vector2d& expectedImprovement();
77 
82  virtual void forwardPass(const double& stepLength);
83 
87  double get_th_acceptnegstep() const;
88 
92  void set_th_acceptnegstep(const double& th_acceptnegstep);
93 
94  protected:
95  double dg_;
96  double dq_;
97  double dv_;
98 
99  private:
100  double th_acceptnegstep_;
101 };
102 
103 } // namespace crocoddyl
104 
105 #endif // CROCODDYL_CORE_SOLVERS_FDDP_HPP_
void updateExpectedImprovement()
Update internal values for computing the expected improvement.
Definition: fddp.cpp:126
double dq_
Internal data for computing the expected improvement.
Definition: fddp.hpp:96
virtual bool solve(const std::vector< Eigen::VectorXd > &init_xs=DEFAULT_VECTOR, const std::vector< Eigen::VectorXd > &init_us=DEFAULT_VECTOR, const std::size_t &maxiter=100, const bool &is_feasible=false, const double &regInit=1e-9)
Compute the optimal trajectory as lists of and terms.
Definition: fddp.cpp:19
EIGEN_MAKE_ALIGNED_OPERATOR_NEW SolverFDDP(boost::shared_ptr< ShootingProblem > problem)
Initialize the FDDP solver.
Definition: fddp.cpp:14
Feasibility-driven Differential Dynamic Programming (FDDP) solver.
Definition: fddp.hpp:50
double dg_
Internal data for computing the expected improvement.
Definition: fddp.hpp:95
void set_th_acceptnegstep(const double &th_acceptnegstep)
Modify the threshold used for accepting step along ascent direction.
Definition: fddp.cpp:232
double get_th_acceptnegstep() const
Return the threshold used for accepting step along ascent direction.
Definition: fddp.cpp:230
double dv_
Internal data for computing the expected improvement.
Definition: fddp.hpp:97
Differential Dynamic Programming (DDP) solver.
Definition: ddp.hpp:48
virtual void forwardPass(const double &stepLength)
Run the forward pass or rollout.
Definition: fddp.cpp:150
virtual const Eigen::Vector2d & expectedImprovement()
Definition: fddp.cpp:107