Forums Anyscript.org

Forums Anyscript.org (http://forum.anyscript.org/index.php)
-   AnyGait (http://forum.anyscript.org/forumdisplay.php?f=40)
-   -   Problem : Time, 't', has an invalid value for this interpolation (http://forum.anyscript.org/showthread.php?t=5100)

Arif 10-23-2017 06:00 PM

Problem : Time, 't', has an invalid value for this interpolation
 
1 Attachment(s)
Hi everyone,

I have a problem with my model in AB. I wanted to add a C3D file to my model so i followed the tutorials and added these lines :
Code:

  InitialConditions.SolverType = KinSolOverDeterminate;
  Kinematics.SolverType = KinSolOverDeterminate;

Code:

AnyIntVar FirstFrame = Main.ModelSetup.C3DFileData.Header.FirstFrameNo;
  AnyIntVar LastFrame = Main.ModelSetup.C3DFileData.Header.LastFrameNo;
  tStart = FirstFrame/Main.ModelSetup.C3DFileData.Header.VideoFrameRate+2*Kinematics.ApproxVelAccPerturb;
  tEnd = LastFrame/Main.ModelSetup.C3DFileData.Header.VideoFrameRate-2*Kinematics.ApproxVelAccPerturb;

But still, i have the following error :
Quote:

#### Macro command : InverseDynamicAnalysisSequence(8:8)> run
8.0) InverseDynamics (Operation: Main.Studies.InverseDynamicStudy.InverseDynamics):
8.0.0) PreOperation (Operation: Main.Studies.InverseDynamicStudy.InverseDynamics.P reOperation):
8.0.0.0) InitialConditions (Operation: Main.Studies.InverseDynamicStudy.InitialConditions ):
8.0.0.0) ...Design variables have been updated.
8.0.0.1) ...Load-time positions have been re-established.
ERROR(OBJ1) : D:/b..u/D..s/A..o/A..0/AMMR/A..n/E..s/M..l/M..l/JointsAndDriversOptimized.any(12) : JntDriverTrunk : Time, 't', has an invalid value for this interpolation
I apologize for my english and for sending you such a big file, i don't know which file could be useful.
Thanks a lot,

Best regards.

toerholm 10-24-2017 03:32 PM

Hi Arif,

Welcome to the group!

I have tried your model "Mocap_FullBody.main.any"

Here are my findings:

The body model seemed to be missing an anatomical frame allowing you to place markers on clavicula and ulna, i suspect that you have added these already since it not the error you mentioned.

I then switched to run the motionandparameter optimiazation in the main file.

Then i noticed that left arm has no markers so i disabled the left arm in the file "Model/BodyPartsSetup.any" setting the statement

Code:

#define LEFT_ARM 0
The model is then running kinematic optimization and it will say it has converged but it will give you this error

Code:

inematic parameter analysis failed : there are 67 design variables but only 64 independent associated optimality conditions
This is because there are too many design variables compared to constraints.

An example is all markers the hand is free to move OptX,y,Z are on then the positions and size of hand is "undetermined/unconstrained", because the optimizer will not be able to know which positions/size is best...it can just move all markers to get another position.

To avoid this problem constrain some of the markers to be fixed in position to the segment.

Hope it helps

What is your affiliation?

Best regards
Søren

Arif 10-25-2017 04:18 PM

Hi,

Thank you very much for your prompt reply !

I understood the problem now and the step of inverse dynamics works but i had to change a little some lines and i don't know why :

Code:

AnyIntVar FirstFrame = Main.ModelSetup.C3DFileData.Header.FirstFrameNo;
  AnyIntVar LastFrame = Main.ModelSetup.C3DFileData.Header.LastFrameNo;
  tStart = FirstFrame/Main.ModelSetup.C3DFileData.Header.VideoFrameRate+0.06;//+2*Kinematics.ApproxVelAccPerturb;
  tEnd = LastFrame/Main.ModelSetup.C3DFileData.Header.VideoFrameRate-0.06;//-2*Kinematics.ApproxVelAccPerturb;

Indeed, the command "+/-2*Kinematics.ApproxVelAccPerturb" doesn't seem to work...If i write less than +0.06 or more than -0.06 it doesn't work too with the following error :
Code:

ERROR(OBJ1) :  D:/b..u/D..s/A..o/A..0/AMMR/A..n/E..s/M..l/M..l/JointsAndDriversOptimized.any(12)  :  JntDriverTrunk  :  Time, 't', has an invalid value for this interpolation

I'm an intern for a master degree at the LBMC (Laboratoire de Biomécanique et de Mécanique des Chocs) in Lyon in France.

Best regards,
Arif

toerholm 10-27-2017 03:26 PM

Hi Arif,

The error means that you can not create model which is trying to extrapolate data.

In the motionand parameteroptimization model it will save all joint angles in a spline function .

Then in the inverse dynamic analysis is will drive the model using this interpolated spline.

For numeric reason related to this spline function it is not possible to have tstart and tend to be exactly same value in both studies, this is the explanation for the modifications you needed.

Best regards
Søreb


All times are GMT +2. The time now is 10:00 PM.