text data of external force

I want to run inverse dynamics by using GaitFullBody
But my c3d data don’t have external force.
So, I want to use text data of external force.
I add body of both feet of heel and toe,and left hand to external force.
Please check this file.
My AnyBody is AMMR1.5 and AMS5.2.

Hi Sambom,

I have taken a look in the file ReactionForce.any where a number of forces are applied. If this is correct or not is impossible to know for me, since it will depend on how the data was measured.

The forces you apply are applied to the reference systems listed in the AnyForce3D and it is done in global coordinate system, (it is also possible to apply forces in local system)

One way of checking such a model would be to run it and look at the residual forces present between human and world. In the gait models this forces is found in the pelvis driver, if the forces there are very big it is a sign that the external forces are not applied correctly.

Best regards
Søren

Thank you message, toerholm.
Sorry, I don’t use ReactionForce.any. I clean up that file.
But, I use ReactionForceFiltered.any.
Is the reason of the error this file?

I beg your kindness.

Hi Sambom,

I have checked the other file and it looks more or less the same as the other one.

Please describe the error you get in detail including the error message?

From your describtion i do not see this?

Best regards
Søren

Thank you message, toerholm.
Error message is ERROR(OBJ1) : C:/U…s/h…9/D…p/a/A…5/A…5/A…n/E…s/tmu3/ForceOption.any : force : Parameter has an invalid value for this interpolation; extrapolations are not allowed.
Is error reason ForceOption.any?

I beg your kindness.

Hi Sambom,

You will get this error if your tEnd has a higher value than the time vector used by your interpolations functions.

Lets say tEnd=10 and the timevector in your force functions are T={0…9};
then you would et this error.

So I would descrease tEnd until it is smaller than the time values in your interpolation fucntions.

Best regards
Søren

Thank you message, toerholm.

I understand a little your message.
Sorry, I don’t use AnyBody.
So, I don’t know what should I do for it.
If you wouldn’t mind, I would like to get more information.

I beg your kindness.

Hi Sambom,

Please do the following:

1 click the error message you get C:/U…s/h…9/D…p/a/A…5/A…5/A…n/E…s/tmu3/ForceOption.any : force

This will take you to the rigth place in the script.

2: find the this object “force” in the ModelTree, (you can do this by holding the cursor on the “force” and rigth click then select locate in modeltree).

3: for the “force” object double click the timevector “T”

4: notice the first and last values of it!

5: locate the tEnd and tStart values of your study in the ModelTree

6: reduce tEnd to be smaller than the last time vector value

7: increase tstart to be larger than the first time vector value if needed

Hope this helps

Best regards
Søren

Thank you message, toerholm.

I consult your advice and I try to change my file.
But I recieve new error message
ERROR(OBJ1) : C:/U…s/h…9/D…p/a/A…5/A…5/A…n/E…s/tmu3/JointsAndDriversOptimized.any : JntDriverTrunk : Time, ‘t’, has an invalid value for this interpolation
What should I do?

I beg your kindness.

Hi Sambom,

I have tried your model and dicovered a few things…

[ol]
[li]The tstart is 200 tend 446 … this looks like framenumbers to me and does not make sense, please revert these lines to the original code. This will make the latest error go away.[/li][li]but you will get back the previous error, the reason is like i wrote before, your timevector T do not match times in study.[/li][li]the time vector you fecth from an object called “Main.Studies.HumanModel.Reaction” this object is an interpolation function which read values from a file. So i guess the file has frames and not time as the first collum?[/li][li]so you need to construct a valid timevector…[/li][li]you could read in the file with a new interpolation function and then scale the T vector by an expression[/li][/ol]Best regards
Søren

Thank you for the thorough explanation.

Sorry, how do change a valid timevector and new interpolation function?
Which do use file?
Sorry to keep asking questions.

I beg your kindness.

You can do three things:

  1. make the change in the file, by altering the time vector.
  2. read in the numbers unchanged and do the changes in AMS.
  3. “steal” the time vector from the markers assuming you have same frame numbers

I tried to item 3.

In the forceoption.any file set the T vector to the following for example…
T=Main.ModelSetup.C3DFileData.Points.Markers.RFHD.PosInterpol.T;

Additionally in your main file you need to add this line

AnyFolder &Myref=.HumanModel;

inside your study…

the reason is that you add stuff in the humanmodel folder above, but this folder is not referred in the study at all… only the one level deeper folder .humanmodel.Bodymodel…

Søren

Thank you message, toerholm.
I really appreciate your help.

I challenge to change my file.
Is it correct?

I beg your kindness.

It looks like you did not add the reference in the study?

Additionally in your main file you need to add this line

AnyFolder &Myref=.HumanModel;

inside your study...

Søren

Thank you message, toerholm.
It was a great help.

But, reaction points are unexpected position.
And I make model ver. woman but don’t run
RunMotionAndParameterOptimizationSequence.

What should I do?

I beg your kindness.

Hi Sambom,

Please explain what you mean by :

reaction points are unexpected position.

If you are not satisfied with the position you have applied the forces in then please move the nodes used for this by altering the sRel.

Please explain what you did to make the woman model and how it differes for your other model which runs?

Best regards
Søren

Thank you message, toerholm.

Sorry, the fore problem was solved.

I change tmu3.zip body parameter , I think initial position is wrong.
I can’t these file’s InitialPositionOfBody.

Would you set initial position?

I beg your kindness.

Hi Sambom,

The values found in the InitialPositionOfBody folder is used to solve the first timestep. If you model fails to solve the first kinematic step then it is a good idea to alter these values so your starting posture becomes closer to the markers.

Please note that these positions only has an impact on the first kinematic step, it may influence if it will solve or not. For the following steps there is zero impact. So these position only need to be good enough to get the analysis started.

Best regards
Søren

Thank you message, toerholm.

I challenge to change starting posture.
But I receive ERROR(OBJ.MCH.KIN3) : C:/U…s/h…9/D…p/A…5/A…n/E…s/t…n/GaitFullBody.main.any : MotionOptimization.InitialConditions : Kinematic analysis failed in time step 0
by using tmu3-woman.

Is this c3d file wrong?

Hi Sambom,

Several things can go wrong.
[ol]
[li]your initial positions are not close enough to the location of the markers in the first time step as i explained earlier.[/li][li]Markers could have dropped out? if there are markers which was not been seen by the camera in the first frame they will be placed at 0,0,0 and the model may fail to solve. To see if this is the case inspect the C3D file for marker drop outs.[/li][/ol]I assume that you are using the marker configuration from the GaitLowerExtremity model or fullbody model? in an unchnaged form?

Please also see this wiki page
http://wiki.anyscript.org/index.php/How_to_setup_your_own_MoCap_driven_Model

Which describes how to use this type of models and how to trouble shoot on them.

Best regards
Søren