Over constraint problem (GaitFullBody)

Hi, I’ve been using GaitFullBody example of AMMRV1.2.
And now I got a problem related to over constraint.
I gave some constraints and it became over constrained.
There was no problem in case of Kinematics analysis.

However when I did Inverse dynamics analysis, there occured an error because of over constraint.
So I added the following script in order to solve the problem.

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

But when I attached this script, it made an error something like follows.

ERROR(OBJ1) : D:/A…y/A…)/A…2/A…2/A…n/M…2/L…4/JointsAndDriversOptimized.any : JntDriverTrunk : Time, ‘t’, has an invalid value for this interpolation

I don’t know how to solve this problem.
Could you inform me a solution of this problem?

  • Killian -

Hi Killian,
have you optimised the motion?
An error like this usually just indicates that you have a mismatch between the data length and the Analysis time. Adjust the tStart and tEnd.
Best regards,

I’ve optimised the motion.
I think it’s better to check the attached file.
This file is exactly same file with GaitFullBody example.
The only one I edited is adding 2 lines at Inverse dynamics part.

InitialConditions.SolverType = KinSolOverDeterminate;
Kinematics.SolverType = KinSolOverDeterminate;
-> added 2 lines

Please check the file.

  • Killian -

as said before, it could be a numerical problem at the beginning of the analysis, increase the start time a little resolves this. E.g.

  tStart = Main.TrialSpecificData.tStart+2*Kinematics.ApproxVelAccPerturb+0.1; 
  tEnd = Main.TrialSpecificData.tEnd-2*Kinematics.ApproxVelAccPerturb-0.1;

Best regards,

Thanks a lot about your concern.
It was helpful to solve my problem.

But I hope to know why this problem happen.
Does Data length become shorter?


I have 2 more questions.

The one is related to the number of frame.
When I use a C3D file which has 200 frames, this example outputs 199 frames. Does it mean there is a loss of frames or not?
I asked about data length last time.
Please, inform me about this problem.

The other one is about joint constraints.
How many DOF does your skeleton model has?
Only using approximately 40 markers, we can make a motion.
So I think you gave some constraints to this skeleton model.
Where did you define it?

you can set the number of frames on your own, as the data that is used will be interpolated. So no frame is lost. The problem you had is simply a numerical one. The interpolation may be not defined on the precise start or end time.
The degrees of freedom are defined through the joint definitions. Some of them are coupled, like lumbar spine motion. You can find a good overview on the degrees of freedom by looking at the Mannequin files.
Best regards,


I have a small question regarding the “ApproxVelAccPerturb” time that is added to the standard Repository models (in my case GaitLowerExtremity). Is it just a precaution to prevent interpolation problems if you try to start and/or end the simulation at the first and/or last sample of your data. Or is it used to remove some transient effects of the interpolation process?

Reason for asking is that I choose my own tStart and tEnd and remove the “+2*Kinematics.ApproxVelAccPerturb” part, that way I can cut my long measurement into pieces, analyse them independently and ‘paste’ them together afterwards. Is this valid, or should I leave the addition to start and end time?

Best regards,

Bart Koning


Yes, the “+/-2*Kinematics.ApproxVelAccPerturb” is just to make sure to be inside the interpolation interval when starting and ending the simulation at the first and last frame.

So you can safely remove it if you choose to have a different tStart and tEnd.

Best regards, Sylvain.