Template Class ControlParametrizationModelPolyZeroTpl

Inheritance Relationships

Base Type

Class Documentation

template<typename _Scalar>
class ControlParametrizationModelPolyZeroTpl : public crocoddyl::ControlParametrizationModelAbstractTpl<_Scalar>

A polynomial function of time of degree zero, that is a constant.

The main computations are carrying out in calc, multiplyByJacobian and multiplyJacobianTransposeBy, where the former computes control input \(\mathbf{w}\in\mathbb{R}^{nw}\) from a set of control parameters \(\mathbf{u}\in\mathbb{R}^{nu}\) where nw and nu represent the dimension of the control inputs and parameters, respectively, and the latter defines useful operations across the Jacobian of the control-parametrization model. Finally, params allows us to obtain the control parameters from a the control input, i.e., it is the dual of calc. Note that multiplyByJacobian and multiplyJacobianTransposeBy requires to run calc first.

See also

ControlParametrizationAbstractTpl, calc(), calcDiff(), createData(), params, multiplyByJacobian, multiplyJacobianTransposeBy

Public Types

typedef MathBaseTpl<Scalar> MathBase
typedef ControlParametrizationDataAbstractTpl<Scalar> ControlParametrizationDataAbstract
typedef ControlParametrizationModelAbstractTpl<Scalar> Base
typedef ControlParametrizationDataAbstractTpl<Scalar> Data
typedef MathBase::VectorXs VectorXs
typedef MathBase::MatrixXs MatrixXs

Public Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW CROCODDYL_DERIVED_CAST (ControlParametrizationModelBase, ControlParametrizationModelPolyZeroTpl) typedef _Scalar Scalar
explicit ControlParametrizationModelPolyZeroTpl(const std::size_t nw)

Initialize the poly-zero control parametrization.

Parameters:

nw[in] Dimension of control vector

virtual ~ControlParametrizationModelPolyZeroTpl() = default
virtual void calc(const std::shared_ptr<ControlParametrizationDataAbstract> &data, const Scalar t, const Eigen::Ref<const VectorXs> &u) const override

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

virtual void calcDiff(const std::shared_ptr<ControlParametrizationDataAbstract> &data, const Scalar t, const Eigen::Ref<const VectorXs> &u) const override

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

virtual void params(const std::shared_ptr<ControlParametrizationDataAbstract> &data, const Scalar t, const Eigen::Ref<const VectorXs> &w) const override

Get a value of the control parameters such that the control at the specified time t is equal to the specified value u.

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

virtual void multiplyByJacobian(const std::shared_ptr<ControlParametrizationDataAbstract> &data, const Eigen::Ref<const MatrixXs> &A, Eigen::Ref<MatrixXs> out, const AssignmentOp = setto) const override

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

virtual void multiplyJacobianTransposeBy(const std::shared_ptr<ControlParametrizationDataAbstract> &data, const Eigen::Ref<const MatrixXs> &A, Eigen::Ref<MatrixXs> out, const AssignmentOp = setto) const override

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>
ControlParametrizationModelPolyZeroTpl<NewScalar> cast() const
virtual void print(std::ostream &os) const override

Print relevant information of the control model.

Parameters:

os[out] Output stream object

Protected Attributes

std::size_t nu_

Control parameters dimension.

std::size_t nw_

Control dimension.