Template Class ActuationModelFloatingBaseThrustersTpl

Inheritance Relationships

Base Type

Class Documentation

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

Actuation models for floating base systems actuated with thrusters.

This actuation model models floating base robots equipped with thrusters, e.g., multicopters or marine robots equipped with manipulators. It control inputs are the thrusters’ thrust (i.e., forces) and joint torques.

Both actuation and Jacobians are computed analytically by calc and calcDiff, respectively.

We assume the robot velocity to zero for easily related square thruster velocities with thrust and torque generated. This approach is similarly implemented in M. Geisert and N. Mansard, “Trajectory generation for

quadrotor based systems using numerical optimal control”, (ICRA). See Section III.C.

Public Types

typedef MathBaseTpl<Scalar> MathBase
typedef ActuationModelAbstractTpl<Scalar> Base
typedef ActuationDataAbstractTpl<Scalar> Data
typedef StateMultibodyTpl<Scalar> StateMultibody
typedef ThrusterTpl<Scalar> Thruster
typedef MathBase::Vector3s Vector3s
typedef MathBase::VectorXs VectorXs
typedef MathBase::MatrixXs MatrixXs

Public Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW CROCODDYL_DERIVED_CAST (ActuationModelBase, ActuationModelFloatingBaseThrustersTpl) typedef _Scalar Scalar
inline ActuationModelFloatingBaseThrustersTpl(std::shared_ptr<StateMultibody> state, const std::vector<Thruster> &thrusters)

Initialize the floating base actuation model equipped with thrusters.

Parameters:
  • state[in] State of the dynamical system

  • thrusters[in] Vector of thrusters

virtual ~ActuationModelFloatingBaseThrustersTpl() = default
inline virtual void calc(const std::shared_ptr<Data> &data, const Eigen::Ref<const VectorXs>&, const Eigen::Ref<const VectorXs> &u) override

Compute the actuation signal and actuation set from its thrust and joint torque inputs \(\mathbf{u}\in\mathbb{R}^{nu}\).

Parameters:
  • data[in] Floating base thrusters actuation data

  • x[in] State point \(\mathbf{x}\in\mathbb{R}^{ndx}\)

  • u[in] Joint-torque input \(\mathbf{u}\in\mathbb{R}^{nu}\)

inline virtual void calcDiff(const std::shared_ptr<Data> &data, const Eigen::Ref<const VectorXs>&, const Eigen::Ref<const VectorXs>&) override

Compute the Jacobians of the floating base thruster actuation function.

Parameters:
  • data[in] Floating base thrusters actuation data

  • x[in] State point \(\mathbf{x}\in\mathbb{R}^{ndx}\)

  • u[in] Joint-torque input \(\mathbf{u}\in\mathbb{R}^{nu}\)

inline virtual void commands(const std::shared_ptr<Data> &data, const Eigen::Ref<const VectorXs>&, const Eigen::Ref<const VectorXs> &tau) override
inline virtual void torqueTransform(const std::shared_ptr<Data> &data, const Eigen::Ref<const VectorXs>&, const Eigen::Ref<const VectorXs>&) override
inline virtual std::shared_ptr<Data> createData() override

Create the floating base thruster actuation data.

Returns:

the actuation data

template<typename NewScalar>
inline ActuationModelFloatingBaseThrustersTpl<NewScalar> cast() const
inline const std::vector<Thruster> &get_thrusters() const

Return the vector of thrusters.

inline std::size_t get_nthrusters() const

Return the number of thrusters.

inline void set_thrusters(const std::vector<Thruster> &thrusters)

Modify the vector of thrusters.

Since we don’t want to allocate data, we request to pass the same number of thrusters.

Parameters:

thrusters[in] Vector of thrusters

inline const MatrixXs &get_Wthrust() const
inline const MatrixXs &get_S() const
inline virtual void print(std::ostream &os) const override

Print relevant information of the residual model.

Parameters:

os[out] Output stream object

Protected Attributes

std::vector<Thruster> thrusters_

Vector of thrusters.

std::size_t n_thrusters_

Number of thrusters.

MatrixXs W_thrust_

Matrix from thrusters thrusts to body wrench.

MatrixXs Mtau_

Constaint torque transform from generalized torques to joint torque inputs

MatrixXs S_

Selection matrix for under-actuation part.

bool update_data_
std::size_t nu_

Dimension of joint torque inputs.

std::shared_ptr<StateAbstract> state_

Model of the state.