10 #ifndef CROCODDYL_CORE_CONTROLS_POLY_TWO_RK_HPP_
11 #define CROCODDYL_CORE_CONTROLS_POLY_TWO_RK_HPP_
13 #include "crocoddyl/core/control-base.hpp"
14 #include "crocoddyl/core/fwd.hpp"
15 #include "crocoddyl/core/integrator/rk.hpp"
49 template <
typename _Scalar>
53 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
57 typedef _Scalar Scalar;
63 typedef typename MathBase::VectorXs VectorXs;
64 typedef typename MathBase::MatrixXs MatrixXs;
84 const std::shared_ptr<ControlParametrizationDataAbstract>& data,
85 const Scalar t,
const Eigen::Ref<const VectorXs>& u)
const override;
98 const std::shared_ptr<ControlParametrizationDataAbstract>& data,
99 const Scalar t,
const Eigen::Ref<const VectorXs>& u)
const override;
106 virtual std::shared_ptr<ControlParametrizationDataAbstract>
createData()
118 const std::shared_ptr<ControlParametrizationDataAbstract>& data,
119 const Scalar t,
const Eigen::Ref<const VectorXs>& w)
const override;
131 const Eigen::Ref<const VectorXs>& w_ub,
132 Eigen::Ref<VectorXs> u_lb,
133 Eigen::Ref<VectorXs> u_ub)
const override;
149 const std::shared_ptr<ControlParametrizationDataAbstract>& data,
150 const Eigen::Ref<const MatrixXs>& A, Eigen::Ref<MatrixXs> out,
151 const AssignmentOp = setto)
const override;
167 const std::shared_ptr<ControlParametrizationDataAbstract>& data,
168 const Eigen::Ref<const MatrixXs>& A, Eigen::Ref<MatrixXs> out,
169 const AssignmentOp = setto)
const override;
171 template <
typename NewScalar>
174 virtual void print(std::ostream& os)
const override;
184 template <
typename _Scalar>
187 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
189 typedef _Scalar Scalar;
192 typedef typename MathBase::Vector3s Vector3s;
194 template <
template <
typename Scalar>
class Model>
211 #include "crocoddyl/core/controls/poly-two-rk.hxx"
213 CROCODDYL_DECLARE_EXTERN_TEMPLATE_CLASS(
215 CROCODDYL_DECLARE_EXTERN_TEMPLATE_STRUCT(
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 two, that is a quadratic function.
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...
ControlParametrizationModelPolyTwoRKTpl(const std::size_t nw, const RKType rktype)
Initialize the poly-two RK 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 u such that the control at the specified time t is equal to the...
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.
Scalar tmp_t2
Temporary variable to store the square of the time.