Template Class ActionModelUnicycleTpl
Defined in File unicycle.hpp
Inheritance Relationships
Base Type
public crocoddyl::ActionModelAbstractTpl< _Scalar >(Template Class ActionModelAbstractTpl)
Class Documentation
-
template<typename _Scalar>
class ActionModelUnicycleTpl : public crocoddyl::ActionModelAbstractTpl<_Scalar> Public Types
-
typedef ActionDataAbstractTpl<Scalar> ActionDataAbstract
-
typedef ActionModelAbstractTpl<Scalar> Base
-
typedef ActionDataUnicycleTpl<Scalar> Data
-
typedef MathBaseTpl<Scalar> MathBase
Public Functions
-
ActionModelUnicycleTpl()
-
virtual ~ActionModelUnicycleTpl() = default
Compute the next state and cost value.
- Parameters:
data – [in] Action data
x – [in] State point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
u – [in] Control input \(\mathbf{u}\in\mathbb{R}^{nu}\)
Compute the total cost value for nodes that depends only on the state.
It updates the total cost and the next state is not computed as it is not expected to change. This function is used in the terminal nodes of an optimal control problem.
- Parameters:
data – [in] Action data
x – [in] State point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
Compute the derivatives of the dynamics and cost functions.
It computes the partial derivatives of the dynamical system and the cost function. It assumes that
calc()has been run first. This function builds a linear-quadratic approximation of the action model (i.e. dynamical system and cost function).- Parameters:
data – [in] Action data
x – [in] State point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
u – [in] Control input \(\mathbf{u}\in\mathbb{R}^{nu}\)
Compute the derivatives of the cost functions with respect to the state only.
It updates the derivatives of the cost function with respect to the state only. This function is used in the terminal nodes of an optimal control problem.
- Parameters:
data – [in] Action data
x – [in] State point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
-
virtual std::shared_ptr<ActionDataAbstract> createData() override
Create the action data.
- Returns:
the action data
-
template<typename NewScalar>
ActionModelUnicycleTpl<NewScalar> cast() const Cast the unicycle model to a different scalar type.
It is useful for operations requiring different precision or scalar types.
- Template Parameters:
NewScalar – The new scalar type to cast to.
- Returns:
ActionModelUnicycleTpl<NewScalar> A unicycle model with the new scalar type.
Checks that a specific data belongs to this model.
-
Scalar get_dt() const
-
void set_dt(const Scalar dt)
-
virtual void print(std::ostream &os) const override
Print relevant information of the unicycle model.
- Parameters:
os – [out] Output stream object
Public Members
- EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar
Protected Attributes
-
std::size_t nu_
Control dimension.
-
std::shared_ptr<StateAbstract> state_
< Control dimension
-
typedef ActionDataAbstractTpl<Scalar> ActionDataAbstract