A polynomial function of time of degree one, that is a linear function. More...
#include <poly-one.hpp>
Public Types | |
| typedef ControlParametrizationModelAbstractTpl< Scalar > | Base |
| typedef ControlParametrizationDataAbstractTpl< Scalar > | ControlParametrizationDataAbstract |
| typedef ControlParametrizationDataPolyOneTpl< Scalar > | Data |
| typedef MathBaseTpl< Scalar > | MathBase |
| typedef MathBase::MatrixXs | MatrixXs |
| typedef MathBase::VectorXs | VectorXs |
Public Types inherited from ControlParametrizationModelAbstractTpl< _Scalar > | |
| typedef ControlParametrizationDataAbstractTpl< Scalar > | ControlParametrizationDataAbstract |
| typedef MathBaseTpl< Scalar > | MathBase |
| typedef MathBase::MatrixXs | MatrixXs |
| typedef MathBase::VectorXs | VectorXs |
Public Member Functions | |
| ControlParametrizationModelPolyOneTpl (const std::size_t nw) | |
| Initialize the poly-one control parametrization. | |
| virtual void | calc (const std::shared_ptr< ControlParametrizationDataAbstract > &data, const Scalar t, const Eigen::Ref< const VectorXs > &u) const override |
| 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 override |
| Get the value of the Jacobian of the control with respect to the parameters. | |
| template<typename NewScalar > | |
| ControlParametrizationModelPolyOneTpl< NewScalar > | cast () const |
| 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 override |
| Map the specified bounds from the control space to the parameter space. | |
| virtual std::shared_ptr< ControlParametrizationDataAbstract > | createData () override |
| Create the control-parametrization data. | |
| EIGEN_MAKE_ALIGNED_OPERATOR_NEW | CROCODDYL_DERIVED_CAST (ControlParametrizationModelBase, ControlParametrizationModelPolyOneTpl) typedef _Scalar Scalar |
| virtual void | multiplyByJacobian (const std::shared_ptr< ControlParametrizationDataAbstract > &data, const Eigen::Ref< const MatrixXs > &A, Eigen::Ref< MatrixXs > out, const AssignmentOp=setto) const override |
| Compute the product between a specified matrix and 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=setto) const override |
| Compute the product between the transposed Jacobian of the control (with respect to the parameters) and a specified matrix. | |
| virtual void | params (const std::shared_ptr< ControlParametrizationDataAbstract > &data, const Scalar t, const Eigen::Ref< const VectorXs > &w) const override |
| Get a value of the control parameters such that the control at the specified time t is equal to the specified value w. | |
| virtual void | print (std::ostream &os) const override |
| Print relevant information of the control model. | |
Public Member Functions inherited from ControlParametrizationModelAbstractTpl< _Scalar > | |
| ControlParametrizationModelAbstractTpl (const std::size_t nw, const std::size_t nu) | |
| Initialize the control dimensions. | |
| virtual bool | checkData (const std::shared_ptr< ControlParametrizationDataAbstract > &data) |
| Checks that a specific data belongs to this model. | |
| std::size_t | get_nu () const |
| Return the dimension of control parameters. | |
| std::size_t | get_nw () const |
| Return the dimension of the control inputs. | |
| virtual MatrixXs | multiplyByJacobian_J (const std::shared_ptr< ControlParametrizationDataAbstract > &data, const Eigen::Ref< const MatrixXs > &A, const AssignmentOp op=setto) const |
| virtual MatrixXs | multiplyJacobianTransposeBy_J (const std::shared_ptr< ControlParametrizationDataAbstract > &data, const Eigen::Ref< const MatrixXs > &A, const AssignmentOp op=setto) const |
Protected Attributes | |
| std::size_t | nu_ |
| Control parameters dimension. | |
| std::size_t | nw_ |
| Control dimension. | |
Protected Attributes inherited from ControlParametrizationModelAbstractTpl< _Scalar > | |
| std::size_t | nu_ |
| Control parameters dimension. | |
| std::size_t | nw_ |
| Control dimension. | |
Additional Inherited Members | |
Public Attributes inherited from ControlParametrizationModelAbstractTpl< _Scalar > | |
| EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar | Scalar |
A polynomial function of time of degree one, that is a linear function.
The size of the parameters \(\mathbf{u}\) is twice the size of the control input \(\mathbf{w}\). The first half of \(\mathbf{u}\) represents the value of w at time 0. The second half of \(\mathbf{u}\) represents the value of \(\mathbf{w}\) at time 0.5.
The main computations are carried out in calc, multiplyByJacobian and multiplyJacobianTransposeBy, where the former computes control input \(\mathbf{w}\in\mathbb{R}^{nw}\) from a set of control parameters \(\mathbf{u}\in\mathbb{R}^{nu}\) where nw and nu represent the dimension of the control inputs and parameters, respectively, and the latter defines useful operations across the Jacobian of the control-parametrization model. Finally, params allows us to obtain the control parameters from the control input, i.e., it is the inverse of calc. Note that multiplyByJacobian and multiplyJacobianTransposeBy requires to run calc first.
ControlParametrizationAbstractTpl, calc(), calcDiff(), createData(), params, multiplyByJacobian, multiplyJacobianTransposeBy Definition at line 41 of file poly-one.hpp.
| typedef MathBaseTpl<Scalar> MathBase |
Definition at line 49 of file poly-one.hpp.
| typedef ControlParametrizationDataAbstractTpl<Scalar> ControlParametrizationDataAbstract |
Definition at line 51 of file poly-one.hpp.
| typedef ControlParametrizationModelAbstractTpl<Scalar> Base |
Definition at line 52 of file poly-one.hpp.
| typedef ControlParametrizationDataPolyOneTpl<Scalar> Data |
Definition at line 53 of file poly-one.hpp.
| typedef MathBase::VectorXs VectorXs |
Definition at line 54 of file poly-one.hpp.
| typedef MathBase::MatrixXs MatrixXs |
Definition at line 55 of file poly-one.hpp.
|
explicit |
Initialize the poly-one control parametrization.
| [in] | nw | Dimension of control vector |
|
overridevirtual |
Get the value of the control at the specified time.
| [in] | data | Control-parametrization data |
| [in] | t | Time in [0,1] |
| [in] | u | Control parameters |
Implements ControlParametrizationModelAbstractTpl< _Scalar >.
|
overridevirtual |
Get the value of the Jacobian of the control with respect to the parameters.
It assumes that calc() has been run first
| [in] | data | Control-parametrization data |
| [in] | t | Time in [0,1] |
| [in] | u | Control parameters |
Implements ControlParametrizationModelAbstractTpl< _Scalar >.
|
overridevirtual |
Create the control-parametrization data.
Reimplemented from ControlParametrizationModelAbstractTpl< _Scalar >.
|
overridevirtual |
Get a value of the control parameters such that the control at the specified time t is equal to the specified value w.
| [in] | data | Control-parametrization data |
| [in] | t | Time in [0,1] |
| [in] | w | Control values |
Implements ControlParametrizationModelAbstractTpl< _Scalar >.
|
overridevirtual |
Map the specified bounds from the control space to the parameter space.
| [in] | w_lb | Control lower bound |
| [in] | w_ub | Control lower bound |
| [out] | u_lb | Control parameters lower bound |
| [out] | u_ub | Control parameters upper bound |
Implements ControlParametrizationModelAbstractTpl< _Scalar >.
|
overridevirtual |
Compute the product between a specified matrix and the Jacobian of the control (with respect to the parameters)
It assumes that calc() has been run first
| [in] | data | Control-parametrization data |
| [in] | A | A matrix to multiply times the Jacobian |
| [out] | out | Product between the matrix A and the Jacobian of the control with respect to the parameters |
| [in] | op | Assignment operator which sets, adds, or removes the given results |
Implements ControlParametrizationModelAbstractTpl< _Scalar >.
|
overridevirtual |
Compute the product between the transposed Jacobian of the control (with respect to the parameters) and a specified matrix.
It assumes that calc() has been run first
| [in] | data | Control-parametrization data |
| [in] | A | A matrix to multiply times the Jacobian |
| [out] | out | Product between the transposed Jacobian of the control with respect to the parameters and the matrix A |
| [in] | op | Assignment operator which sets, adds, or removes the given results |
Implements ControlParametrizationModelAbstractTpl< _Scalar >.
|
overridevirtual |
Print relevant information of the control model.
| [out] | os | Output stream object |
Reimplemented from ControlParametrizationModelAbstractTpl< _Scalar >.
|
protected |
Control parameters dimension.
Definition at line 206 of file control-base.hpp.
|
protected |
Control dimension.
Definition at line 205 of file control-base.hpp.