rotationMatrix_labToOsim#

pyCGM2.Tools.opensimTools.rotationMatrix_labToOsim(axis: str, forwardProgression: bool)#

Generates a rotation matrix to convert coordinates from the lab frame to the OpenSim frame.

Parameters:
  • axis (str) – The progression axis in the lab frame (‘X’ or ‘Y’).

  • forwardProgression (bool) – Indicates if the progression is forward along the axis.

Returns:

np.ndarray – A 3x3 rotation matrix for transforming coordinates.

Raises:

Exception – If the configuration for a global referential with Z axis as progression axis is not set.