10 #ifndef CROCODDYL_CORE_CONTROLS_POLY_ONE_HPP_
11 #define CROCODDYL_CORE_CONTROLS_POLY_ONE_HPP_
13 #include "crocoddyl/core/control-base.hpp"
14 #include "crocoddyl/core/fwd.hpp"
15 #include "crocoddyl/core/utils/exception.hpp"
41 template <
typename _Scalar>
45 typedef _Scalar Scalar;
51 typedef typename MathBase::VectorXs VectorXs;
52 typedef typename MathBase::MatrixXs MatrixXs;
70 const boost::shared_ptr<ControlParametrizationDataAbstract>& data,
71 const Scalar t,
const Eigen::Ref<const VectorXs>& u)
const;
84 const boost::shared_ptr<ControlParametrizationDataAbstract>& data,
85 const Scalar t,
const Eigen::Ref<const VectorXs>& u)
const;
92 virtual boost::shared_ptr<ControlParametrizationDataAbstract>
createData();
103 const boost::shared_ptr<ControlParametrizationDataAbstract>& data,
104 const Scalar t,
const Eigen::Ref<const VectorXs>& w)
const;
116 const Eigen::Ref<const VectorXs>& w_ub,
117 Eigen::Ref<VectorXs> u_lb,
118 Eigen::Ref<VectorXs> u_ub)
const;
134 const boost::shared_ptr<ControlParametrizationDataAbstract>& data,
135 const Eigen::Ref<const MatrixXs>& A, Eigen::Ref<MatrixXs> out,
136 const AssignmentOp op = setto)
const;
152 const boost::shared_ptr<ControlParametrizationDataAbstract>& data,
153 const Eigen::Ref<const MatrixXs>& A, Eigen::Ref<MatrixXs> out,
154 const AssignmentOp op = setto)
const;
161 template <
typename _Scalar>
164 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
166 typedef _Scalar Scalar;
169 typedef typename MathBase::Vector2s Vector2s;
171 template <
template <
typename Scalar>
class Model>
187 #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 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 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.
ControlParametrizationModelPolyOneTpl(const std::size_t nw)
Initialize the poly-one control parametrization.
virtual boost::shared_ptr< ControlParametrizationDataAbstract > createData()
Create the control-parametrization data.
Vector2s c
Coefficients of the linear control that depends on time.