|
| ShootingProblemTpl (const VectorXs &x0, const std::vector< boost::shared_ptr< ActionModelAbstract > > &running_models, boost::shared_ptr< ActionModelAbstract > terminal_model) |
| Initialize the shooting problem and allocate its data. More...
|
|
| ShootingProblemTpl (const VectorXs &x0, const std::vector< boost::shared_ptr< ActionModelAbstract > > &running_models, boost::shared_ptr< ActionModelAbstract > terminal_model, const std::vector< boost::shared_ptr< ActionDataAbstract > > &running_datas, boost::shared_ptr< ActionDataAbstract > terminal_data) |
| Initialize the shooting problem (models and datas) More...
|
|
| ShootingProblemTpl (const ShootingProblemTpl< Scalar > &problem) |
| Initialize the shooting problem.
|
|
Scalar | calc (const std::vector< VectorXs > &xs, const std::vector< VectorXs > &us) |
| Compute the cost and the next states. More...
|
|
Scalar | calcDiff (const std::vector< VectorXs > &xs, const std::vector< VectorXs > &us) |
| Compute the derivatives of the cost and dynamics. More...
|
|
void | circularAppend (boost::shared_ptr< ActionModelAbstract > model, boost::shared_ptr< ActionDataAbstract > data) |
| Circular append of the model and data onto the end running node. More...
|
|
void | circularAppend (boost::shared_ptr< ActionModelAbstract > model) |
|
const std::size_t & | get_ndx () const |
| Return the dimension of the tangent space of the state manifold.
|
|
const std::size_t & | get_nu_max () const |
| Return the maximun dimension of the control vector.
|
|
const std::size_t & | get_nx () const |
| Return the dimension of the state tuple.
|
|
const std::vector< boost::shared_ptr< ActionDataAbstract > > & | get_runningDatas () const |
| Return the running datas.
|
|
const std::vector< boost::shared_ptr< ActionModelAbstract > > & | get_runningModels () const |
| Return the running models.
|
|
const std::size_t & | get_T () const |
| Return the number of running nodes.
|
|
const boost::shared_ptr< ActionDataAbstract > & | get_terminalData () const |
| Return the terminal data.
|
|
const boost::shared_ptr< ActionModelAbstract > & | get_terminalModel () const |
| Return the terminal model.
|
|
const VectorXs & | get_x0 () const |
| Return the initial state.
|
|
void | rollout (const std::vector< VectorXs > &us, std::vector< VectorXs > &xs) |
| Integrate the dynamics given a control sequence. More...
|
|
std::vector< VectorXs > | rollout_us (const std::vector< VectorXs > &us) |
|
void | set_runningModels (const std::vector< boost::shared_ptr< ActionModelAbstract > > &models) |
| Modify the running models and allocate new data.
|
|
void | set_terminalModel (boost::shared_ptr< ActionModelAbstract > model) |
| Modify the terminal model and allocate new data.
|
|
void | set_x0 (const VectorXs &x0_in) |
| Modify the initial state.
|
|
void | updateModel (std::size_t i, boost::shared_ptr< ActionModelAbstract > model) |
| Update a model and allocated new data for a specific node. More...
|
|
void | updateNode (std::size_t i, boost::shared_ptr< ActionModelAbstract > model, boost::shared_ptr< ActionDataAbstract > data) |
| Update the model and data for a specific node. More...
|
|
template<typename _Scalar>
class crocoddyl::ShootingProblemTpl< _Scalar >
This class encapsulates a shooting problem.
A shooting problem encapsulates the initial state \(\mathbf{x}_{0}\in\mathcal{M}\), a set of running action models and a terminal action model for a discretized trajectory into \(T\) nodes. It has three main methods - calc
, calcDiff
and rollout
. The first computes the set of next states and cost values per each node \(k\). Instead, calcDiff
updates the derivatives of all action models. Finally, rollout
integrates the system dynamics. This class is used to decouple problem formulation and resolution.
Definition at line 95 of file fwd.hpp.
Scalar calcDiff |
( |
const std::vector< VectorXs > & |
xs, |
|
|
const std::vector< VectorXs > & |
us |
|
) |
| |
Compute the derivatives of the cost and dynamics.
For each node \(k\), and along the state \(\mathbf{x_{s}}\) and control \(\mathbf{u_{s}}\) trajectory, it computes the derivatives of the cost \((\mathbf{l}_{\mathbf{x}}, \mathbf{l}_{\mathbf{u}}, \mathbf{l}_{\mathbf{xx}}, \mathbf{l}_{\mathbf{xu}}, \mathbf{l}_{\mathbf{uu}})\) and dynamics \((\mathbf{f}_{\mathbf{x}}, \mathbf{f}_{\mathbf{u}})\).
- Parameters
-
[in] | xs | time-discrete state trajectory \(\mathbf{x_{s}}\) (size \(T+1\)) |
[in] | us | time-discrete control sequence \(\mathbf{u_{s}}\) (size \(T\)) |
- Returns
- The total cost value \(l_{k}\)