Independently bounded guidance model for heterogeneous task channels. More...
#include <componentwise-saturation.hpp>
Public Types | |
| typedef GuidanceModelAbstractTpl< Scalar > | Base |
| typedef GuidanceDataComponentwiseSaturationTpl< Scalar > | Data |
| typedef Base::GuidanceDataAbstract | GuidanceDataAbstract |
| typedef MathBaseTpl< Scalar > | MathBase |
| typedef MathBase::MatrixXs | MatrixXs |
| typedef MathBase::VectorXs | VectorXs |
| Public Types inherited from GuidanceModelAbstractTpl< _Scalar > | |
| typedef GuidanceDataAbstractTpl< Scalar > | GuidanceDataAbstract |
| typedef MathBaseTpl< Scalar > | MathBase |
| typedef MathBase::MatrixXs | MatrixXs |
| typedef MathBase::VectorXs | VectorXs |
Public Member Functions | |
| GuidanceModelComponentwiseSaturationTpl (const VectorXs &gain, const VectorXs &max_rate) | |
| Initialize the componentwise saturation guidance model. | |
| virtual void | calc (const std::shared_ptr< GuidanceDataAbstract > &data, const Eigen::Ref< const VectorXs > &error) const override |
| Compute the saturated guidance output. | |
| virtual void | calcDiff (const std::shared_ptr< GuidanceDataAbstract > &data, const Eigen::Ref< const VectorXs > &error) const override |
| Compute the Jacobian of the saturated guidance law. | |
| template<typename NewScalar> | |
| GuidanceModelComponentwiseSaturationTpl< NewScalar > | cast () const |
| Cast the guidance model to a different scalar type. | |
| virtual std::shared_ptr< GuidanceDataAbstract > | createData () const override |
| Allocate the cached guidance data. | |
| EIGEN_MAKE_ALIGNED_OPERATOR_NEW | CROCODDYL_DERIVED_CAST (GuidanceModelBase, GuidanceModelComponentwiseSaturationTpl) typedef _Scalar Scalar |
| const VectorXs & | get_gain () const |
| Return the componentwise gains. | |
| const VectorXs & | get_max_rate () const |
| Return the componentwise saturation bounds. | |
| virtual void | print (std::ostream &os) const override |
| Print the model parameters. | |
| void | set_gain (const VectorXs &gain) |
| Update the componentwise gains. | |
| void | set_max_rate (const VectorXs &max_rate) |
| Update the componentwise saturation bounds. | |
| Public Member Functions inherited from GuidanceModelAbstractTpl< _Scalar > | |
| GuidanceModelAbstractTpl (const std::size_t nr) | |
| Initialize the guidance-model dimension. | |
| std::size_t | get_nr () const |
| Return the error and desired-rate dimension. | |
Additional Inherited Members | |
| Public Attributes inherited from GuidanceModelAbstractTpl< _Scalar > | |
| EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar | Scalar |
| Protected Member Functions inherited from GuidanceModelAbstractTpl< _Scalar > | |
| void | checkErrorDimension (const Eigen::Ref< const VectorXs > &error) const |
| void | checkJacobianDimension (const Eigen::Ref< const MatrixXs > &Ge) const |
| void | checkRateDimension (const Eigen::Ref< const VectorXs > &g) const |
| Protected Attributes inherited from GuidanceModelAbstractTpl< _Scalar > | |
| std::size_t | nr_ |
Independently bounded guidance model for heterogeneous task channels.
For each component, it implements
![\[ g_i =
-v_{\max,i}\tanh\left(\frac{k_i e_i}{v_{\max,i}}\right).
\]](form_98.png)
The Jacobian is diagonal, with
![\[ G_e(i,i) = -k_i \left(1 - \tanh^2(z_i)\right), \qquad
z_i = \frac{k_i e_i}{v_{\max,i}}.
\]](form_99.png)
This is useful when channels have different units or physical limits, such as translation and rotation blocks.
Definition at line 35 of file componentwise-saturation.hpp.
| typedef GuidanceModelAbstractTpl<Scalar> Base |
Definition at line 43 of file componentwise-saturation.hpp.
| typedef Base::GuidanceDataAbstract GuidanceDataAbstract |
Definition at line 44 of file componentwise-saturation.hpp.
| typedef GuidanceDataComponentwiseSaturationTpl<Scalar> Data |
Definition at line 45 of file componentwise-saturation.hpp.
| typedef MathBaseTpl<Scalar> MathBase |
Definition at line 46 of file componentwise-saturation.hpp.
| typedef MathBase::VectorXs VectorXs |
Definition at line 47 of file componentwise-saturation.hpp.
| typedef MathBase::MatrixXs MatrixXs |
Definition at line 48 of file componentwise-saturation.hpp.
| GuidanceModelComponentwiseSaturationTpl | ( | const VectorXs & | gain, |
| const VectorXs & | max_rate ) |
Initialize the componentwise saturation guidance model.
| [in] | gain | Nonnegative componentwise gains |
| [in] | max_rate | Positive componentwise saturation bounds |
| overridevirtual |
Compute the saturated guidance output.
| [in,out] | data | Preallocated guidance data. |
| [in] | error | Task error |
Implements GuidanceModelAbstractTpl< _Scalar >.
| overridevirtual |
Compute the Jacobian of the saturated guidance law.
| [in,out] | data | Preallocated guidance data. |
| [in] | error | Task error |
Implements GuidanceModelAbstractTpl< _Scalar >.
| overridevirtual |
Allocate the cached guidance data.
Reimplemented from GuidanceModelAbstractTpl< _Scalar >.
| const VectorXs & get_gain | ( | ) | const |
Return the componentwise gains.

| const VectorXs & get_max_rate | ( | ) | const |
Return the componentwise saturation bounds.

| void set_gain | ( | const VectorXs & | gain | ) |
Update the componentwise gains.
| [in] | gain | Nonnegative componentwise gains. |
| void set_max_rate | ( | const VectorXs & | max_rate | ) |
Update the componentwise saturation bounds.
| [in] | max_rate | Positive componentwise bounds. |
| overridevirtual |
Print the model parameters.
| [out] | os | Output stream. |
Reimplemented from GuidanceModelAbstractTpl< _Scalar >.