Hi Jerry
The location of the knee joint axis is a really tricky problem. In reality, the instantaneous location of the knee joint axis moves during knee flexion. Thus, a fixed knee joint axis as in an approximation.
The knee joint axis in the in the TLEM2.0 model was originally estimated in the TLEMSafe project with an unloaded functional method directly on the dissected cadaver bones.
Essentially, the two bones were moved by hand through a limited range of motion while the kinematics of the bones were recorded. I don't think this created a very good approximation of the knee joint axis. But it was never the less used in the TLEMSafe research project, and it may have been OK for activities such as gait.
The AnyBody models are used for very different activities. So the axis needs to be the best compromise which works for both small joint angles as well as full knee flexion (e.g. full knee squatting).
That is why most joint axis in TLEM 2.1 model was re-implemented taking into account that the idealized joint should work for the full range of motion.
You can read about this change in the release log:
https://anyscript.org/ammr-doc/changelog.html
Redefined revolute knee axis and patella joint axis and patella tendon length based on the bone geometry. The original TLEM knee axis was estimated using a functional method and was only valid for very small flexion angles. Thanks to Marco Antonio Marra (Radboudumc) for this for this improvement.
This is probably the reason you find the location of the knee joint axis a bit strange. It is a compromise between the instantaneous knee joint axis of flexed and extended knee.
You can try the original joint axis from the TLEMSafe project if you like. It involves changing the following:
Body/AAUHuman/LegTLEM/TLEM2.1/ModelJointParameters.any line: 42-46 :
AnyVec3 KneeJoint = {-0.002171389, 0.006685766, 0}*.TF';
AnyVec3 KneeJointAxis = ..Sign*{0.0487755, -0.04631672, -0.9977353}*.TF'/vnorm({0.0487755, -0.04631672, -0.9977353});
AnyVec3 PatellaFemurJoint ={ 0.005458221, 0.005741691,0}*.TF';
AnyVec3 PatellaFemurJointAxis = ..Sign*{0.1143518,-0.05854474, -0.9984416}*.TF'/vnorm({0.1143518,-0.05854474, -0.9984416});
Body/AAUHuman/LegTLEM/TLEM2.1/ModelJointParameters.any line: 60-61 :
AnyVec3 PatellaFemurJoint = { -0.03663476, -0.005972708, 0.002046017}*.TF';
AnyVec3 PatellaFemurJointAxis = ..Sign*{0.1143518,-0.05854474, -0.9984416}*.TF'/vnorm({0.1143518,-0.05854474, -0.9984416});
Body/AAUHuman/LegTLEM/TLEM2.1/ModelJointParameters.any line: 51-52 :
AnyVec3 KneeJoint = { -0.01021331, 0.366972, -0.001585396}*.TF';
AnyVec3 KneeJointAxis = ..Sign*{0.04877549, -0.04631671, -0.9977353}*.TF'/vnorm({0.04877549, -0.04631671, -0.9977353});
It is also possible to redefine the knee joint without changing code in the AMMR folder, although this is mostly undocumented. There is a BM switch which will remove the knee joint completely.
#define BM_JOINT_TYPE_KNEE_RIGHT _JOINT_TYPE_USERDEFINED_
Then it is up to the user to redefine the knee completely from scratch. This is mostly used by advanced users who like to implement there own more advanced knee models.
Hopes this helps a bit.
Regards,
Morten