Template Function pinocchio::computeSupportedInertiaByFrame

Function Documentation

template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
InertiaTpl<Scalar, Options> pinocchio::computeSupportedInertiaByFrame(const ModelTpl<Scalar, Options, JointCollectionTpl> &model, const DataTpl<Scalar, Options, JointCollectionTpl> &data, const FrameIndex frame_id, bool with_subtree)

Compute the inertia supported by a specific frame (given by frame_id) expressed in the LOCAL frame. The total supported inertia corresponds to the sum of all the inertia after the given frame, i.e :

  • The frame inertia

  • The child frames inertia (‘Child frames’ refers to frames that share the same parent joint and are placed after the given frame)

  • The child joints inertia (if with_subtree == true) You must first call pinocchio::forwardKinematics to update placement values in data structure.

Note

Physically speaking, if the robot were to be cut in two parts at that given frame, this supported inertia would represents the inertia of the part that was after the frame. with_subtree determines if the childs joints must be taken into consideration (if true) or only the current joint (if false).

Note

The equivalent function for a joint would be :

  • to read data.Ycrb[joint_id], after having called pinocchio::crba (if with_subtree == true).

  • to read model.inertia[joint_id] (if with_subtree == false).

Warning

forwardKinematics should have been called first

Template Parameters:

JointCollection – Collection of Joint types.

Parameters:
  • model[in] The model structure of the rigid body system.

  • data[in] The data structure of the rigid body system.

  • frameId[in] The index of the frame.

  • with_subtree[in] If false, compute the inertia only inside the frame parent joint if false. If true, include child joints inertia.

Returns:

The computed inertia.