Template Function pinocchio::computeSupportedForceByFrame

Function Documentation

template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
ForceTpl<Scalar, Options> pinocchio::computeSupportedForceByFrame(const ModelTpl<Scalar, Options, JointCollectionTpl> &model, const DataTpl<Scalar, Options, JointCollectionTpl> &data, const FrameIndex frame_id)

Computes the force supported by a specific frame (given by frame_id) expressed in the LOCAL frame. The supported force corresponds to the sum of all the forces experienced after the given frame, i.e :

  • The inertial forces and gravity (applied on the supported inertia in body)

  • The forces applied by child joints

  • (The external forces) You must first call pinocchio::rnea to update placements, velocities and efforts values in data structure.

Note

If an external force is applied to the frame parent joint (during rnea), it won’t be taken in consideration in this function (it will be considered to be applied before the frame in the joint and not after. However external forces applied to child joints will be taken into account).

Note

Physically speaking, if the robot were to be separated in two parts glued together at that given frame, the supported force represents the internal forces applide from the part after the cut/frame to the part before. This compute what a force-torque sensor would measures if it would be placed at that frame.

Note

The equivalent function for a joint would be to read data.f[joint_id], after having call pinocchio::rnea.

Warning

pinocchio::rnea 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.

Returns:

The computed force.