How the pelvis rotates?

Dear friends,
I use the joint angles and displacement to drive the model. I have a question about how the pelvis rotates. We can find the following code in file JointAndDrivers.any:

  AnyKinEqInterPolDriver JntDriverTrunk = {
    FileErrorContinueOnOff = On;
    Type = PiecewiseLinear;
//    BsplineOrder = 18;
    FileName = "../Input/IBL/IBLWN1/trunk.txt";
    AnyKinMeasureOrg &PelvisPosX = ...HumanModel.Interface.Trunk.PelvisPosX;
    AnyKinMeasureOrg &PelvisPosY = ...HumanModel.Interface.Trunk.PelvisPosY;
    AnyKinMeasureOrg &PelvisPosZ = ...HumanModel.Interface.Trunk.PelvisPosZ;
    AnyKinMeasureOrg &PelvisRotX = ...HumanModel.Interface.Trunk.PelvisRotX;
    AnyKinMeasureOrg &PelvisRotY = ...HumanModel.Interface.Trunk.PelvisRotY;
    AnyKinMeasureOrg &PelvisRotZ = ...HumanModel.Interface.Trunk.PelvisRotZ;
    AnyKinMeasureOrg &PelvisThoraxExtension = ...HumanModel.Interface.Trunk.PelvisThoraxExtension;
    AnyKinMeasureOrg &PelvisThoraxLateralBending = ...HumanModel.Interface.Trunk.PelvisThoraxLateralBending;
    AnyKinMeasureOrg &PelvisThoraxRotation = ...HumanModel.Interface.Trunk.PelvisThoraxRotation;
    Reaction.Type={On,On,On,On,On,On,Off,Off,Off};
  };
You see, the model drives the pelvis by X,Y,Z displacement and X,Y,Z rotation. but different orders in rotations of X, Y, Z will results different pelvis position. So how the pelvis rotates?

… er… by the way, the X,Y, Z refer to global coordinate, right?
Best regards,
Thomas

Dear Thomas,

It always depends on how the joint is defined. In this case, check in the interface file how the constraints are set up.

Dear Amir,
Thanks so much that I find the sequence of rotations in interface files.
Best Regards,
Thomas

Dear Amir,
I have read the Interface files and find the constraints of rotations:

AnyKinMeasureOrg PelvisRotX ={
  AnyKinRotational rot ={
    AnySeg &ref2 =....Trunk.SegmentsLumbar.PelvisSeg;
    Type=RotAxesAngles;
  };
  MeasureOrganizer={2};
};

AnyKinMeasureOrg PelvisRotY ={
  AnyKinRotational &ref=.PelvisRotX.rot;
  MeasureOrganizer={1};
};

AnyKinMeasureOrg PelvisRotZ ={
  AnyKinRotational &ref=.PelvisRotX.rot;
  MeasureOrganizer={0};
};

and the corresponding constraint data can get from

  AnyKinEqInterPolDriver JntDriverTrunk = {
    FileErrorContinueOnOff = On;
    Type = Bspline;
    BsplineOrder = 4;
    FileName = "../Input/"+OutputFileNamePrefix+Main.ModelSetup.C3DFileData.NameOfFile+"-euler-trunk.txt";
    AnyKinMeasureOrg &PelvisPosX = ...BodyModel.Interface.Trunk.PelvisPosX;
    AnyKinMeasureOrg &PelvisPosY = ...BodyModel.Interface.Trunk.PelvisPosY;
    AnyKinMeasureOrg &PelvisPosZ = ...BodyModel.Interface.Trunk.PelvisPosZ;
    AnyKinMeasureOrg &PelvisRotX = ...BodyModel.Interface.Trunk.PelvisRotX;
    AnyKinMeasureOrg &PelvisRotY = ...BodyModel.Interface.Trunk.PelvisRotY;
    AnyKinMeasureOrg &PelvisRotZ = ...BodyModel.Interface.Trunk.PelvisRotZ;

But I still don’t know the sequence of rotation, can you explain it in detail for me? many thanks.

by the way, I find the sequences of hip joint rotations, maybe you can well understand my problems:

// This Folder contains hip angle measures which are compliant the sequence of 
// hip joint rotation sequence recommended by International Society of 
// Biomechanics (ISB). The seqence is hip flexion (Z), hip abduction (X) and hip
// external rotation (Y). These measuers in this folder are used by default in the
// interface folder. 

AnyFolder HipJoint_SeqZXY = {
  AnyKinMeasureOrg HipFlexion = {
    AnyKinRotational HipMeasure ={
      AnyRefNode &PelvisNode = ....Seg.Pelvis.HipJoint.RotNode;
      AnyRefNode &ThighNode = ....Seg.Thigh.HipJoint.RotNode;
      PelvisNode={AnyDrawRefFrame drw={RGB={1,0,0};Visible = Off;}; };
      ThighNode={AnyDrawRefFrame drw={RGB={0,1,0};Visible = Off;};  };
      Axis1 = z; Axis2 = x;  Axis3 = y;
      Type=RotAxesAngles;
    };
    MeasureOrganizer={0};
  };
  AnyKinMeasureOrg HipAbduction = {
    AnyKinRotational &HipJoint =.HipFlexion.HipMeasure; 
    MeasureOrganizer={1};
  };
  AnyKinMeasureOrg HipExternalRotation ={
    AnyKinRotational &HipJoint =.HipFlexion.HipMeasure; 
    MeasureOrganizer={2};
  };
};

Best regards,
Thomas

Hi Thomas

The sequence is Z,Y,X. They are intrinsic rotations (i.e. about the moving pelvis frame)

You can see this by looking at the code in the file Interface.any


AnyKinMeasureOrg PelvisRotX ={
AnyKinRotational rot ={
AnySeg &ref2 =…Trunk.SegmentsLumbar.PelvisSeg;
Type=RotAxesAngles;
};
MeasureOrganizer={2};
};
AnyKinMeasureOrg PelvisRotY ={
AnyKinRotational &ref=.PelvisRotX.rot;
MeasureOrganizer={1};
};
AnyKinMeasureOrg PelvisRotZ ={
AnyKinRotational &ref=.PelvisRotX.rot;
MeasureOrganizer={0};
};

Each of the three pelvis rotation measures refer to the AnyKinRotational class name ‘rot’. Since this class only refers to one coordinate system (Trunk.SegmentsLumbar.PelvisSeg) it measures this coordinate systems rotation with respect to global. The default sequence is always zyx, but it can be changed by setting the Axis1/Axis2/Axis3 variables. Try to read the documentation on the AnyKinRotational.

Hope this helps a bit.

/Morten

Many thanks, I got it.

Thanks, I got it.

Dear Morten,
I have another question now.
The pelvis is driven by three displacements: PelvisPosX,Y,Z. And the node refers to the segment parameter r0, just like the code describes:
AnyKinMeasureOrg PelvisPosX ={
AnyKinLinear lin ={
AnySeg &ref2 =…Trunk.SegmentsLumbar.PelvisSeg;
};
MeasureOrganizer={0};
};
But how is the r0 defined in human anatomical frame? Is it the position of L5-S1 joint?

And compared with rotation, the pelvis is displaced first or rotated first?

Best regards,
Thomas

Hi Thomas

I had overlook your latest post. Sorry.

The parameters r0 and Axes0 are the load time position of segments’ coordinate system in the global coordinate system.

The r0 vector points to the location of the technical coordinate system of the bodypart. Where that is defined depends on the choice of the person/research group who originally created that part of the model. In some cases it is coincident with some anatomical reference frame, and in some cases it is not. In some cases the coordinate system can even seem totally arbitrary. The TLEM model is an example of this. The coordinate system for the TLEM segments align with the laboratory frame used during the cadaver dissection.

The anatomical frame of the pelvis is the midpoint between the ASIS points. This not where coordinate system of the pelvis is located, but why it is placed where it is I don’t know.

> And compared with rotation, the pelvis is displaced first or rotated first?

Since r0 is in global coordinate you could say that it was first moved then rotated…

/Morten

Thank you so much, I will try both of the sequence to validate it.
Beat regards,
Thomas

Dear Morten,
Now I have studied the pelvis rotation and some questions come up, and the questions are described in the attached file, can you help solve it?
Best regards,
Thomas

Hi Thomas

This is starting to become a question for the actual supporters at AnyBody Technology. However, I did take a look at your pdf file.

Rotation are inherently confusing. I suggest you study the wikipedia site on euler angles. That has helped me a lot.

I think you are confused because you haven’t realized that all rotations are intrinsic i.e. about the moving frame of reference.

This may be what you call rations around the local frame. But that is not correct. The rotations are still measured with respect to some other frame. In case of the pelvis, that other frame is the global reference frame.

You small example only helped confuse yourself. It does look like the sequence is XYZ, but only because you thought the sequnce was extrinsic.

Hope this helps a bit
/Morten

Dear Morten,
But in my example, you can find that the sequence will determine the final position. Different sequences will result in different positions.
I just assumed the sequence and validated by the example…
Thomas

Hi Thomas

You should have tried to falsify your assumption instead. That would be the scientific approach :slight_smile:

The extrinsic rotation sequence { pi/2 (X), pi/2 (Y), pi/2 (Z) } will give the same final position as the intrinsic sequence { pi/2 (z), pi/2 (y), pi/2 (x) }.

Intrinsic rotations (about the moving reference frame) is what AnyKinRotational uses by default.

I gues this why you got confused. Try to test you assumption of the sequence with something else than pi/2… Then see what happens.

/Morten

Dear Morten,
Hahahahaha!
many thanks and I got it.
you mean that the local coordinate to the pelvis will change after one rotation just like your picture shows.
And it does get the same results.
Thanks again.
Best regards,
Thomas