Crocoddyl
Loading...
Searching...
No Matches
ActuationModelFloatingBaseThrustersTpl< _Scalar > Class Template Reference

Actuation models for floating base systems actuated with thrusters. More...

#include <floating-base-thrusters.hpp>

Inheritance diagram for ActuationModelFloatingBaseThrustersTpl< _Scalar >:
ActuationModelAbstractTpl< _Scalar >ActuationModelBase

Public Types

typedef ActuationModelAbstractTpl< Scalar > Base
typedef ActuationDataAbstractTpl< Scalar > Data
typedef MathBaseTpl< Scalar > MathBase
typedef MathBase::MatrixXs MatrixXs
typedef StateMultibodyTpl< Scalar > StateMultibody
typedef ThrusterTpl< Scalar > Thruster
typedef MathBase::Vector3s Vector3s
typedef MathBase::VectorXs VectorXs
Public Types inherited from ActuationModelAbstractTpl< _Scalar >
typedef ActuationDataAbstractTpl< Scalar > ActuationDataAbstract
typedef MathBaseTpl< Scalar > MathBase
typedef MathBase::MatrixXs MatrixXs
typedef StateAbstractTpl< Scalar > StateAbstract
typedef MathBase::VectorXs VectorXs

Public Member Functions

 ActuationModelFloatingBaseThrustersTpl (std::shared_ptr< StateMultibody > state, const std::vector< Thruster > &thrusters)
 Initialize the floating base actuation model equipped with thrusters.
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}$.
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.
template<typename NewScalar>
ActuationModelFloatingBaseThrustersTpl< NewScalar > cast () const
virtual void commands (const std::shared_ptr< Data > &data, const Eigen::Ref< const VectorXs > &, const Eigen::Ref< const VectorXs > &tau) override
 Compute the joint torque input from the generalized torques.
virtual std::shared_ptr< Data > createData () override
 Create the floating base thruster actuation data.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW CROCODDYL_DERIVED_CAST (ActuationModelBase, ActuationModelFloatingBaseThrustersTpl) typedef _Scalar Scalar
std::size_t get_nthrusters () const
 Return the number of thrusters.
const MatrixXs & get_S () const
const std::vector< Thruster > & get_thrusters () const
 Return the vector of thrusters.
const MatrixXs & get_Wthrust () const
void print (std::ostream &os) const override
 Print relevant information of the residual model.
void set_thrusters (const std::vector< Thruster > &thrusters)
 Modify the vector of thrusters.
virtual void torqueTransform (const std::shared_ptr< Data > &data, const Eigen::Ref< const VectorXs > &, const Eigen::Ref< const VectorXs > &) override
 Compute the torque transform from generalized torques to joint torque inputs.
Public Member Functions inherited from ActuationModelAbstractTpl< _Scalar >
 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.
void calcDiff (const std::shared_ptr< ActuationDataAbstract > &data, const Eigen::Ref< const VectorXs > &x)
 Ignore the computation of the Jacobians of the actuation function.
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.
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.

Protected Attributes

MatrixXs Mtau_
std::size_t n_thrusters_
 Number of thrusters.
std::size_t nu_
 Dimension of joint torque inputs.
MatrixXs S_
 Selection matrix for under-actuation part.
std::shared_ptr< StateAbstract > state_
 Model of the state.
std::vector< Thruster > thrusters_
 Vector of thrusters.
bool update_data_
MatrixXs W_thrust_
 Matrix from thrusters thrusts to body wrench.
Protected Attributes inherited from ActuationModelAbstractTpl< _Scalar >
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.

Additional Inherited Members

Public Attributes inherited from ActuationModelAbstractTpl< _Scalar >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar

Detailed Description

template<typename _Scalar>
class crocoddyl::ActuationModelFloatingBaseThrustersTpl< _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.

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

Definition at line 145 of file floating-base-thrusters.hpp.

Member Typedef Documentation

◆ MathBase

template<typename _Scalar>
typedef MathBaseTpl<Scalar> MathBase

Definition at line 153 of file floating-base-thrusters.hpp.

◆ Base

template<typename _Scalar>
typedef ActuationModelAbstractTpl<Scalar> Base

Definition at line 154 of file floating-base-thrusters.hpp.

◆ Data

template<typename _Scalar>
typedef ActuationDataAbstractTpl<Scalar> Data

Definition at line 155 of file floating-base-thrusters.hpp.

◆ StateMultibody

template<typename _Scalar>
typedef StateMultibodyTpl<Scalar> StateMultibody

Definition at line 156 of file floating-base-thrusters.hpp.

◆ Thruster

template<typename _Scalar>
typedef ThrusterTpl<Scalar> Thruster

Definition at line 157 of file floating-base-thrusters.hpp.

◆ Vector3s

template<typename _Scalar>
typedef MathBase::Vector3s Vector3s

Definition at line 158 of file floating-base-thrusters.hpp.

◆ VectorXs

template<typename _Scalar>
typedef MathBase::VectorXs VectorXs

Definition at line 159 of file floating-base-thrusters.hpp.

◆ MatrixXs

template<typename _Scalar>
typedef MathBase::MatrixXs MatrixXs

Definition at line 160 of file floating-base-thrusters.hpp.

Constructor & Destructor Documentation

◆ ActuationModelFloatingBaseThrustersTpl()

template<typename _Scalar>
ActuationModelFloatingBaseThrustersTpl(std::shared_ptr< StateMultibody >state,
const std::vector< Thruster > &thrusters )
inline

Initialize the floating base actuation model equipped with thrusters.

Parameters
[in]stateState of the dynamical system
[in]thrustersVector of thrusters

Definition at line 169 of file floating-base-thrusters.hpp.

Member Function Documentation

◆ calc()

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

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

Parameters
[in]dataFloating base thrusters actuation data
[in]xState point $\mathbf{x}\in\mathbb{R}^{ndx}$
[in]uJoint-torque input $\mathbf{u}\in\mathbb{R}^{nu}$

Implements ActuationModelAbstractTpl< _Scalar >.

Definition at line 220 of file floating-base-thrusters.hpp.

◆ calcDiff()

template<typename _Scalar>
virtual void calcDiff(const std::shared_ptr< Data > &data,
const Eigen::Ref< const VectorXs > &,
const Eigen::Ref< const VectorXs > & )
inlineoverridevirtual

Compute the Jacobians of the floating base thruster actuation function.

Parameters
[in]dataFloating base thrusters actuation data
[in]xState point $\mathbf{x}\in\mathbb{R}^{ndx}$
[in]uJoint-torque input $\mathbf{u}\in\mathbb{R}^{nu}$

Implements ActuationModelAbstractTpl< _Scalar >.

Definition at line 243 of file floating-base-thrusters.hpp.

◆ commands()

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

Compute the joint torque input from the generalized torques.

It stores the results in ActuationDataAbstractTpl::u.

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

Implements ActuationModelAbstractTpl< _Scalar >.

Definition at line 256 of file floating-base-thrusters.hpp.

◆ torqueTransform()

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

Compute the torque transform from generalized torques to joint torque inputs.

It stores the results in ActuationDataAbstractTpl::Mtau.

Parameters
[in]dataActuation data
[in]xState point $\mathbf{x}\in\mathbb{R}^{ndx}$
[in]tauJoint-torque inputs $\mathbf{u}\in\mathbb{R}^{nu}$

Reimplemented from ActuationModelAbstractTpl< _Scalar >.

Definition at line 263 of file floating-base-thrusters.hpp.

◆ createData()

template<typename _Scalar>
virtual std::shared_ptr< Data > createData()
inlineoverridevirtual

Create the floating base thruster actuation data.

Returns
the actuation data

Reimplemented from ActuationModelAbstractTpl< _Scalar >.

Definition at line 280 of file floating-base-thrusters.hpp.

◆ cast()

template<typename _Scalar>
template<typename NewScalar>
ActuationModelFloatingBaseThrustersTpl< NewScalar > cast()const
inline

Definition at line 288 of file floating-base-thrusters.hpp.

◆ get_thrusters()

template<typename _Scalar>
const std::vector< Thruster > & get_thrusters()const
inline

Return the vector of thrusters.

Definition at line 302 of file floating-base-thrusters.hpp.

◆ get_nthrusters()

template<typename _Scalar>
std::size_t get_nthrusters()const
inline

Return the number of thrusters.

Definition at line 307 of file floating-base-thrusters.hpp.

◆ set_thrusters()

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

Modify the vector of thrusters.

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

Parameters
[in]thrustersVector of thrusters

Definition at line 317 of file floating-base-thrusters.hpp.

◆ get_Wthrust()

template<typename _Scalar>
const MatrixXs & get_Wthrust()const
inline

Definition at line 349 of file floating-base-thrusters.hpp.

◆ get_S()

template<typename _Scalar>
const MatrixXs & get_S()const
inline

Definition at line 351 of file floating-base-thrusters.hpp.

◆ print()

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

Print relevant information of the residual model.

Parameters
[out]osOutput stream object

Reimplemented from ActuationModelAbstractTpl< _Scalar >.

Definition at line 353 of file floating-base-thrusters.hpp.

Member Data Documentation

◆ thrusters_

template<typename _Scalar>
std::vector<Thruster> thrusters_
protected

Vector of thrusters.

Definition at line 363 of file floating-base-thrusters.hpp.

◆ n_thrusters_

template<typename _Scalar>
std::size_t n_thrusters_
protected

Number of thrusters.

Definition at line 364 of file floating-base-thrusters.hpp.

◆ W_thrust_

template<typename _Scalar>
MatrixXs W_thrust_
protected

Matrix from thrusters thrusts to body wrench.

Definition at line 365 of file floating-base-thrusters.hpp.

◆ Mtau_

template<typename _Scalar>
MatrixXs Mtau_
protected

Constaint torque transform from generalized torques to joint torque inputs

Definition at line 366 of file floating-base-thrusters.hpp.

◆ S_

template<typename _Scalar>
MatrixXs S_
protected

Selection matrix for under-actuation part.

Definition at line 368 of file floating-base-thrusters.hpp.

◆ update_data_

template<typename _Scalar>
bool update_data_
protected

Definition at line 370 of file floating-base-thrusters.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.


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