about erro iformation

hello, every, I have a problem when running the model based “GaitLowerExremity”:

I want to know what should to be done to avoid this erro? and what the problem lies in?

it pointed out like the following:

[LEFT][LEFT]Position analysis failed : 176 independent constraints and 180 unknowns [/LEFT]
[LEFT] - attempts to continue (attempt no. 1)[/LEFT]
[LEFT]Position analysis failed : 176 independent constraints and 180 unknowns [/LEFT]
[LEFT] - attempts to continue (attempt no. 2)[/LEFT]
[LEFT]Position analysis failed : 176 independent constraints and 180 unknowns [/LEFT]
[LEFT] - attempts to continue (attempt no. 3)[/LEFT]
[LEFT]Position analysis failed : 176 independent constraints and 180 unknowns [/LEFT]
[LEFT] - attempts to continue (attempt no. 4)[/LEFT]
[LEFT]Position analysis failed : 176 independent constraints and 180 unknowns [/LEFT]
[LEFT] - attempts to continue (attempt no. 5)[/LEFT]
[LEFT]Position analysis failed : 176 independent constraints and 180 unknowns [/LEFT]
[LEFT] - attempts to continue (attempt no. 6)[/LEFT]
[LEFT]Position analysis failed : 176 independent constraints and 180 unknowns [/LEFT]
[LEFT] - attempts to continue (attempt no. 7)[/LEFT]
[LEFT]Position analysis failed : 176 independent constraints and 180 unknowns [/LEFT]
[LEFT] - attempts to continue (attempt no. 8)[/LEFT]
[LEFT]Position analysis failed : 176 independent constraints and 180 unknowns [/LEFT]
[LEFT] - attempts to continue (attempt no. 9)[/LEFT]
[LEFT]Position analysis failed : 176 independent constraints and 180 unknowns [/LEFT]
[LEFT] - attempts to continue (attempt no. 10)[/LEFT]
[LEFT]Constraint no. #3 in ‘Main.Studies.KinematicStudyForParameterIdentification.HumanModel.BodyModel.Right.Leg.Jnt.PatellaFemur.Constraints’ above error tolerance 0.001000, error = 0.004484.[/LEFT]
[LEFT]Constraint no. #4 in ‘Main.Studies.KinematicStudyForParameterIdentification.HumanModel.BodyModel.Right.Leg.Jnt.PatellaFemur.Constraints’ above error tolerance 0.001000, error = 0.005148.[/LEFT]
[LEFT]ERROR(OBJ.MCH.KIN3) : D:/A…3/A…n/E…s/r…y/GaitLowerExtremity.main.any : KinematicStudyForParameterIdentification.InitialConditions : Kinematic analysis failed in time step 0[/LEFT][/LEFT]

Thank you for all your help~

Hi,

That means there are more degrees of fredom than drivers in the model. And as it is a marker driven model, it surely means that there are not enough markers.

Best regards, Sylvain.

thank you. but I just want to research on the lower extremity and I only have the trajectories of markers that starts from the pelvis and below. In this situation whether I can modify the AMMRV1.3 “GaitLowerExtremity” model to realize the movement and analysis I need?

Hi,

If you do not have markers on the upper body you will need to drive the PelvisThoraxRotation and the neck motion, Otherwise the model will not be able to solve the kinematics as you have seen.

Please simply drive the PelvisThoraxRotation measure you can find in the interface folder to zero for all three rotations and to the same for the neck joint.

This will make the upperbody stiff.

Best regards
Søren

Hi,

unfortunately I have the same problem and am not able to solve it like you described. I am also using the GaitLowerExtremity (AMMRV1.4) model. The problem is that I am not able to find the interface folder in the GaitLowerExtremity folder. And when looking for
“PelvisThoraxRotation” I get 6 hits in 3 files:
…AMMRV1.4\Application\MyModels\GaitLowerExtremity\JointAngleOutputs.any (2 hits)
Line 15: AnyVector PelvisThoraxRotation = …HumanModel.BodyModel.Interface.Trunk.PelvisThoraxRotation.Pos;
Line 15: AnyVector PelvisThoraxRotation = …HumanModel.BodyModel.Interface.Trunk.PelvisThoraxRotation.Pos;
…AMMRV1.4\Application\MyModels\GaitLowerExtremity\JointsAndDriversOptimized.any (2 hits)
Line 31: AnyKinMeasureOrg &PelvisThoraxRotation = …HumanModel.Interface.Trunk.PelvisThoraxRotation;
Line 31: AnyKinMeasureOrg &PelvisThoraxRotation = …HumanModel.Interface.Trunk.PelvisThoraxRotation;
…AMMRV1.4\Application\MyModels\GaitLowerExtremity\Mannequin.any (2 hits)
Line 26: AnyVar PelvisThoraxRotation=0;
Line 100: AnyVar PelvisThoraxRotation=0;
And I believe there is no driver to set zero.

I will be happy for any suggestion.

Best regards

Patrick

Hi Patrick,

You have to introduce the driver first. Try something like this. This is from an older model, but I hope it does the job:

In the main include a DriverTrunk.any under drivers:

  //Connection between environment and the human    
  AnyFolder ModelEnvironmentConnection = {
    AnyFolder Drivers={
      #include "DriverTrunk.any"
      // Aliases for convenient referencing
      AnyFolder &JntPos=..Mannequin.Posture;  
      AnyFolder &JntVel=..Mannequin.PostureVel;
    };
  };

Create this DriverTrunk.any new including following code:

//Additional drivers for Trunk
AnyKinRotational PelvisThoraxRotMeasure = {
AnyRefFrame &Pelvis = Main.Studies.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg;
AnyRefFrame &Thorax = Main.Studies.HumanModel.BodyModel.Trunk.SegmentsThorax.ThoraxSeg;
Type = RotVector;
AngVelOnOff = Off;
};

AnyKinMeasureOrg PelvisThoraxExtension = {
AnyKinMeasure &ref = .PelvisThoraxRotMeasure;
MeasureOrganizer = {2};
};

AnyKinMeasureOrg PelvisThoraxRotation = {
AnyKinMeasure &ref = .PelvisThoraxRotMeasure;
MeasureOrganizer = {1};
};

AnyKinMeasureOrg PelvisThoraxBend = {
AnyKinMeasure &ref = .PelvisThoraxRotMeasure;
MeasureOrganizer = {0};
};

AnyKinEqSimpleDriver PelvisThoraxDriver ={
AnyKinMeasureOrg &ref2 = .PelvisThoraxRotation;
DriverPos={ 0};
DriverVel={ 0};
};

depending on the amount of markers you are using there might be more additional drivers missing…

let me know if this works

Hi Amir,

thanks for the fast reply.

I did what you said and the model loads but still encounter the error that contraints are missing:
Position analysis failed : 270 independent constraints and 273 unknowns

I tried to lock the other DoF for the PelvisThoraxRotMeasure like this (in the DriverTrunk.any):

AnyKinEqSimpleDriver PelvisThoraxDriver ={
  AnyKinMeasureOrg &ref1 = .PelvisThoraxExtension ;
  AnyKinMeasureOrg &ref2 = .PelvisThoraxBend ;
  AnyKinMeasureOrg &ref3 = .PelvisThoraxRotMeasure;
  DriverPos={0,0,0};
  DriverVel={0,0,0};
};

which returs the following errors:
ERROR(SCR.PRS17) : Y:/AnyBody/A…4/A…n/M…s/G…t/DriverTrunk.any : ‘ref3’ : Reference of class AnyKinMeasureOrg cannot refer to an object of class AnyKinRotational
Evaluating constants…
Configuring model…
Evaluating model…
ERROR(OBJ.MCH.KIN8) : NULL : Incorrect number of elements in kinematic constraint specification : MISSING MESSAGE
Current specification is ‘’, required is ‘’. See object : Main.Studies.KinematicStudyForParameterIdentification.ModelEnvironmentConnection.Drivers.PelvisThoraxDriver.DriverPos : Y:\AnyBody\AMMRV1.4\Application\MyModels\GaitLowerExtremity_BGU-Pat\DriverTrunk.any(31)
Model loading skipped

Are the &ref-names important in this case?

Patrick,

one more thing before I look into your model. This is the DriverTrunk.any form another user. Please Have a look if this works:

//Additional drivers for Trunk

AnyKinRotational PelvisThoraxRotMeasure = {
AnyRefFrame &Pelvis = Main.Studies.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg;
AnyRefFrame &Thorax = Main.Studies.HumanModel.BodyModel.Trunk.SegmentsThorax.ThoraxSeg;
Type = RotVector;
AngVelOnOff = Off;
};

AnyKinMeasureOrg PelvisThoraxExtension = {
AnyKinMeasure &ref = .PelvisThoraxRotMeasure;
MeasureOrganizer = {2};
};

AnyKinMeasureOrg PelvisThoraxRotation = {
AnyKinMeasure &ref = .PelvisThoraxRotMeasure;
MeasureOrganizer = {1};
};

AnyKinMeasureOrg PelvisThoraxBend = {
AnyKinMeasure &ref = .PelvisThoraxRotMeasure;
MeasureOrganizer = {0};
};

// Aliases for convenient referencing
// AnyFolder &JntPos=…Mannequin.Posture;
// AnyFolder &JntVel=…Mannequin.PostureVel;

AnyKinEqSimpleDriver PelvisThoraxDriver ={
//AnyKinMeasureOrg &ref1= …HumanModel.Interface.Trunk.PelvisThoraxExtension;
//AnyKinMeasureOrg &ref3= …HumanModel.Interface.Trunk.PelvisThoraxRotation;
//AnyKinMeasureOrg &ref1 = .PelvisThoraxExtension;
AnyKinMeasureOrg &ref2 = .PelvisThoraxRotation;
// AnyKinMeasureOrg &ref3 = .PelvisThoraxBend;

//needed if PelvisThoraxExtension and PelvisThoraxBend is constrained

// DriverPos={-0.2,0,0};
// DriverVel={0,0,0};

DriverPos={ 0}; 
DriverVel={ 0};

};

AnySeg &Thoraxref = Main.Studies.HumanModel.BodyModel.Trunk.SegmentsThorax.ThoraxSeg;
Thoraxref = {
AnyRefNode RotNodes = {
ARel = RotMat(-0.5*pi,x)RotMat(-0.5pi,z);
};
};

//This is an etsimation of the upper body motion it will enforce that the head is kept above the pelvis medial/laterally
AnyKinEqSimpleDriver LaterDriver ={
AnyKinRotational lin ={
Type = RotAxesAngles;
Axis1 = z;
Axis2 = y;
Axis3 = x;

AnyRefFrame &ref1= …EnvironmentModel.GlobalRef;
AnyRefNode &ref2= Main.Studies.HumanModel.BodyModel.Trunk.SegmentsThorax.ThoraxSeg.RotNodes;
};
DriverPos={0,0};
DriverVel={0,0};
MeasureOrganizer={1,2};
CType ={Soft,Soft};
};

//FIX PELVIS TILT vvv
AnySeg &Pelvisref = Main.Studies.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg;
Pelvisref = {
AnyRefNode RotNodesPelvis = {
ARel = RotMat(-0.5*pi,x)RotMat(-0.5pi,z);
AnyDrawRefFrame drwse = {ScaleXYZ = {1,1,1}*0.6;};
};
};

AnyKinEqSimpleDriver NeckDrv={
AnyKinMeasureOrg &ref1= Main.Studies.HumanModel.BodyModel.Interface.Trunk.NeckJoint;
DriverPos={0};
DriverVel={0};
Reaction.Type={Off};
};

Like this it works (just 1 more constraint missing):


AnyKinEqSimpleDriver PelvisThoraxDriver1 ={
  AnyKinMeasureOrg &ref2 = .PelvisThoraxExtension ;
  DriverPos={ 0};
  DriverVel={ 0};
};

AnyKinEqSimpleDriver PelvisThoraxDriver2 ={
  AnyKinMeasureOrg &ref2 = .PelvisThoraxRotation ;
  DriverPos={ 0};
  DriverVel={ 0};
};

AnyKinEqSimpleDriver PelvisThoraxDriver3 ={
  AnyKinMeasureOrg &ref2 = .PelvisThoraxBend ;
  DriverPos={ 0};
  DriverVel={ 0};
};

Why is is not possible to use one driver for all measures like I tried before?

Hi Amir,

it seems you posted while I was writing my post.
I used the code you posted, actually just this part

AnyKinEqSimpleDriver NeckDrv={
  AnyKinMeasureOrg &ref1= Main.Studies.KinematicStudyForParameterIdentification.HumanModel.BodyModel.Trunk.JointsLumbar.C0C1Jnt;
  DriverPos={0};
  DriverVel={0};
  Reaction.Type={Off};
}; 

was enough to make the model run.

The model startes the first stride but then fails:
ERROR(OBJ.MCH.KIN3) : Y:/A…y/A…4/A…n/M…s/G…t/GaitLowerExtremity.main.any : MotionOptimization.InitialConditions : Kinematic analysis failed in time step 0

What can I do about this?

Hi Patrick,

I had a quick look and I think I saw what’s wrong.
Problem:
If you load the model and run only the initial position, you see that the initial guess of the markers leads to a wrong position of the foot. They seem very much bent outside and when the foot comes in contact with the forceplats, the model will fail.
Solution (hopefully):
Go into the ModelSetup and change the sRelOpt values of the Markers in the foot manually to get a better initial guess. Every Lab puts Markers little different on their subjects, the sRelOpt values used by default is from our lab, so you’ll have to find out what suits you best…

Hi Amir,

thanks again for your reply.
Is there a specific way how to do this? I look at the model and a try to move the red sphere so that they have the same position or get closer to the blue spheres. But most of the times an error occurs and the skeleton will not be moved to the starting position:
1.0.0) Operation Sequence: (Operation: Main.Studies.ParameterIdentification.Analysis):
1.0.0.0) Kinematics (Operation: Main.Studies.KinematicStudyForParameterIdentification.Kinematics):
1.0.0.0.0) PreOperation (Operation: Main.Studies.KinematicStudyForParameterIdentification.Kinematics.PreOperation):
1.0.0.0.0.0) InitialConditions (Operation: Main.Studies.KinematicStudyForParameterIdentification.InitialConditions):
1.0.0.0.0.0) …Design variables have been updated.
1.0.0.0.0.1) …Load-time positions have been re-established.
Failed to resolve kinematic constraints. Newton relaxation too small. (final kin. error = 9.118606E-004)
Constraint no. 85 above error tolerance 0.000100, error = 0.000164.
Constraint no. 89 above error tolerance 0.000100, error = 0.000184.
Constraint no. 105 above error tolerance 0.000100, error = 0.000289.
Constraint no. 107 above error tolerance 0.000100, error = 0.000127.
Constraint no. 108 above error tolerance 0.000100, error = 0.000227.
Constraint no. 109 above error tolerance 0.000100, error = 0.000247.
Constraint no. 110 above error tolerance 0.000100, error = 0.000180.
Constraint no. 111 above error tolerance 0.000100, error = 0.000108.
Constraint no. 112 above error tolerance 0.000100, error = 0.000265.
Constraint no. 113 above error tolerance 0.000100, error = 0.000912.
Constraint no. 114 above error tolerance 0.000100, error = 0.000492.
Constraint no. 115 above error tolerance 0.000100, error = 0.000109.
Constraint no. 116 above error tolerance 0.000100, error = 0.000247.
Constraint no. 117 above error tolerance 0.000100, error = 0.000341.
Constraint no. 118 above error tolerance 0.000100, error = 0.000757.
ERROR(OBJ.MCH.KIN3) : Y:/A…y/A…4/A…n/M…s/G…t/GaitLowerExtremity.main.any : KinematicStudyForParameterIdentification.InitialConditions : Kinematic analysis failed in time step 0

A question even more important:
Are there any parameters I could measure in future gait analyses to get the values I need to enter here?

I’m not sure If I get you right, but they don’t have to match. If they match, then it would be the same setting as ours. You have to introduce an offset in the ModelSetup to get the correct Foot position.

Is that explained clear?

Yeah, that’s clear. But I thought there my be a way to do it systematically.

Hi there,

I’m also trying to control the GaitLowerExtremity model by using only lowerlimb markers. I’m missing al the markers above the pelvis.
I’m trying to add the driver for the PelvisThoraxRotation and the neck motion according to the script you provided.
When i try to load the model, i get the following error:

Loading Main : “C:\Users\i6028134\AppData\Roaming\AnyBody Technology\AnyBody.5.x.x\AMMRV1.4\Application\MyModels\GaitLowerExtremity\GaitLowerExtremity.main.any”
Scanning…
Parsing…
Constructing model tree…
ERROR(SCR.PRS9) : C:/U…s/i…4/A…a/R…g/A…y/A…x/A…4/A…n/M…s/G…y/DriverTrunk.any : ‘PelvisSeg’ : Unresolved object
Model loading skipped

I did what John sugested (in this post: http://forum.anyscript.org/showthread.php?t=2698) without any succes.

Hope you can help me with this.

Regards,
Roberto

Try to include the attached file under

AnyBodyStudy KinematicStudyForParameterIdentification = {
 ...
      AnyFolder ModelEnvironmentConnection = {
        AnyFolder Drivers={
          #include "DriverTrunk.any"
 ...

Maybe that already solves your problem.

For your specific problem, it would be helpful if you could upload you model.

Thanks for your answer! The location within the code was right, but the path i declared was giving the problems.

Anyway thank you very much!