Template Class ControlParametrizationModelAbstractTpl
Defined in File control-base.hpp
Inheritance Relationships
Base Type
public crocoddyl::ControlParametrizationModelBase(Class ControlParametrizationModelBase)
Derived Types
public crocoddyl::ControlParametrizationModelNumDiffTpl< _Scalar >(Template Class ControlParametrizationModelNumDiffTpl)public crocoddyl::ControlParametrizationModelPolyOneTpl< _Scalar >(Template Class ControlParametrizationModelPolyOneTpl)public crocoddyl::ControlParametrizationModelPolyTwoRKTpl< _Scalar >(Template Class ControlParametrizationModelPolyTwoRKTpl)public crocoddyl::ControlParametrizationModelPolyZeroTpl< _Scalar >(Template Class ControlParametrizationModelPolyZeroTpl)
Class Documentation
-
template<typename _Scalar>
class ControlParametrizationModelAbstractTpl : public crocoddyl::ControlParametrizationModelBase Abstract class for the control trajectory parametrization.
The control trajectory is a function of the (normalized) time. Normalized time is between 0 and 1, where 0 represents the beginning of the time step, and 1 represents its end. The trajectory depends on the control parameters u, whose size may be larger than the size of the control inputs w.
The main computations are carried out in
calc,multiplyByJacobianandmultiplyJacobianTransposeBy, where the former computes control input \(\mathbf{w}\in\mathbb{R}^{nw}\) from a set of control parameters \(\mathbf{u}\in\mathbb{R}^{nu}\) wherenwandnurepresent the dimension of the control inputs and parameters, respectively, and the latter defines useful operations across the Jacobian of the control-parametrization model. Finally,paramsallows us to obtain the control parameters from a the control input, i.e., it is the dual ofcalc. Note thatmultiplyByJacobianandmultiplyJacobianTransposeByrequires to runcalcfirst.Subclassed by crocoddyl::ControlParametrizationModelNumDiffTpl< _Scalar >, crocoddyl::ControlParametrizationModelPolyOneTpl< _Scalar >, crocoddyl::ControlParametrizationModelPolyTwoRKTpl< _Scalar >, crocoddyl::ControlParametrizationModelPolyZeroTpl< _Scalar >
Public Types
-
typedef MathBaseTpl<Scalar> MathBase
-
typedef ControlParametrizationDataAbstractTpl<Scalar> ControlParametrizationDataAbstract
Public Functions
-
ControlParametrizationModelAbstractTpl(const std::size_t nw, const std::size_t nu)
Initialize the control dimensions.
- Parameters:
nw – [in] Dimension of control inputs
nu – [in] Dimension of control parameters
-
virtual ~ControlParametrizationModelAbstractTpl() = default
Get the value of the control at the specified time.
- Parameters:
data – [in] Data structure containing the control vector to write
t – [in] Time in [0,1]
u – [in] Control parameters
Get the value of the Jacobian of the control with respect to the parameters.
It assumes that
calc()has been run first- Parameters:
data – [in] Control-parametrization data
t – [in] Time in [0,1]
u – [in] Control parameters
-
virtual std::shared_ptr<ControlParametrizationDataAbstract> createData()
Create the control-parametrization data.
- Returns:
the control-parametrization data
Update the control parameters u for a specified time t given the control input w.
- Parameters:
data – [in] Control-parametrization data
t – [in] Time in [0,1]
w – [in] Control inputs
-
virtual void convertBounds(const Eigen::Ref<const VectorXs> &w_lb, const Eigen::Ref<const VectorXs> &w_ub, Eigen::Ref<VectorXs> u_lb, Eigen::Ref<VectorXs> u_ub) const = 0
Convert the bounds on the control inputs w to bounds on the control parameters u.
- Parameters:
w_lb – [in] Control lower bound
w_ub – [in] Control lower bound
u_lb – [out] Control parameters lower bound
u_ub – [out] Control parameters upper bound
Compute the product between the given matrix A and the derivative of the control input with respect to the control parameters (i.e., A*dw_du).
It assumes that
calc()has been run first- Parameters:
data – [in] Control-parametrization data
A – [in] A matrix to multiply times the Jacobian
out – [out] Product between the matrix A and the Jacobian of the control with respect to the parameters
op – [in] Assignment operator which sets, adds, or removes the given results
Compute the product between the transpose of the derivative of the control input with respect to the control parameters and a given matrix A (i.e., dw_du^T*A)
It assumes that
calc()has been run first- Parameters:
data – [in] Control-parametrization data
A – [in] A matrix to multiply times the Jacobian
out – [out] Product between the transposed Jacobian of the control with respect to the parameters and the matrix A
op – [in] Assignment operator which sets, adds, or removes the given results
Checks that a specific data belongs to this model.
-
virtual void print(std::ostream &os) const
Print relevant information of the control model.
- Parameters:
os – [out] Output stream object
-
std::size_t get_nw() const
Return the dimension of the control inputs.
-
std::size_t get_nu() const
Return the dimension of control parameters.
Public Members
- EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar
Protected Functions
-
inline ControlParametrizationModelAbstractTpl()
Protected Attributes
-
std::size_t nw_
Control dimension.
-
std::size_t nu_
Control parameters dimension.
Friends
-
template<class Scalar>
friend std::ostream &operator<<(std::ostream &os, const ControlParametrizationModelAbstractTpl<Scalar> &model) Print information on the control model.
-
typedef MathBaseTpl<Scalar> MathBase