A polynomial function of time of degree zero, that is a constant. More...
#include <poly-zero.hpp>
Public Types | |
| typedef ControlParametrizationModelAbstractTpl< Scalar > | Base |
| typedef ControlParametrizationDataAbstractTpl< Scalar > | ControlParametrizationDataAbstract |
| typedef ControlParametrizationDataAbstractTpl< 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 | |
| ControlParametrizationModelPolyZeroTpl (const std::size_t nw) | |
| Initialize the poly-zero 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 > | |
| ControlParametrizationModelPolyZeroTpl< 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, ControlParametrizationModelPolyZeroTpl) 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 u. | |
| 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 zero, that is a constant.
The main computations are carrying 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 a the control input, i.e., it is the dual of calc. Note that multiplyByJacobian and multiplyJacobianTransposeBy requires to run calc first.
ControlParametrizationAbstractTpl, calc(), calcDiff(), createData(), params, multiplyByJacobian, multiplyJacobianTransposeBy Definition at line 36 of file poly-zero.hpp.
| typedef MathBaseTpl<Scalar> MathBase |
Definition at line 44 of file poly-zero.hpp.
| typedef ControlParametrizationDataAbstractTpl<Scalar> ControlParametrizationDataAbstract |
Definition at line 46 of file poly-zero.hpp.
| typedef ControlParametrizationModelAbstractTpl<Scalar> Base |
Definition at line 47 of file poly-zero.hpp.
| typedef ControlParametrizationDataAbstractTpl<Scalar> Data |
Definition at line 48 of file poly-zero.hpp.
| typedef MathBase::VectorXs VectorXs |
Definition at line 49 of file poly-zero.hpp.
| typedef MathBase::MatrixXs MatrixXs |
Definition at line 50 of file poly-zero.hpp.
|
explicit |
Initialize the poly-zero 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 u.
| [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.