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"
16 #include "crocoddyl/core/utils/exception.hpp"
50 template <
typename _Scalar>
54 typedef _Scalar Scalar;
60 typedef typename MathBase::VectorXs VectorXs;
61 typedef typename MathBase::MatrixXs MatrixXs;
81 const boost::shared_ptr<ControlParametrizationDataAbstract>& data,
82 const Scalar t,
const Eigen::Ref<const VectorXs>& u)
const;
95 const boost::shared_ptr<ControlParametrizationDataAbstract>& data,
96 const Scalar t,
const Eigen::Ref<const VectorXs>& u)
const;
103 virtual boost::shared_ptr<ControlParametrizationDataAbstract>
createData();
114 const boost::shared_ptr<ControlParametrizationDataAbstract>& data,
115 const Scalar t,
const Eigen::Ref<const VectorXs>& w)
const;
127 const Eigen::Ref<const VectorXs>& w_ub,
128 Eigen::Ref<VectorXs> u_lb,
129 Eigen::Ref<VectorXs> u_ub)
const;
145 const boost::shared_ptr<ControlParametrizationDataAbstract>& data,
146 const Eigen::Ref<const MatrixXs>& A, Eigen::Ref<MatrixXs> out,
147 const AssignmentOp op = setto)
const;
163 const boost::shared_ptr<ControlParametrizationDataAbstract>& data,
164 const Eigen::Ref<const MatrixXs>& A, Eigen::Ref<MatrixXs> out,
165 const AssignmentOp op = setto)
const;
175 template <
typename _Scalar>
178 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
180 typedef _Scalar Scalar;
183 typedef typename MathBase::Vector3s Vector3s;
185 template <
template <
typename Scalar>
class Model>
203 #include "crocoddyl/core/controls/poly-two-rk.hxx"
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.
ControlParametrizationModelPolyTwoRKTpl(const std::size_t nw, const RKType rktype)
Initialize the poly-two RK control parametrization.
virtual void calc(const boost::shared_ptr< ControlParametrizationDataAbstract > &data, const Scalar t, const Eigen::Ref< const VectorXs > &u) const
Get the value of the control at the specified time.
virtual void multiplyJacobianTransposeBy(const boost::shared_ptr< ControlParametrizationDataAbstract > &data, const Eigen::Ref< const MatrixXs > &A, Eigen::Ref< MatrixXs > out, const AssignmentOp op=setto) const
Compute the product between the transposed Jacobian of the control (with respect to the parameters) a...
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
Map the specified bounds from the control space to the parameter space.
virtual void multiplyByJacobian(const boost::shared_ptr< ControlParametrizationDataAbstract > &data, const Eigen::Ref< const MatrixXs > &A, Eigen::Ref< MatrixXs > out, const AssignmentOp op=setto) const
Compute the product between a specified matrix and the Jacobian of the control (with respect to the p...
virtual void params(const boost::shared_ptr< ControlParametrizationDataAbstract > &data, const Scalar t, const Eigen::Ref< const VectorXs > &w) const
Get a value of the control parameters u such that the control at the specified time t is equal to the...
virtual void calcDiff(const boost::shared_ptr< ControlParametrizationDataAbstract > &data, const Scalar t, const Eigen::Ref< const VectorXs > &u) const
Get the value of the Jacobian of the control with respect to the parameters.
virtual boost::shared_ptr< ControlParametrizationDataAbstract > createData()
Create the control-parametrization data.
Scalar tmp_t2
Temporary variable to store the square of the time.