10 #ifndef CROCODDYL_CORE_CONTROLS_POLY_ZERO_HPP_
11 #define CROCODDYL_CORE_CONTROLS_POLY_ZERO_HPP_
13 #include "crocoddyl/core/control-base.hpp"
14 #include "crocoddyl/core/fwd.hpp"
35 template <
typename _Scalar>
39 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
43 typedef _Scalar Scalar;
49 typedef typename MathBase::VectorXs VectorXs;
50 typedef typename MathBase::MatrixXs MatrixXs;
68 const std::shared_ptr<ControlParametrizationDataAbstract>& data,
69 const Scalar t,
const Eigen::Ref<const VectorXs>& u)
const override;
82 const std::shared_ptr<ControlParametrizationDataAbstract>& data,
83 const Scalar t,
const Eigen::Ref<const VectorXs>& u)
const override;
90 virtual std::shared_ptr<ControlParametrizationDataAbstract>
createData()
102 const std::shared_ptr<ControlParametrizationDataAbstract>& data,
103 const Scalar t,
const Eigen::Ref<const VectorXs>& w)
const override;
115 const Eigen::Ref<const VectorXs>& w_ub,
116 Eigen::Ref<VectorXs> u_lb,
117 Eigen::Ref<VectorXs> u_ub)
const override;
133 const std::shared_ptr<ControlParametrizationDataAbstract>& data,
134 const Eigen::Ref<const MatrixXs>& A, Eigen::Ref<MatrixXs> out,
135 const AssignmentOp = setto)
const override;
151 const std::shared_ptr<ControlParametrizationDataAbstract>& data,
152 const Eigen::Ref<const MatrixXs>& A, Eigen::Ref<MatrixXs> out,
153 const AssignmentOp = setto)
const override;
155 template <
typename NewScalar>
158 virtual void print(std::ostream& os)
const override;
170 #include "crocoddyl/core/controls/poly-zero.hxx"
172 CROCODDYL_DECLARE_EXTERN_TEMPLATE_CLASS(
Abstract class for the control trajectory parametrization.
std::size_t nw_
Control dimension.
std::size_t nu_
Control parameters dimension.
A polynomial function of time of degree zero, that is a constant.
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.
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 p...
ControlParametrizationModelPolyZeroTpl(const std::size_t nw)
Initialize the poly-zero control parametrization.
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.
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) a...
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 s...
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.
virtual std::shared_ptr< ControlParametrizationDataAbstract > createData() override
Create the control-parametrization data.
virtual void print(std::ostream &os) const override
Print relevant information of the control model.