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" 
   50template <
typename _Scalar>
 
   54  typedef _Scalar Scalar;
 
   60  typedef typename MathBase::VectorXs VectorXs;
 
   61  typedef typename MathBase::MatrixXs MatrixXs;
 
   81      const std::shared_ptr<ControlParametrizationDataAbstract>& data,
 
   82      const Scalar t, 
const Eigen::Ref<const VectorXs>& u) 
const;
 
   95      const std::shared_ptr<ControlParametrizationDataAbstract>& data,
 
   96      const Scalar t, 
const Eigen::Ref<const VectorXs>& u) 
const;
 
  103  virtual std::shared_ptr<ControlParametrizationDataAbstract> 
createData();
 
  114      const std::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 std::shared_ptr<ControlParametrizationDataAbstract>& data,
 
  146      const Eigen::Ref<const MatrixXs>& A, Eigen::Ref<MatrixXs> out,
 
  147      const AssignmentOp op = setto) 
const;
 
  163      const std::shared_ptr<ControlParametrizationDataAbstract>& data,
 
  164      const Eigen::Ref<const MatrixXs>& A, Eigen::Ref<MatrixXs> out,
 
  165      const AssignmentOp op = setto) 
const;
 
 
  175template <
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 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 std::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 std::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 std::shared_ptr< ControlParametrizationDataAbstract > createData()
Create the control-parametrization data.
 
virtual void calc(const std::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 calcDiff(const std::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 std::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...
 
Scalar tmp_t2
Temporary variable to store the square of the time.