Template Function pinocchio::crba
Defined in File crba.hpp
Function Documentation
-
template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl, typename ConfigVectorType>
const DataTpl<Scalar, Options, JointCollectionTpl>::MatrixXs &pinocchio::crba(const ModelTpl<Scalar, Options, JointCollectionTpl> &model, DataTpl<Scalar, Options, JointCollectionTpl> &data, const Eigen::MatrixBase<ConfigVectorType> &q, const Convention convention = Convention::LOCAL) Computes the upper triangular part of the joint space inertia matrix M by using the Composite Rigid Body Algorithm (Chapter 6, Rigid-Body Dynamics Algorithms, R. Featherstone, 2008). The result is accessible through data.M.
Note
You can easily get data.M symmetric by copying the strictly upper triangular part in the strictly lower triangular part with data.M.triangularView<Eigen::StrictlyLower>() = data.M.transpose().triangularView<Eigen::StrictlyLower>();
Note
This algorithm also takes into account the rotor inertia effects, by adding on the diagonal of the Joint Space Inertia Matrix their contributions. This is done only for single DOF joint (e.g. Revolute, Prismatic, etc.).
Note
In WORLD convention, a direct outcome of this algorithm is the computation of the centroidal momentum matrix (data.Ag), a forward geometry and the joint jacobian matrix (data.J).
- 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).
convention – [in] Convention to use.
- Returns:
The joint space inertia matrix with only the upper triangular part computed.