Joit Orientation

Hi everyone,

I have the following questions:

  1. Does the local joint coordinate system change during simulation for ever joint? with respect to the global coodinate system? or is it only the joint angle?

  2. How can I read a joint’s orientation or current location coordinate system?

  3. When I read the ‘r’ variable which represents the joint angles, is the output wrt to the local frame or GCS?

Thanks alot for your help :).
Regards

Hello Fatima,

Yes, the local coordinate System changes in respect to the Global CS. A Joint is defined by two Nodes, and the first named is the reference. You will see the loads in the CS of the first named Node and “r” is also in local.

I think the best way to understand the angles is to draw the CS. You can make the CS visible with a simple command in the two nodes:
AnyDrawRefFrame drw = {};

In the Hip you can make the CS visible by adding this command in the Seg.any and PelvisSeg.any:
AnyVec3 HipJointStandard= {0.0, 0.0, …Sign0.0};
AnyRefNode HipJoint = {
sRel = .Scale(.HipJointStandard);
ARel = RotMat(…Sign
-30pi/180,y) * RotMat(-18pi/180,z);
AnyDrawRefFrame drw = {};
};

  AnyRefNode HipJointRightTD = {
    //This rotaion is needed to fit the data with the pelvis bone
    ARel=RotMat(-24*pi/180,z);
    sRel = .Scale({0.035, -0.115, 0.088});
    AnyDrawRefFrame drw = {};
  };

I hope this could help…


Hi Amir,

Thank you very much for your reply.
However, I need to output the actual orientation not see it visually.
Which variable exactly refers to the final orientation of the joint?

Thank you

Hello Fatima,

Sorry, there was some confusion before.

I thought, that by visualizing the joint ref frame you can see how the local ref frame is changing wrt the global system.

The ‘r’ value (for example: Right/Leg/Seg/Thigh/KneeJoint) is in global and gives coordinates wrt the origo.

The ‘Pos’ value (for example: Right/Leg/Jnt/Knee) gives joint angles wrt the local ref frame.

What exactly do you want to export?


Hi Amir,

Thank you for your reply.
What I am trying to do is dump the final orientation of the local frame of every joint wrt the global one. For example, if the rotation matrix for a local frame of joint X wrt the global fram is [0,1,0;-1,0,0;0,0,1], thats what i need to dump or output.

Thank you

Hi Fatimah,

If you use the AnyMechOutputFileForce you can dump a lot of information. Have a look at the example in the reference manual. When you output a segment, then there is a an ‘r’ as the offset (distance to 0) and ‘Axes’ as the transformation Matrix in the output file.

eg:
Segment[1]:
Name=Main.ArmModel.Segs.UpperArm;

r=-1.448819506363181e-001;0.000000000000000e+000;1.922550405937272e-001;
Axes=-2.755902468192960e-001,0.000000000000000e+000,9.612752029767957e-001;0.000000000000000e+000,1.000000000000000e+000,0.000000000000000e+000;-9.612752029767957e-001,0.000000000000000e+000,-2.755902468192960e-001;


Thanks alot for your Reply Amir.

Yes this is what I was looking for. However, what is the difference between Axes and ARel?
In the manual it says: Relative rotational transformation matrix

Relative to what? the Global Ref Frame?

Thanks again

Hi,

ARel is the rotational transformation matrix of a node relative to the reference frame of the segment.

Axes is the rotational transformation matrix of a segment relative to the global reference frame.

Best regards, Sylvain.

Hi,

Thanks alot for your help.

I have been able to draw the Local reference frame of all the joints, however I get two frames for each joint, one at the proximal and one at the distal. My question is, the joint angle variable ‘Pos’, to which reference frame is it relative? Proximal or Distal?

My other question is, can we set an initial position for the GH joint? Can we control the initial posture of the trunk?

Thank you

Hi Fatimah,

I’m not sure if I got everything correct, but I’ll try to answer:

First, if you look into the joint definition, there are two nodes defined for a joint, loads and the position are always referred to the first mentioned. I’m not sure what you mean proximal and distal in that meaning. You should have to ref frames for the GH joint, one for the hum and one for the glen/scap-part.

The initial position for the joints is set in the Manequin.any file.

I hope that helps


Thank you for your reply.
Thats exactly what I was after.
However, you mentioned in the Mannequin file, is it joint positions or angles that are specified?

Thank you

in the manequin file, you can define joint angles.


Hi,
I have another question.
in Anybody, what is the rotation direction convention?
Right-hand rule or left hand rule?
is clockwise positive or negative?

Thanks

Hi Fatima,

AnyBody is using only right handed coordinate system, and therefore the right hand rule to determine the positive direction.

Best regards, Sylvain.