I have a MoCap model in which an arm movement is performed in front of the body and overhead. After running RunAnalysis.MarkerTracking, I plan to extract the joint angles of the arm, with a particular focus on the shoulder joint angles.
My general idea is to export the joint angle time series, modify them outside of AnyBody, and then drive a model using the modified data.
I have come across several different representations of the shoulder joint angles and am now wondering which one would offer the simplest reimplementation in order to allow a comparison between the original and the modified model.
Under BodyModel.MannequinValuesFromModel I found the classical notation of the joint angles in degrees.
Under BodyModel.Interface I found the angles represented in ISB notation in radians.
And under MarkerTracking.JointAngleOutputs I found yet another representation. To my understanding, this one is also used for the subsequent calculations in RunAnalysis.InverseDynamics, but it does not seem to be identical to either of the other two.
Which representation should I choose and why?
Thanks a lot in advance for any help or suggestions!
You are right that there are several representations of the joint angles for various purposes. I will try to provide an overview.
In JointAngleOutput data we in general use RotVector as the Type in the Rotational measures being used. The reason for this is to avoid gimbal lock issues that can be present using RotAxesAngles output, these data output is intended just for the transfer of the motion from markertracking to inverse.
In the Interface folder, there are several representations both the ISB and the others, like the folder ThoraxHumerus which contains: PlaneOfElevation, Elevation, AxialRotation.
In the Mannequin there are angles in degrees.
So which one to choose?, you mention that you intend to do makertracking then export motion, modify it and import it again. If this is the workflow the easiest way would be to use the existing export and import for this thus using the RotVector options. Then when you modify you need to have defined the exact same measures. Will this modification also be in AnyBody or will you other tools for this.
The key thing is to be consistent with the used rotational measure when doing export, modification and import. In principle more or less any type of the measure will work, unless you go into a gimbal lock position. We have chosen the RotVector to achieve less issues with gimbal lock, but if you are not close to that all the measures will provide same results, it is just different ways to represent the position of the joint.
The Cartesian rotation vector measures a general 3-D orientation as a single rotation about a given axis. The rotation vector is a geometric vector that is parallel with this axis of rotation and its length is equal to angle of rotation. In must be emphasized that the velocity of the rotation vector is not equal to the angular velocity vector, except in
the planar case where the axis of rotation is constant.
Singularities: The Cartesian rotation vector has a singularity in zero (zero-vector), which is the zero rotation, i.e. when two frames are parallel. This is often inconvennient, while this measure is a good choice for all other rotations.
Multiple values: As the three outputs are measured in radians and corresponds to angles adding and subtracting any multiple of 2*pi still represents the same orientation. AnyKinRotational selects one solution as explained above.
If you look in the InterfaceFolder you will find all the different available measures, they are always part of the model and can be used to drive the model if needed.
Concerning the transfer of motion data in a mocap model from MarkerTracking to InverseDynamic it will always use RotVectors to avoid gimbal lock issues.
All joints has a built in AnyKinRotational, if you look at “Orientation” in a joint you will see this rotational measure. Here you can see its Type and sequence of rotation.
Please see AnyKinRotational in the reference manual it is the fundamental measure for measuring rotations. It can measure rotations in many different ways and are always part of a joint.