Shoulder Flexion with Bergmann Model

Hello there,

I want the Bergmann Model to do a shoulder flexion(lift the arm up in front) than the abduction movement.

So I changed the following things:

[COLOR=#0000ff][COLOR=#0000ff][COLOR=#0000ff][COLOR=#0000ff]AnyFolder PostureVel={
[/COLOR]AnyVar GlenohumeralFlexion = [SIZE=2][COLOR=Red]45/Main.Study.tEnd; [/COLOR]
AnyVar GlenohumeralAbduction [COLOR=Red]= 0;[/COLOR]
AnyVar GlenohumeralExternalRotation = 0;
}

AnyFolder Drivers = {
//Abduction movement similar to Bergmann’s experiment.
AnyKinEqFourierDriver [COLOR=Red]FlexionDriverRight={[/COLOR]
AnyKinMeasureOrg &ref1 =…HumanModel.Interface.Right.Glenohumeral[COLOR=Red]Flexion;[/COLOR]
Type = Sin;
Freq = 0.0625; // 0.1;
A = { {0.0, 45*pi/180} };
B = { {0.0, 0.0 } };
Reaction.Type = {Off};

};

AnyBodyStudy Study = {
AnyFolder &Model = .Model;
// Output variables collecting the GH forces in the pertinent coordinate frame
AnyVec3 GHReactionInHumerus = -(Model.HumanModel.Right.ShoulderArm.Seg.Humerus.gh.Bergmann.Axes’
*Model.HumanModel.Right.ShoulderArm.Jnt.GHReactions.ResultanForce.FTotalGlobal’)’;
InverseDynamics.Criterion.Type=MR_Quadratic;
AnyKinMeasureLinComb ShoulderAbduction_Right_InDegree = {
AnyKinMeasure& ref = Main.HumanModel.BodyModel.Interface.Right.Glenohumeral[COLOR=Red]Flexion ;[/COLOR]
Coef = {{180/pi}};
OutDim = 1;
};
[/COLOR][/COLOR][/COLOR][/SIZE]

The Model loads without any ERRORS, but at the beginning of the Inverse Dynamics:

ERROR(OBJ.MCH.KIN3): Study.InverseDynamics: Kinematic analysis failed in step1

Where the ERROR?
Do I need to change something in this part?:

[COLOR=#0000ff][COLOR=#007f00][COLOR=#007f00] // Keep the hand in the frontal plane
AnyKinEq HandConstraint = {
AnyKinLinear lin = {
AnyRefFrame &GHnode = Main.Model.HumanModel.Right.ShoulderArm.Seg.Scapula.gh;
AnyRefFrame &Hand = Main.Model.HumanModel.Right.ShoulderArm.Seg.Hand;
Ref = 0;
};
Reaction.Type = {Off};
MeasureOrganizer = {2};
};
[/COLOR][/COLOR][/COLOR]

cheers Marc

Dear Marc,

If you can upload your model in the debug section, then we may be able to have a look at it.
http://forum.anyscript.org/forumdisplay.php?f=21

Best regards,
Moonki