Template Class ControlParametrizationModelNumDiffTpl

Inheritance Relationships

Base Type

Class Documentation

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

Public Types

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

Public Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW CROCODDYL_DERIVED_CAST (ControlParametrizationModelBase, ControlParametrizationModelNumDiffTpl) typedef _Scalar Scalar
explicit ControlParametrizationModelNumDiffTpl(std::shared_ptr<Base> model)

Construct a new ControlParametrizationModelNumDiff object.

Parameters:

model

virtual ~ControlParametrizationModelNumDiffTpl() = default
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 numdiff data

  • t[in] Time in [0,1]

  • u[in] Control parameters

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.

Parameters:
  • data[in] Control-parametrization numdiff 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

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 numdiff 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

Convert the bounds on the control to bounds on the control parameters.

Parameters:
  • w_lb[in] Control lower bound

  • w_ub[in] Control upper bound

  • u_lb[in] Control parameter lower bound

  • u_ub[in] Control parameter upper bound

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)

Parameters:
  • data[in] Control-parametrization numdiff 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

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.

Parameters:
  • data[in] Control-parametrization numdiff 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>
ControlParametrizationModelNumDiffTpl<NewScalar> cast() const
const std::shared_ptr<Base> &get_model() const

Get the model_ object.

Returns:

Base&

const Scalar get_disturbance() const

Return the disturbance constant used in the numerical differentiation routine.

void set_disturbance(const Scalar disturbance)

Modify the disturbance constant used in the numerical differentiation routine.

Protected Attributes

std::size_t nu_

Control parameters dimension.

std::size_t nw_

Control dimension.