Crocoddyl
Loading...
Searching...
No Matches
ActuationModelAbstractTpl< _Scalar > Class Template Referenceabstract

Abstract class for the actuation-mapping model. More...

#include <actuation-base.hpp>

Inheritance diagram for ActuationModelAbstractTpl< _Scalar >:
ActuationModelBaseActuationModelFloatingBaseThrustersTpl< _Scalar >ActuationModelFloatingBaseTpl< _Scalar >ActuationModelFullTpl< _Scalar >ActuationModelNumDiffTpl< _Scalar >ActuationSquashingModelTpl< _Scalar >

Public Types

typedef ActuationDataAbstractTpl< Scalar > ActuationDataAbstract
typedef MathBaseTpl< Scalar > MathBase
typedef MathBase::MatrixXs MatrixXs
typedef StateAbstractTpl< Scalar > StateAbstract
typedef MathBase::VectorXs VectorXs

Public Member Functions

 ActuationModelAbstractTpl (std::shared_ptr< StateAbstract > state, const std::size_t nu)
 Initialize the actuation model.
void calc (const std::shared_ptr< ActuationDataAbstract > &data, const Eigen::Ref< const VectorXs > &x)
 Ignore the computation of the actuation signal.
virtual void calc (const std::shared_ptr< ActuationDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u)=0
 Compute the actuation signal from the state point $\mathbf{x}\in\mathbb{R}^{ndx}$ and joint torque inputs $\mathbf{u}\in\mathbb{R}^{nu}$.
void calcDiff (const std::shared_ptr< ActuationDataAbstract > &data, const Eigen::Ref< const VectorXs > &x)
 Ignore the computation of the Jacobians of the actuation function.
virtual void calcDiff (const std::shared_ptr< ActuationDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u)=0
 Compute the Jacobians of the actuation function.
virtual void commands (const std::shared_ptr< ActuationDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &tau)=0
 Compute the joint torque input from the generalized torques.
virtual std::shared_ptr< ActuationDataAbstract > createData ()
 Create the actuation data.
std::size_t get_nu () const
 Return the dimension of the joint-torque input.
const std::shared_ptr< StateAbstract > & get_state () const
 Return the state.
const VectorXs & get_u_lb () const
 Return the actuation lower bound.
const VectorXs & get_u_ub () const
 Return the actuation upper bound.
virtual void print (std::ostream &os) const
 Print relevant information of the residual model.
void set_u_lb (const VectorXs &u_lb)
 Modify the actuation lower bounds.
void set_u_ub (const VectorXs &u_ub)
 Modify the actuation upper bounds.
virtual void torqueTransform (const std::shared_ptr< ActuationDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u)
 Compute the torque transform from generalized torques to joint torque inputs.

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar

Protected Attributes

std::size_t nu_
 Dimension of joint torque inputs.
std::shared_ptr< StateAbstract > state_
 Model of the state.
VectorXs u_lb_
 Lower actuation limits.
VectorXs u_ub_
 Upper actuation limits.

Friends

template<class Scalar>
std::ostream & operator<< (std::ostream &os, const ActuationModelAbstractTpl< Scalar > &model)
 Print information on the actuation model.

Detailed Description

template<typename _Scalar>
class crocoddyl::ActuationModelAbstractTpl< _Scalar >

Abstract class for the actuation-mapping model.

The generalized torques $\boldsymbol{\tau}\in\mathbb{R}^{nv}$ can by any nonlinear function of the joint-torque inputs $\mathbf{u}\in\mathbb{R}^{nu}$, and state point $\mathbf{x}\in\mathbb{R}^{nx}$, where nv, nu, and ndx are the number of joints, dimension of the joint torque input and state manifold, respectively. Additionally, the generalized torques are also named as the actuation signals of our system.

The main computations are carried out in calc(), and calcDiff(), where the former computes actuation signal, and the latter computes the Jacobians of the actuation-mapping function, i.e., $\frac{\partial\boldsymbol{\tau}}{\partial\mathbf{x}}$ and $\frac{\partial\boldsymbol{\tau}}{\partial\mathbf{u}}$. Note that calcDiff() requires to run calc() first.

See also
calc(), calcDiff(), createData()

Definition at line 46 of file actuation-base.hpp.

Member Typedef Documentation

◆ MathBase

template<typename _Scalar>
typedef MathBaseTpl<Scalar> MathBase

Definition at line 51 of file actuation-base.hpp.

◆ StateAbstract

template<typename _Scalar>
typedef StateAbstractTpl<Scalar> StateAbstract

Definition at line 52 of file actuation-base.hpp.

◆ ActuationDataAbstract

template<typename _Scalar>
typedef ActuationDataAbstractTpl<Scalar> ActuationDataAbstract

Definition at line 53 of file actuation-base.hpp.

◆ VectorXs

template<typename _Scalar>
typedef MathBase::VectorXs VectorXs

Definition at line 54 of file actuation-base.hpp.

◆ MatrixXs

template<typename _Scalar>
typedef MathBase::MatrixXs MatrixXs

Definition at line 55 of file actuation-base.hpp.

Constructor & Destructor Documentation

◆ ActuationModelAbstractTpl() [1/2]

template<typename _Scalar>
ActuationModelAbstractTpl(std::shared_ptr< StateAbstract >state,
const std::size_tnu )

Initialize the actuation model.

Parameters
[in]stateState description
[in]nuDimension of joint-torque input

◆ ActuationModelAbstractTpl() [2/2]

template<typename _Scalar>
ActuationModelAbstractTpl()
inlineprotected

Definition at line 197 of file actuation-base.hpp.

Member Function Documentation

◆ calc() [1/2]

template<typename _Scalar>
virtual void calc(const std::shared_ptr< ActuationDataAbstract > &data,
const Eigen::Ref< const VectorXs > &x,
const Eigen::Ref< const VectorXs > &u )
pure virtual

◆ calc() [2/2]

template<typename _Scalar>
void calc(const std::shared_ptr< ActuationDataAbstract > &data,
const Eigen::Ref< const VectorXs > &x )

Ignore the computation of the actuation signal.

It does not update the actuation signal as this function is used in the terminal nodes of an optimal control problem.

Parameters
[in]dataActuation data
[in]xState point $\mathbf{x}\in\mathbb{R}^{ndx}$

◆ calcDiff() [1/2]

template<typename _Scalar>
virtual void calcDiff(const std::shared_ptr< ActuationDataAbstract > &data,
const Eigen::Ref< const VectorXs > &x,
const Eigen::Ref< const VectorXs > &u )
pure virtual

◆ calcDiff() [2/2]

template<typename _Scalar>
void calcDiff(const std::shared_ptr< ActuationDataAbstract > &data,
const Eigen::Ref< const VectorXs > &x )

Ignore the computation of the Jacobians of the actuation function.

It does not update the Jacobians of the actuation function as this function is used in the terminal nodes of an optimal control problem.

Parameters
[in]dataActuation data
[in]xState point $\mathbf{x}\in\mathbb{R}^{ndx}$

◆ commands()

template<typename _Scalar>
virtual void commands(const std::shared_ptr< ActuationDataAbstract > &data,
const Eigen::Ref< const VectorXs > &x,
const Eigen::Ref< const VectorXs > &tau )
pure virtual

◆ torqueTransform()

template<typename _Scalar>
virtual void torqueTransform(const std::shared_ptr< ActuationDataAbstract > &data,
const Eigen::Ref< const VectorXs > &x,
const Eigen::Ref< const VectorXs > &u )
virtual

◆ createData()

◆ print()

template<typename _Scalar>
virtual void print(std::ostream &os)const
virtual

Member Data Documentation

◆ Scalar

template<typename _Scalar>
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar

Definition at line 50 of file actuation-base.hpp.

◆ nu_

template<typename _Scalar>
std::size_t nu_
protected

Dimension of joint torque inputs.

Definition at line 193 of file actuation-base.hpp.

◆ state_

template<typename _Scalar>
std::shared_ptr<StateAbstract> state_
protected

Model of the state.

Definition at line 194 of file actuation-base.hpp.

◆ u_lb_

template<typename _Scalar>
VectorXs u_lb_
protected

Lower actuation limits.

Definition at line 195 of file actuation-base.hpp.

◆ u_ub_

template<typename _Scalar>
VectorXs u_ub_
protected

Upper actuation limits.

Definition at line 196 of file actuation-base.hpp.


The documentation for this class was generated from the following file: