Exotica
|
#include <abstract_ddp_solver.h>
Public Member Functions | |
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... | |
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 Initializer | GetInitializerTemplate ()=0 |
virtual void | InstantiateInternal (const Initializer &init)=0 |
virtual std::vector< Initializer > | GetAllTemplates () const =0 |
Protected Member Functions | |
virtual void | BackwardPass ()=0 |
Computes the control gains for a the trajectory in the associated DynamicTimeIndexedProblem. More... | |
double | ForwardPass (const double alpha) |
Forward simulates the dynamics using the gains computed in the last BackwardPass;. More... | |
virtual void | IncreaseRegularization () |
virtual void | DecreaseRegularization () |
Protected Attributes | |
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 |
Additional Inherited Members | |
Public Attributes inherited from exotica::Object | |
std::string | ns_ |
std::string | object_name_ |
bool | debug_ |
|
protectedpure virtual |
Computes the control gains for a the trajectory in the associated DynamicTimeIndexedProblem.
Implemented in exotica::AbstractFeasibilityDrivenDDPSolver, exotica::AnalyticDDPSolver, and exotica::ControlLimitedDDPSolver.
|
inlineprotectedvirtual |
Reimplemented in exotica::AbstractFeasibilityDrivenDDPSolver.
|
protected |
Forward simulates the dynamics using the gains computed in the last BackwardPass;.
alpha | The learning rate. |
ref_trajectory | The reference state trajectory. |
std::vector<double> exotica::AbstractDDPSolver::get_control_cost_evolution | ( | ) | const |
const std::vector<Eigen::MatrixXd>& exotica::AbstractDDPSolver::get_fu | ( | ) | const |
const std::vector<Eigen::MatrixXd>& exotica::AbstractDDPSolver::get_fx | ( | ) | const |
const std::vector<Eigen::MatrixXd>& exotica::AbstractDDPSolver::get_K | ( | ) | const |
const std::vector<Eigen::VectorXd>& exotica::AbstractDDPSolver::get_k | ( | ) | const |
const std::vector<Eigen::VectorXd>& exotica::AbstractDDPSolver::get_Qu | ( | ) | const |
const std::vector<Eigen::MatrixXd>& exotica::AbstractDDPSolver::get_Quu | ( | ) | const |
const std::vector<Eigen::MatrixXd>& exotica::AbstractDDPSolver::get_Quu_inv | ( | ) | const |
const std::vector<Eigen::MatrixXd>& exotica::AbstractDDPSolver::get_Qux | ( | ) | const |
const std::vector<Eigen::VectorXd>& exotica::AbstractDDPSolver::get_Qx | ( | ) | const |
const std::vector<Eigen::MatrixXd>& exotica::AbstractDDPSolver::get_Qxx | ( | ) | const |
std::vector<double> exotica::AbstractDDPSolver::get_regularization_evolution | ( | ) | const |
std::vector<double> exotica::AbstractDDPSolver::get_steplength_evolution | ( | ) | const |
const std::vector<Eigen::VectorXd>& exotica::AbstractDDPSolver::get_U_ref | ( | ) | const |
const std::vector<Eigen::VectorXd>& exotica::AbstractDDPSolver::get_U_try | ( | ) | const |
const std::vector<Eigen::VectorXd>& exotica::AbstractDDPSolver::get_Vx | ( | ) | const |
const std::vector<Eigen::MatrixXd>& exotica::AbstractDDPSolver::get_Vxx | ( | ) | const |
const std::vector<Eigen::VectorXd>& exotica::AbstractDDPSolver::get_X_ref | ( | ) | const |
const std::vector<Eigen::VectorXd>& exotica::AbstractDDPSolver::get_X_try | ( | ) | const |
|
overridevirtual |
Implements exotica::FeedbackMotionSolver.
|
inlineprotectedvirtual |
Reimplemented in exotica::AbstractFeasibilityDrivenDDPSolver.
void exotica::AbstractDDPSolver::set_control_cost_evolution | ( | const int | index, |
const double | cost | ||
) |
|
overridevirtual |
Solves the problem.
solution | Returned solution trajectory as a vector of joint configurations. |
Implements exotica::MotionSolver.
Reimplemented in exotica::AbstractFeasibilityDrivenDDPSolver.
|
overridevirtual |
Binds the solver to a specific problem which must be pre-initalised.
pointer | Shared pointer to the motion planning problem |
Reimplemented from exotica::MotionSolver.
Reimplemented in exotica::AbstractFeasibilityDrivenDDPSolver.
|
protected |
Line-search step taken.
|
protected |
Backtracking line-search steplengths.
|
protected |
|
protected |
Control cost during iteration.
|
protected |
Evolution of the control cost (control regularization)
|
protected |
Total control cost computed by line-search procedure.
|
protected |
Cost during iteration.
|
protected |
Cost during previous iteration.
|
protected |
Total cost computed by line-search procedure.
|
protected |
Integration time-step.
|
protected |
Shared pointer to the dynamics solver.
|
protected |
Derivative of the dynamics f w.r.t. u.
|
protected |
Derivative of the dynamics f w.r.t. x.
|
protected |
Feedback gains.
|
protected |
Feed-forward terms.
|
protected |
Regularization (Vxx, Quu)
|
protected |
Size of tangent vector to the state vector.
|
protected |
Size of control vector.
|
protected |
Size of velocity vector (tangent vector to the configuration)
|
protected |
Size of state vector.
|
protected |
Shared pointer to the planning problem.
|
protected |
Gradient of the Hamiltonian.
|
protected |
Hessian of the Hamiltonian.
|
protected |
Inverse of the Hessian of the Hamiltonian.
|
protected |
Hessian of the Hamiltonian.
|
protected |
Gradient of the Hamiltonian.
|
protected |
Hessian of the Hamiltonian.
|
protected |
Evolution of the regularization (xreg/ureg)
|
protected |
Evolution of the steplength.
|
protected |
Length of shooting problem, i.e., state trajectory. The control trajectory has length T_-1.
|
protected |
|
protected |
|
protected |
Reference control trajectory for feedback control.
|
protected |
Updated control trajectory during iteration (computed by line-search)
|
protected |
Gradient of the Value function.
|
protected |
Hessian of the Value function.
|
protected |
Reference state trajectory for feedback control.
|
protected |
Updated state trajectory during iteration (computed by line-search)