starting with a specific model for kinematical analysis

Sebastian,

is there already a scaling file included in the model, or should I add it? Where do I place it in the model (I presume I should use 1 scaling file for the 2 included studies)?

Frederik

Hi,
please have a look in the AnyMan file, it can be found in the HumanModel folder.
Sebastian

Sebastian,

I did find it and made adaptations according to my test subject’s body measures.
But I still get the comlete error sequence when I try to execute the MotionandParameterOptimization.
The error sequence starts with this message:

WARNING(OBJ.MCH.KIN6) : C:/D…s/p…9/M…n/A…s/A…1/A…n/M…s/G…3/ExtraDrivers.any : rot : Close to singular position : Orientation close to Gimbal Lock, i.e., first and third axis of rotation being parallel
Failed to resolve kinematic constraints. Newton relaxation too small. (final kin. error = 1.715143E-002) This refers to the extradriversfile I included.

Do you have a suggestion on how I can fix this problem?

Frederik

Frederik,
it could be an inital position issue, please post the model you are working on right now.
Best regards,
Sebastian

Sebastian,

When I had this error, I was still working in the model of the right arm. Now I used the model you uploaded with the left arm inside and I simply copied the AnyMan file I adapted to this left arm model. The specific error I mentioned in my previous post is gone, but the model still doesn’t succesfully execute the optimization sequence.
I 'll attach both models…

Frederik

Frederik, which model is the right one? Did you measure a left or a right arm? Don’t get me wrong, but it is a waste of time dealing with such a silly issue.
Sebastian

Sebastian,

it must be the left arm…

I hope you can provide me with a suggestion in order to make the model work entirely…

Many thanks!!

Frederik

Hi Frederik,
The motion of the left arm, also when you just look at the trajectories looks quite strange to me, If I try to replicate this kind of motion it hurts ;-).
Please make sure that the markers are on the right spots, as in the experimental setup. I would also help quite a bit if you know the position of the trunk. Do you know the orientation of the global ref system? Is the trunk e.g. aligned with the global y axis? If you just run the Initial Condiitons in the KinematicStudyForParameterIdentification you can see that the markers, in the wrist region and in the shoulder are quite far away from the measured markers. The reasons are - not correctly placed markers in the model, position/orientation of the trunk.
Best regards,
Sebastian

Sebastian,

the positioning of the different markers in the model is ok and according to the marker setup we used during the kinematic registration.

I think I found the problem. I tried another c3d file (I’ll attach it as zipfile to this message) of a left arm movement. Basically, it seems to me that the coordinate system of the model does not fit to the one from the measurements. In our lab the Z-axis is vertical upright and the X- and Y-axes define the plane on the floor.
In the attached measurement: the X-Z plane makes an visually estimated angle of a 20° to 30° with the coronal plane of the body. can this explain the strange and painfull movement?
Do you have a suggestion on adapting this?

Frederik

Frederik,
please go to the Mannequin file and adjust the pelvis orientation and position according to your test setup. If the trunk is oriented right, it might be useful to switch the PelvisGroundDriver CType to Hard again (in ExtraDrivers). Now its Soft, which means it will not fullfil the position in a strict way. But this also causes the trunk to rotate during the analyses.
Best regards,
Sebastian

Sebastian,

your suggestion worked indeed, but only partially. I adapted the initial pelvis position and rotation together with the position of the arm and now I get another error:

Failed to resolve kinematic constraints. Too many iterations used (final kin. error = 3.063707E-006).
.20) …Kinematic analysis terminated
ERROR(OBJ.MCH.KIN3) : C:/D…s/p…9/M…n/A…s/A…1/A…n/M…s/G…m/GaitFullBody.main.any : MotionOptimization.Kinematics : Kinematic analysis failed in time step 20

Do you can explain me what might cause this error? And more important, how can I solve this.

Many thanks again!

Best regards,

Frederik

Sebastian,

in addition to my previous post: it seems that the scaling of the arm is not perfect. I used the general scaling based on persons’ height and weight, but it appears that the length of upper and lower arm is not completely correct. Is it possible to adjust this by combining 2 scaling methods?

Best regards,

Frederik

Frederik,
for the scaling issue: look for the AnyMan file, there you can give specific values for the bones. The kinematic issue indicates its still not optimal. For debugging you may simply increase the kinematic tolerance a little to find out whats the problem. (e.g. Kinematics.KinematicTol = 0.0001; in the study folder.)
Best regards,
Sebastian

Sebastian,

thanks for your suggestions!
I don’t understand completely what you mean: should I already try to change the bone scaling values, or should first increase the kinematical tolerance?
For the kinematical tolerance: in which study should this be adapted? In the AnyOptKinStudy ParameterIdentification or in AnyBodyStudy MotionOptimization? Or in both?
And the example you gave, I can type this just like that (but increase the tolerance even more?)? Do you have an idea of what a good tolerance might be for this problem, or is this just trial and error?

Many thanks again!!

Frederik

First get the model right, scaling, positioning of trunk/pelvis.
Then mess with the kinematic tolerance. It should be fine to include it in the KinematicStudyForParamterIdentification. Well basically the model should work without any adjustment of the tolerance. I think the tolerance I gave should be fine. It is given in meters, so setting the tolerance e.g. to 0.1 would not work.
But again, first get the model right. If you record again, please use markers on the trunk. This would resolve most of the problems you encounter.
Best regards,
Sebastian

Sebastian,

I adapted the scaling based on measurements of the test person. However, the optimization sequence still doesn’t work, but already gets further:
now I got 2 error messages. The first one is during the sequence: ‘failed to resolve kinematic constraints. Newton relaxation too small. kinematical analysis failed in time step 14’.
At the end of the sequence, the second (similar) one appears: ‘failed to resolve kinematic constraints. Newton relaxation too small. kinematical analysis failed in time step 76’
I’ll attach the complete model…
Should I mess with the kinematic tolerance now, or is there something else to do first?
Many thanks again!

Best regards,

Frederik

Hi Frederik,
if you run the Kinematics in the KinematicsStudy... you can see that the thorax is acutally turned around, which of course causes some major problems. The issue is in the ExtraDrivers,
AnyKinEqSimpleDriver PelvisGroundDriver ={
AnyKinLinear lin ={
AnyFixedRefFrame &ref1 = ....EnvironmentModel.GlobalRef;
AnySeg &ref2 = ....HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg;
};
AnyKinRotational rot ={
AnyFixedRefFrame &ref1 = ....EnvironmentModel.GlobalRef;
AnySeg &ref2 = ....HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg;
Type=RotAxesAngles;
};

DriverPos={
.JntPos.PelvisPosX,
.JntPos.PelvisPosY,
.JntPos.PelvisPosZ,

  pi/180*.JntPos.PelvisRotZ,
  pi/180*.JntPos.PelvisRotY,
  pi/180*.JntPos.PelvisRotX
};

DriverVel={
  0,0,0,0,0,0
};
CType = {Soft,Soft,Soft,Soft,Soft,Soft};

//CType = {Hard,Hard,Hard,Hard,Hard,Hard};
Reaction.Type={On,On,On,On,On,On};
};
The Velocity was set to the reference of the position, but it should of course be fixed. This will improve it, but nevertheless it fails the kinematics at some point, Please check the position of the markers on the wrist, the appear to be too close to the bones. Playing around with the initial segment length may also help. Notice that the segment length are maybe defined different to what you have measured, in case you are unsure have a look at the segement files.
Best regards,
Sebastian

Dear Sebastian,

many thanks for your help and support so far: the optimization sequence works! However, when I try to load and execute the inverse dynamics, another error occurs:

ERROR(OBJ.FILE1) : C:/D…s/p…9/M…n/A…s/A…1/A…n/M…s/G…m/JointsAndDriversOptimized.any : JntDriverLeftLegTD.FileName : Problem with file : C:\Documents and Settings\p0007009\Mijn documenten\Anyscripts\AMMRV1.1\Application\MyModels\GaitFullBodyEXOSIMLeftArm estany1-output-euler-leftlegtd.txt : The data file does not exist.

When I check the concerning file, the error is in this part:

#if LEFT_LEG_TD == 1
AnyKinEqInterPolDriver JntDriverLeftLegTD = {
FileErrorContinueOnOff = On;
Type = Bspline;
BsplineOrder = 4;
FileName = Main.ModelSetup.C3DFileData.NameOfFile+"-output-euler-leftlegtd.txt";
AnyKinMeasureOrg &HipFlexion = …HumanModel.Interface.Left.HipFlexion;
AnyKinMeasureOrg &HipAbduction = …HumanModel.Interface.Left.HipAbduction;
AnyKinMeasureOrg &HipExternalRotation = …HumanModel.Interface.Left.HipExternalRotation;
AnyKinMeasureOrg &KneeFlexion = …HumanModel.Interface.Left.KneeFlexion;
AnyKinMeasureOrg &AnklePlantarFlexion = …HumanModel.Interface.Left.AnklePlantarFlexion;
AnyKinMeasureOrg &SubTalarEversion = …HumanModel.Interface.Left.SubTalarEversion;
Reaction.Type={Off,Off,Off,Off,Off,Off};

Should I just comment it out of the model, or is there another way to solve this problem?
I think when this problem is solved, I’ll get a similar error from the right leg, although no legs are included in the model…

Furthermore, I would like to analyze the muscle work as well: should I just include for the inverse dynamics model 3E muscles then?

Best regards,

Frederik

Sebastian,

I already discovered and solved the problem! But thanks anyway!

Sebastian,

the model works all the way now, even the inverse dynamics part. However I have a new question: I want to make a graph of the moment in the elbow (flexion-extension) over time and another graph or graphs of the muscle force of the different muscles involved. How can I do this in order to become graphs of good quality (I didn’t found a topic on that in the tutorials)? Furthermore, is it possible to export this graphs into tables with numbers in order to do some post processing in excel or matlab? If possible, how can I realize that?

Many thanks in advance!!

Frederik