Template Function pinocchio::computeStaticTorque
Defined in File rnea.hpp
Function Documentation
-
template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl, typename ConfigVectorType>
inline const DataTpl<Scalar, Options, JointCollectionTpl>::TangentVectorType &pinocchio::computeStaticTorque(const ModelTpl<Scalar, Options, JointCollectionTpl> &model, DataTpl<Scalar, Options, JointCollectionTpl> &data, const Eigen::MatrixBase<ConfigVectorType> &q, const container::aligned_vector<ForceTpl<Scalar, Options>> &fext) Computes the generalized static torque contribution \( g(q) - \sum J(q)^{\top} f_{\text{ext}} \) of the Lagrangian dynamics:
. This torque vector accouts for the contribution of the gravity and the external forces.
Note
This function is equivalent to pinocchio::rnea(model, data, q, 0, 0, fext).
- Template Parameters:
JointCollection – Collection of Joint types.
ConfigVectorType – Type of the joint configuration vector.
- Parameters:
model – [in] The model structure of the rigid body system.
data – [in] The data structure of the rigid body system.
q – [in] The joint configuration vector (dim model.nq).
fext – [in] External forces expressed in the local frame of the joints (dim model.njoints).
- Returns:
The generalized static torque stored in data.tau.