Template Class ControlParametrizationModelPolyOneTpl
Defined in File poly-one.hpp
Inheritance Relationships
Base Type
public crocoddyl::ControlParametrizationModelAbstractTpl< _Scalar >(Template Class ControlParametrizationModelAbstractTpl)
Class Documentation
-
template<typename _Scalar>
class ControlParametrizationModelPolyOneTpl : public crocoddyl::ControlParametrizationModelAbstractTpl<_Scalar> A polynomial function of time of degree one, that is a linear function.
The size of the parameters \(\mathbf{u}\) is twice the size of the control input \(\mathbf{w}\). The first half of \(\mathbf{u}\) represents the value of w at time 0. The second half of \(\mathbf{u}\) represents the value of \(\mathbf{w}\) at time 0.5.
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 the control input, i.e., it is the inverse ofcalc. Note thatmultiplyByJacobianandmultiplyJacobianTransposeByrequires to runcalcfirst.See also
ControlParametrizationAbstractTpl,calc(),calcDiff(),createData(),params,multiplyByJacobian,multiplyJacobianTransposeByPublic Types
-
typedef MathBaseTpl<Scalar> MathBase
-
typedef ControlParametrizationDataAbstractTpl<Scalar> ControlParametrizationDataAbstract
-
typedef ControlParametrizationModelAbstractTpl<Scalar> Base
-
typedef ControlParametrizationDataPolyOneTpl<Scalar> Data
Public Functions
- EIGEN_MAKE_ALIGNED_OPERATOR_NEW CROCODDYL_DERIVED_CAST (ControlParametrizationModelBase, ControlParametrizationModelPolyOneTpl) typedef _Scalar Scalar
-
explicit ControlParametrizationModelPolyOneTpl(const std::size_t nw)
Initialize the poly-one control parametrization.
- Parameters:
nw – [in] Dimension of control vector
-
virtual ~ControlParametrizationModelPolyOneTpl() = default
Get the value of the control at the specified time.
- Parameters:
data – [in] Control-parametrization data
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() override
Create the control-parametrization data.
- Returns:
the control-parametrization data
Get a value of the control parameters such that the control at the specified time t is equal to the specified value w.
- Parameters:
data – [in] Control-parametrization data
t – [in] Time in [0,1]
w – [in] Control values
-
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 override
Map the specified bounds from the control space to the parameter space.
- 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 a specified matrix and the Jacobian of the control (with respect to the parameters)
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 transposed Jacobian of the control (with respect to the parameters) and a specified matrix.
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
-
template<typename NewScalar>
ControlParametrizationModelPolyOneTpl<NewScalar> cast() const
-
virtual void print(std::ostream &os) const override
Print relevant information of the control model.
- Parameters:
os – [out] Output stream object
-
typedef MathBaseTpl<Scalar> MathBase