9 #ifndef CROCODDYL_CORE_CONTROLS_POLY_ONE_HPP_
10 #define CROCODDYL_CORE_CONTROLS_POLY_ONE_HPP_
12 #include "crocoddyl/core/control-base.hpp"
13 #include "crocoddyl/core/fwd.hpp"
14 #include "crocoddyl/core/utils/exception.hpp"
40 template <
typename _Scalar>
44 typedef _Scalar Scalar;
50 typedef typename MathBase::VectorXs VectorXs;
51 typedef typename MathBase::MatrixXs MatrixXs;
69 const boost::shared_ptr<ControlParametrizationDataAbstract>& data,
70 const Scalar t,
const Eigen::Ref<const VectorXs>& u)
const;
83 const boost::shared_ptr<ControlParametrizationDataAbstract>& data,
84 const Scalar t,
const Eigen::Ref<const VectorXs>& u)
const;
91 virtual boost::shared_ptr<ControlParametrizationDataAbstract>
createData();
102 const boost::shared_ptr<ControlParametrizationDataAbstract>& data,
103 const Scalar t,
const Eigen::Ref<const VectorXs>& w)
const;
115 const Eigen::Ref<const VectorXs>& w_ub,
116 Eigen::Ref<VectorXs> u_lb,
117 Eigen::Ref<VectorXs> u_ub)
const;
133 const boost::shared_ptr<ControlParametrizationDataAbstract>& data,
134 const Eigen::Ref<const MatrixXs>& A, Eigen::Ref<MatrixXs> out,
135 const AssignmentOp = setto)
const;
151 const boost::shared_ptr<ControlParametrizationDataAbstract>& data,
152 const Eigen::Ref<const MatrixXs>& A, Eigen::Ref<MatrixXs> out,
153 const AssignmentOp = setto)
const;
160 template <
typename _Scalar>
163 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
165 typedef _Scalar Scalar;
168 typedef typename MathBase::Vector2s Vector2s;
170 template <
template <
typename Scalar>
class Model>
186 #include "crocoddyl/core/controls/poly-one.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 one, that is a linear function.
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 such that the control at the specified time t is equal to the s...
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...
ControlParametrizationModelPolyOneTpl(const std::size_t nw)
Initialize the poly-one control parametrization.
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.
Vector2s c
Coefficients of the linear control that depends on time.