AnyBody with c3d data of different leg length

Hi,

I am running several c3d files with AnyBody. These c3d files are measured from people with leg length inequality.

After puting my c3d file name in LowerGaitExtremity, I decreased time step in order to get the model converged. When running kinematic optimization, parameter optimization can get finished. Then the error message appears saying that 'Failed to resolve kinematic constraints. Newton relaxation too small.
', ‘Kinematic analysis failed in time step 104’.

Although the c3d data for people with leg lenght inequality cannot get converged with AnyBody, I have no problem with c3d files for normal people.

Is this problem caused by different leg lengh or by the c3d data itself (say noises)? Is LowerGaitExtremity optimize the same length for both legs?

What is the reason for the error message I got?

Any help will be appreciated.
Thanks in advance.

Attached are my c3d data and the .any files I modified.

Regards,
Jerry

Hi,

I could finish debugging your model. Let me explain the methods that I’ve done to your model.

  1. Modify some code in ‘ModelSetup.any’ file like this:
  OptimizeAnthropometricsOnOff OptimizeOnOff (
  PelvisWidthOnOff ="On", 
  ThighLengthOnOff="On", 
  ShankLengthOnOff="On", 
  FootLengthOnOff="On", 
  HeadHeightOnOff="Off", 
  [b]TrunkHeightOnOff="[COLOR="Red"]Off"[/COLOR][/b], 
  UpperArmLengthOnOff="Off",
  LowerArmLengthOnOff="Off",
  VarusValgusOnOff="Off",
  Model1=MotionAndParameterOptimizationModel, Model2= InverseDynamicModel
  ) ={};

Because in your model, there isn’t any marker attached on the human upper body,
you can’t optimized the trunk height by markers.

  1. Modify kinematic tolerance values of ‘MotionOptimization’ study like this:
    AnyBodyStudy MotionOptimization = {
      
      
      AnyFolder &C3DData=..ModelSetup.C3DFileData ;
      
      AnyFolder &HumanModel=.KinematicStudyForParameterIdentification.HumanModel;
      AnyFolder &ModelOptimizationModel=.KinematicStudyForParameterIdentification;
      AnyFolder &JointAngleOutput=.KinematicStudyForParameterIdentification.JointAngleOutputs;
      
      Kinematics.PosAnalysisOnlyOnOff=On;
      nStep=Main.ModelSetup.nStep; 
      Gravity ={0.0, 0,-9.81};
      tStart = Main.TrialSpecificData.tStart+2*Kinematics.ApproxVelAccPerturb; 
      tEnd = Main.TrialSpecificData.tEnd-2*Kinematics.ApproxVelAccPerturb;
      
      InitialConditions.SolverType = KinSolOverDeterminate;
      Kinematics.SolverType = KinSolOverDeterminate;
   
      InitialConditions.KinematicTol = 1e-4; 
      Kinematics.KinematicTol = 1e-4;
    };

According to your environment, these tolerance values can be increased.

I attached the whole files as a zip file.

I hope this may help you.

Best regards,
Moonki

P.S) When you will ask another question in future, please make a zip file that includes the whole files of the folder. :slight_smile: