Class SolverDDP

Inheritance Relationships

Base Type

Class Documentation

class SolverDDP : public crocoddyl::SolverFDDPTpl<double>

Differential Dynamic Programming (DDP) solver.

The DDP solver computes an optimal trajectory and control commands by iterates running backwardPass() and forwardPass(). The backward-pass updates locally the quadratic approximation of the problem and computes descent direction. If the warm-start is feasible, then it computes the gaps \(\mathbf{f}_s\) and run a modified Riccati sweep:

\[\begin{split}\begin{eqnarray*} \mathbf{Q}_{\mathbf{x}_k} &=& \mathbf{l}_{\mathbf{x}_k} + \mathbf{f}^\top_{\mathbf{x}_k} (V_{\mathbf{x}_{k+1}} + V_{\mathbf{xx}_{k+1}}\mathbf{\bar{f}}_{k+1}),\\ \mathbf{Q}_{\mathbf{u}_k} &=& \mathbf{l}_{\mathbf{u}_k} + \mathbf{f}^\top_{\mathbf{u}_k} (V_{\mathbf{x}_{k+1}} + V_{\mathbf{xx}_{k+1}}\mathbf{\bar{f}}_{k+1}),\\ \mathbf{Q}_{\mathbf{xx}_k} &=& \mathbf{l}_{\mathbf{xx}_k} + \mathbf{f}^\top_{\mathbf{x}_k} V_{\mathbf{xx}_{k+1}} \mathbf{f}_{\mathbf{x}_k},\\ \mathbf{Q}_{\mathbf{xu}_k} &=& \mathbf{l}_{\mathbf{xu}_k} + \mathbf{f}^\top_{\mathbf{x}_k} V_{\mathbf{xx}_{k+1}} \mathbf{f}_{\mathbf{u}_k},\\ \mathbf{Q}_{\mathbf{uu}_k} &=& \mathbf{l}_{\mathbf{uu}_k} + \mathbf{f}^\top_{\mathbf{u}_k} V_{\mathbf{xx}_{k+1}} \mathbf{f}_{\mathbf{u}_k}. \end{eqnarray*}\end{split}\]
Then, the forward-pass rollouts this new policy by integrating the system dynamics along a tuple of optimized control commands \(\mathbf{u}^*_s\), i.e.
\[\begin{split}\begin{eqnarray} \mathbf{\hat{x}}_0 &=& \mathbf{\tilde{x}}_0,\\ \mathbf{\hat{u}}_k &=& \mathbf{u}_k + \alpha\mathbf{k}_k + \mathbf{K}_k(\mathbf{\hat{x}}_k-\mathbf{x}_k),\\ \mathbf{\hat{x}}_{k+1} &=& \mathbf{f}_k(\mathbf{\hat{x}}_k,\mathbf{\hat{u}}_k). \end{eqnarray}\end{split}\]

See also

SolverAbstract(), backwardPass() and forwardPass()

Public Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW DEPRECATED ("Do not use SolverDDP. Instead, you should use SolverFDDP(problem, " "DynamicsSolverType::SingleShoot)", explicit SolverDDP(std::shared_ptr< ShootingProblemTpl< double > > problem) :SolverFDDPTpl< double >(problem){};) virtual ~SolverDDP()=default

Initialize the DDP solver.

Parameters:

problem[in] shooting problem

inline virtual void calcDiff()