Exotica
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
exotica::ControlLimitedFeasibilityDrivenDDPSolver Class Reference

#include <control_limited_feasibility_driven_ddp_solver.h>

Inheritance diagram for exotica::ControlLimitedFeasibilityDrivenDDPSolver:
Inheritance graph
Collaboration diagram for exotica::ControlLimitedFeasibilityDrivenDDPSolver:
Collaboration graph

Public Member Functions

void Instantiate (const ControlLimitedFeasibilityDrivenDDPSolverInitializer &init) override
 
- Public Member Functions inherited from exotica::AbstractFeasibilityDrivenDDPSolver
void Solve (Eigen::MatrixXd &solution) override
 Solves the problem. More...
 
void SpecifyProblem (PlanningProblemPtr pointer) override
 Binds the solver to a specific problem which must be pre-initalised. More...
 
const std::vector< Eigen::VectorXd > & get_fs () const
 
const std::vector< Eigen::VectorXd > & get_xs () const
 
const std::vector< Eigen::VectorXd > & get_us () const
 
- Public Member Functions inherited from exotica::AbstractDDPSolver
Eigen::VectorXd GetFeedbackControl (Eigen::VectorXdRefConst x, int t) const override
 
const std::vector< Eigen::MatrixXd > & get_Vxx () const
 
const std::vector< Eigen::VectorXd > & get_Vx () const
 
const std::vector< Eigen::MatrixXd > & get_Qxx () const
 
const std::vector< Eigen::MatrixXd > & get_Qux () const
 
const std::vector< Eigen::MatrixXd > & get_Quu () const
 
const std::vector< Eigen::VectorXd > & get_Qx () const
 
const std::vector< Eigen::VectorXd > & get_Qu () const
 
const std::vector< Eigen::MatrixXd > & get_K () const
 
const std::vector< Eigen::VectorXd > & get_k () const
 
const std::vector< Eigen::VectorXd > & get_X_try () const
 
const std::vector< Eigen::VectorXd > & get_U_try () const
 
const std::vector< Eigen::VectorXd > & get_X_ref () const
 
const std::vector< Eigen::VectorXd > & get_U_ref () const
 
const std::vector< Eigen::MatrixXd > & get_Quu_inv () const
 
const std::vector< Eigen::MatrixXd > & get_fx () const
 
const std::vector< Eigen::MatrixXd > & get_fu () const
 
std::vector< double > get_control_cost_evolution () const
 
void set_control_cost_evolution (const int index, const double cost)
 
std::vector< double > get_steplength_evolution () const
 
std::vector< double > get_regularization_evolution () const
 
- Public Member Functions inherited from exotica::MotionSolver
 MotionSolver ()=default
 
virtual ~MotionSolver ()=default
 
void InstantiateBase (const Initializer &init) override
 
PlanningProblemPtr GetProblem () const
 
std::string Print (const std::string &prepend) const override
 
void SetNumberOfMaxIterations (int max_iter)
 
int GetNumberOfMaxIterations ()
 
double GetPlanningTime ()
 
- Public Member Functions inherited from exotica::Object
 Object ()
 
virtual ~Object ()
 
virtual std::string type () const
 Type Information wrapper: must be virtual so that it is polymorphic... More...
 
std::string GetObjectName ()
 
void InstantiateObject (const Initializer &init)
 
- Public Member Functions inherited from exotica::InstantiableBase
 InstantiableBase ()=default
 
virtual ~InstantiableBase ()=default
 
virtual std::vector< InitializerGetAllTemplates () const =0
 
- Public Member Functions inherited from exotica::Instantiable< ControlLimitedFeasibilityDrivenDDPSolverInitializer >
void InstantiateInternal (const Initializer &init) override
 
Initializer GetInitializerTemplate () override
 
std::vector< InitializerGetAllTemplates () const override
 
const ControlLimitedFeasibilityDrivenDDPSolverInitializer & GetParameters () const
 

Protected Member Functions

void ComputeGains (const int t) override
 
void AllocateData () override
 
- Protected Member Functions inherited from exotica::AbstractFeasibilityDrivenDDPSolver
void IncreaseRegularization () override
 
void DecreaseRegularization () override
 
const Eigen::Vector2d & ExpectedImprovement ()
 
void UpdateExpectedImprovement ()
 
bool IsNaN (const double value)
 
void SetCandidate (const std::vector< Eigen::VectorXd > &xs_warm, const std::vector< Eigen::VectorXd > &us_warm, const bool is_feasible)
 
double CheckStoppingCriteria ()
 
double CalcDiff ()
 
bool ComputeDirection (const bool recalcDiff)
 
virtual bool BackwardPassFDDP ()
 
void BackwardPass () override
 Computes the control gains for a the trajectory in the associated DynamicTimeIndexedProblem. More...
 
void ForwardPass (const double steplength)
 
double TryStep (const double steplength)
 
- Protected Member Functions inherited from exotica::AbstractDDPSolver
double ForwardPass (const double alpha)
 Forward simulates the dynamics using the gains computed in the last BackwardPass;. More...
 

Protected Attributes

std::vector< Eigen::MatrixXd > Quu_inv_
 
Eigen::VectorXd du_lb_
 
Eigen::VectorXd du_ub_
 
- Protected Attributes inherited from exotica::AbstractFeasibilityDrivenDDPSolver
int NDX_
 
int last_T_ = -1
 
Eigen::MatrixXd control_limits_
 
double initial_regularization_rate_ = 1e-9
 
bool clamp_to_control_limits_in_forward_pass_ = false
 
double steplength_
 Current applied step-length. More...
 
Eigen::Vector2d d_
 LQ approximation of the expected improvement. More...
 
double dV_
 Cost reduction obtained by TryStep. More...
 
double dVexp_
 Expected cost reduction. More...
 
double th_acceptstep_ = 0.1
 Threshold used for accepting step. More...
 
double th_stop_ = 1e-9
 Tolerance for stopping the algorithm. More...
 
double th_gradient_tolerance_ = 0.
 Gradient tolerance. More...
 
double stop_
 Value computed by CheckStoppingCriteria. More...
 
double dg_ = 0.
 
double dq_ = 0.
 
double dv_ = 0.
 
double th_acceptnegstep_ = 2.
 Threshold used for accepting step along ascent direction. More...
 
std::vector< Eigen::VectorXd > us_
 
std::vector< Eigen::VectorXd > xs_
 
bool is_feasible_ = false
 
double xreg_ = 1e-9
 State regularization. More...
 
double ureg_ = 1e-9
 Control regularization. More...
 
double regmin_ = 1e-9
 Minimum regularization (will not decrease lower) More...
 
double regmax_ = 1e9
 Maximum regularization (to exit by divergence) More...
 
double regfactor_ = 10.
 Factor by which the regularization gets increased/decreased. More...
 
std::vector< Eigen::VectorXd > xs_try_
 State trajectory computed by line-search procedure. More...
 
std::vector< Eigen::VectorXd > us_try_
 Control trajectory computed by line-search procedure. More...
 
std::vector< Eigen::VectorXd > dx_
 
std::vector< Eigen::VectorXd > fs_
 Gaps/defects between shooting nodes. More...
 
Eigen::VectorXd xnext_
 
Eigen::MatrixXd FxTVxx_p_
 
std::vector< Eigen::MatrixXd > FuTVxx_p_
 
std::vector< Eigen::MatrixXd > Qxu_
 
Eigen::VectorXd fTVxx_p_
 
std::vector< Eigen::LDLT< Eigen::MatrixXd > > Quu_ldlt_
 
std::vector< Eigen::VectorXd > Quuk_
 
double th_grad_ = 1e-12
 Tolerance of the expected gradient used for testing the step. More...
 
double th_stepdec_ = 0.5
 Step-length threshold used to decrease regularization. More...
 
double th_stepinc_ = 0.01
 Step-length threshold used to increase regularization. More...
 
bool was_feasible_ = false
 Label that indicates in the previous iterate was feasible. More...
 
- Protected Attributes inherited from exotica::AbstractDDPSolver
DynamicTimeIndexedShootingProblemPtr prob_
 Shared pointer to the planning problem. More...
 
DynamicsSolverPtr dynamics_solver_
 Shared pointer to the dynamics solver. More...
 
AbstractDDPSolverInitializer base_parameters_
 
Eigen::VectorXd alpha_space_
 Backtracking line-search steplengths. More...
 
double lambda_
 Regularization (Vxx, Quu) More...
 
int T_
 Length of shooting problem, i.e., state trajectory. The control trajectory has length T_-1. More...
 
int NU_
 Size of control vector. More...
 
int NX_
 Size of state vector. More...
 
int NDX_
 Size of tangent vector to the state vector. More...
 
int NV_
 Size of velocity vector (tangent vector to the configuration) More...
 
double dt_
 Integration time-step. More...
 
double cost_
 Cost during iteration. More...
 
double control_cost_
 Control cost during iteration. More...
 
double cost_try_
 Total cost computed by line-search procedure. More...
 
double control_cost_try_
 Total control cost computed by line-search procedure. More...
 
double cost_prev_
 Cost during previous iteration. More...
 
double alpha_best_
 Line-search step taken. More...
 
double time_taken_forward_pass_
 
double time_taken_backward_pass_
 
std::vector< Eigen::MatrixXd > Vxx_
 Hessian of the Value function. More...
 
std::vector< Eigen::VectorXd > Vx_
 Gradient of the Value function. More...
 
std::vector< Eigen::MatrixXd > Qxx_
 Hessian of the Hamiltonian. More...
 
std::vector< Eigen::MatrixXd > Qux_
 Hessian of the Hamiltonian. More...
 
std::vector< Eigen::MatrixXd > Quu_
 Hessian of the Hamiltonian. More...
 
std::vector< Eigen::VectorXd > Qx_
 Gradient of the Hamiltonian. More...
 
std::vector< Eigen::VectorXd > Qu_
 Gradient of the Hamiltonian. More...
 
std::vector< Eigen::MatrixXd > K_
 Feedback gains. More...
 
std::vector< Eigen::VectorXd > k_
 Feed-forward terms. More...
 
std::vector< Eigen::VectorXd > X_try_
 Updated state trajectory during iteration (computed by line-search) More...
 
std::vector< Eigen::VectorXd > U_try_
 Updated control trajectory during iteration (computed by line-search) More...
 
std::vector< Eigen::VectorXd > X_ref_
 Reference state trajectory for feedback control. More...
 
std::vector< Eigen::VectorXd > U_ref_
 Reference control trajectory for feedback control. More...
 
std::vector< Eigen::MatrixXd > Quu_inv_
 Inverse of the Hessian of the Hamiltonian. More...
 
std::vector< Eigen::MatrixXd > fx_
 Derivative of the dynamics f w.r.t. x. More...
 
std::vector< Eigen::MatrixXd > fu_
 Derivative of the dynamics f w.r.t. u. More...
 
std::vector< double > control_cost_evolution_
 Evolution of the control cost (control regularization) More...
 
std::vector< double > steplength_evolution_
 Evolution of the steplength. More...
 
std::vector< double > regularization_evolution_
 Evolution of the regularization (xreg/ureg) More...
 
- Protected Attributes inherited from exotica::MotionSolver
PlanningProblemPtr problem_
 
double planning_time_ = -1
 
int max_iterations_ = 100
 
- Protected Attributes inherited from exotica::Instantiable< ControlLimitedFeasibilityDrivenDDPSolverInitializer >
ControlLimitedFeasibilityDrivenDDPSolverInitializer parameters_
 

Additional Inherited Members

- Public Attributes inherited from exotica::Object
std::string ns_
 
std::string object_name_
 
bool debug_
 

Member Function Documentation

◆ AllocateData()

void exotica::ControlLimitedFeasibilityDrivenDDPSolver::AllocateData ( )
overrideprotectedvirtual

◆ ComputeGains()

void exotica::ControlLimitedFeasibilityDrivenDDPSolver::ComputeGains ( const int  t)
overrideprotectedvirtual

◆ Instantiate()

void exotica::ControlLimitedFeasibilityDrivenDDPSolver::Instantiate ( const ControlLimitedFeasibilityDrivenDDPSolverInitializer &  init)
overridevirtual

Member Data Documentation

◆ du_lb_

Eigen::VectorXd exotica::ControlLimitedFeasibilityDrivenDDPSolver::du_lb_
protected

◆ du_ub_

Eigen::VectorXd exotica::ControlLimitedFeasibilityDrivenDDPSolver::du_ub_
protected

◆ Quu_inv_

std::vector<Eigen::MatrixXd> exotica::ControlLimitedFeasibilityDrivenDDPSolver::Quu_inv_
protected

The documentation for this class was generated from the following file: