9 #ifndef CROCODDYL_CORE_CONTROLS_POLY_TWO_RK_HPP_
10 #define CROCODDYL_CORE_CONTROLS_POLY_TWO_RK_HPP_
12 #include "crocoddyl/core/control-base.hpp"
13 #include "crocoddyl/core/fwd.hpp"
14 #include "crocoddyl/core/integrator/rk.hpp"
15 #include "crocoddyl/core/utils/exception.hpp"
49 template <
typename _Scalar>
53 typedef _Scalar Scalar;
59 typedef typename MathBase::VectorXs VectorXs;
60 typedef typename MathBase::MatrixXs MatrixXs;
80 const boost::shared_ptr<ControlParametrizationDataAbstract>& data,
81 const Scalar t,
const Eigen::Ref<const VectorXs>& u)
const;
94 const boost::shared_ptr<ControlParametrizationDataAbstract>& data,
95 const Scalar t,
const Eigen::Ref<const VectorXs>& u)
const;
102 virtual boost::shared_ptr<ControlParametrizationDataAbstract>
createData();
113 const boost::shared_ptr<ControlParametrizationDataAbstract>& data,
114 const Scalar t,
const Eigen::Ref<const VectorXs>& w)
const;
126 const Eigen::Ref<const VectorXs>& w_ub,
127 Eigen::Ref<VectorXs> u_lb,
128 Eigen::Ref<VectorXs> u_ub)
const;
144 const boost::shared_ptr<ControlParametrizationDataAbstract>& data,
145 const Eigen::Ref<const MatrixXs>& A, Eigen::Ref<MatrixXs> out,
146 const AssignmentOp = setto)
const;
162 const boost::shared_ptr<ControlParametrizationDataAbstract>& data,
163 const Eigen::Ref<const MatrixXs>& A, Eigen::Ref<MatrixXs> out,
164 const AssignmentOp = setto)
const;
174 template <
typename _Scalar>
177 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
179 typedef _Scalar Scalar;
182 typedef typename MathBase::Vector3s Vector3s;
184 template <
template <
typename Scalar>
class Model>
202 #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 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 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 void multiplyJacobianTransposeBy(const boost::shared_ptr< ControlParametrizationDataAbstract > &data, const Eigen::Ref< const MatrixXs > &A, Eigen::Ref< MatrixXs > out, const AssignmentOp=setto) const
Compute the product between the transposed Jacobian of the control (with respect to the parameters) a...
virtual void multiplyByJacobian(const boost::shared_ptr< ControlParametrizationDataAbstract > &data, const Eigen::Ref< const MatrixXs > &A, Eigen::Ref< MatrixXs > out, const AssignmentOp=setto) const
Compute the product between a specified matrix and the Jacobian of the control (with respect to the p...
virtual boost::shared_ptr< ControlParametrizationDataAbstract > createData()
Create the control-parametrization data.
Scalar tmp_t2
Temporary variable to store the square of the time.