Hi, I need urgent your help to move my model. Taking as reference
the standing model, I have modified the initial position with a
bending of the knees. I have succeeded, through the interpolDriver
to complete a light extension of the knees, however I don’t
succeed, also, to insert in the interpolation hip and trunk.
Following I attach the used procedure… can You find me the
error?
In the dialogue box it appears an error which says that:
Study: Kinematic analysis failed in time step 0.
The complete study of my model is:
AnyBodyStudy Study = {
AnyFolder & Model =. Model;
RecruitmentSolver = MinMaxNRSimplex;
tEnd = 0.2;
Gravity = {0.0, -9.81, 0.0};
nStep = 20;
MuscleEliminationTol = 1e-7;
RecruitmentLpPenalty = 1.0e-2;
RecruitmentQpPenalty = 1.0e-5;
}; / / End of study
The “JointsAndDrivers.any” is:
AnyFolder Drivers = {
// Aliases for convenient referencing
AnyFolder &JntPos=…Mannequin.Posture;
AnyFolder &Thorax = …HumanModel.Trunk.SegmentsThorax.ThoraxSeg;
AnyFolder &LegR = …HumanModel.Right.Leg;
AnyFolder &LegL = …HumanModel.Left.Leg;
// Place the right toe and heel on the ground
AnyKinEq RToeGroundConstraint ={
AnyKinLinear ToePos = {
AnyFixedRefFrame &Ground =
Main.Model.EnvironmentModel.GlobalRef;
AnyRefNode &Ball =
Main.Model.HumanModel.Right.Leg.Seg.Foot.ToeJoint;
};
MeasureOrganizer = {1}; // Only the y coordinate
};
AnyKinEqSimpleDriver RHeelGroundConstraint ={
AnyKinLinear HeelPos = {
AnyFixedRefFrame &Ground =
Main.Model.EnvironmentModel.GlobalRef;
AnyRefNode &Ball =
Main.Model.HumanModel.Right.Leg.Seg.Foot.HeelJoint;
};
MeasureOrganizer = {1}; // Only the y coordinate
DriverPos = {0.0};
// DriverVel = {0};
DriverVel = {.JntPos.Right.HeelHeight/Main.Study.tEnd};
Reaction.Type = {1}; // Provide ground reaction forces
};
// Place the left toe and heel on the ground
AnyKinEq LToeGroundConstraint ={
AnyKinLinear ToePos = {
AnyFixedRefFrame &Ground =
Main.Model.EnvironmentModel.GlobalRef;
AnyRefNode &Ball =
Main.Model.HumanModel.Left.Leg.Seg.Foot.ToeJoint;
};
MeasureOrganizer = {1}; // Only the y coordinate
};
AnyKinEqSimpleDriver LHeelGroundConstraint ={
AnyKinLinear HeelPos = {
AnyFixedRefFrame &Ground =
Main.Model.EnvironmentModel.GlobalRef;
AnyRefNode &Ball =
Main.Model.HumanModel.Left.Leg.Seg.Foot.HeelJoint;
};
MeasureOrganizer = {1}; // Only the y coordinate
DriverPos = {0.0};
// DriverVel = {0};
DriverVel = {.JntPos.Left.HeelHeight/Main.Study.tEnd};
Reaction.Type = {1}; // Provide ground reaction
};
// Position the Ankles right above the z axis
AnyKinEqSimpleDriver RAnkleX = {
AnyKinLinear AnklePos = {
AnyFixedRefFrame &Ground =
Main.Model.EnvironmentModel.GlobalRef;
AnyRefNode &Ankle = …LegR.Seg.Foot.AnkleJoint;
};
MeasureOrganizer = {0}; // Only the x coordinate
DriverPos = {0.0};
DriverVel = {0.0};
Reaction.Type = {0};
};
/*
// This measure a driver for the ankle abduction adduction
AnyKinEqSimpleDriver RAnkleDrv = {
AnyJoint &ref = .LegR.Jnt.Ankle;
MeasureOrganizer={1};
DriverPos={0};
DriverVel={0};
Reaction.Type={0};
};
*/
/* AnyFolder LAnkleX= {
AnyVector Time = { 0.04, 0.12, 0.24, 0.32, 0.40};
AnyKinEqInterPolDriver AnkleJointDriver = {
//AnyRevoluteJoint &T12L1Joint =
Main.HumanModel.Trunk.JointsLumbar.NeckJnt;
AnyRevoluteJoint &AnkleJoint =
Main.HumanModel.Left.Leg.Jnt.Ankle;
//AnyKinLinear AnklePos = {
//AnyFixedRefFrame &Ground =
Main.Model.EnvironmentModel.GlobalRef;
//AnyRefNode &Ankle = …LegL.Seg.Foot.AnkleJoint;
//};
T = .Time;
Type = Bspline;
Data = {{80.00,
100.00,
120.00,
140.00,
150.00
}} * pi/180;
Reaction.Type = {0.0};
};// chiude AnyKinEqInterPolDriver
}; // chiude il folder*/
AnyKinEqSimpleDriver LAnkleX ={
AnyKinLinear AnklePos = {
AnyFixedRefFrame &Ground =
Main.Model.EnvironmentModel.GlobalRef;
AnyRefNode &Ankle = …LegL.Seg.Foot.AnkleJoint;
};
MeasureOrganizer = {0}; // Only the x coordinate
DriverPos = {0.0};
DriverVel = {0.0};
Reaction.Type = {0};
};
// This measure a driver for the ankle abduction adduction
/* AnyFolder LAnkleDriver= {
//AnyKinEqSimpleDriver LAnkleDrv = {
AnyVector Time = { 0,0.04,0.08,0,12};
AnyKinEqInterPolDriver AnkleJointDriverL = {
AnyJoint &ref = Main.Model.HumanModel.Left.Leg.Jnt.Ankle;
MeasureOrganizer={0};
//AnyRevoluteJoint &AnkleJoint =
Main.Model.HumanModel.Left.Leg.Jnt.Ankle;
T = .Time;
Type = Bspline;
Data = {{80.00,85.00,
100.00,110.00,
120,130,
140,150}
} * pi/180;
Reaction.Type = {0.0};
};// chiude AnyKinEqInterPolDriver
}; // chiude il folder*/
/AnyJoint &ref = .LegL.Jnt.Ankle;
MeasureOrganizer={1};
DriverPos={0};
DriverVel={0};
Reaction.Type={0};
};/
//Constraint the collective CoM to be right above the GlobalRef
AnyKinEqSimpleDriver CoMDriver = {
AnyKinCoM CoM = {
AnyFolder &Body = Main.Model.HumanModel;
};
MeasureOrganizer = {0,2}; // Only the x and z directions
DriverPos = {0,0};
DriverVel = {0.1,0};
Reaction.Type = {0,0};
};
AnyFolder &RefHM = Main.Model.HumanModel;
AnyKinEqSimpleDriver SpineRhythmDrv = {
AnyKinMeasureLinComb Measure = {
AnyJoint &u1 = ..RefHM.Trunk.JointsLumbar.SacrumPelvisJnt;
AnyJoint &u2 = ..RefHM.Trunk.JointsLumbar.L5SacrumJnt;
AnyJoint &u3 = ..RefHM.Trunk.JointsLumbar.L4L5Jnt;
AnyJoint &u4 = ..RefHM.Trunk.JointsLumbar.L3L4Jnt;
AnyJoint &u5 = ..RefHM.Trunk.JointsLumbar.L2L3Jnt;
AnyJoint &u6 = ..RefHM.Trunk.JointsLumbar.L1L2Jnt;
AnyJoint &u7 = ..RefHM.Trunk.JointsLumbar.T12L1Jnt;
#include "..\..\..\BRep\Aalborg\Spine\SRMatrixes.any"
}; // Measure
DriverPos = {0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0};
DriverVel = {0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0};
Reaction.Type = {0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0};
}; // SpineRhythmDrv
AnyKinRotational PelvisThoraxRotMeasure = {
AnyRefFrame &Pelvis = .RefHM.Trunk.SegmentsLumbar.PelvisSeg;
AnyRefFrame &Thorax = .RefHM.Trunk.SegmentsThorax.ThoraxSeg;
Type = RotVector;
AngVelOnOff = On;
};
AnyFolder &ref=Main.Model.HumanModel.Trunk;
AnyReacForce L5SacrumJntReaction= {
AnySphericalJoint &PelvisL5Joint
= .ref.JointsLumbar.SacrumPelvisJnt;
};
AnyReacForce T12L1JntReaction = {
AnySphericalJoint &T12L1Joint = .ref.JointsLumbar.T12L1Jnt;
};
AnyFolder NeckDriver = {
AnyVector Time2 = { 0,0.06, 0.16, 0.28, 0.38, 0.4};
AnyKinEqInterPolDriver NeckJntDriver = {
AnyRevoluteJoint &T12L1Joint =
Main.Model.HumanModel.Trunk.JointsLumbar.NeckJnt;
T = .Time2;
Type = Bspline;
Data = {{30.00,
40.00,
50.00,
60.00,
70.00,
80
}} * pi/180;
// Reaction.Type = {0.0};
};// chiude AnyKinEqInterPolDriver
}; // chiude il folder
/* DriverPos = {0};
DriverVel = {0};
Reaction.Type = {1};
};*/
AnyKinMeasureOrg Posture = {
AnyKinRotational &Ref = .PelvisThoraxRotMeasure;
};
AnyKinEqSimpleDriver PostureDriver ={
AnyKinMeasureOrg &AllDofs = .Posture;
DriverPos = pi/180*{
.JntPos.PelvisThoraxLateralBending,
.JntPos.PelvisThoraxRotation,
.JntPos.PelvisThoraxFlexionExtension
};
// This is static posture, so all velocities are zero.
DriverVel = pi/180*{
0.0,
0.0,
0.0
};
Reaction.Type = {
0.0,
0.0,
0.0
};
};
//This joint is not used in the mannequin as the is set to a
default pos.
AnyKinEqSimpleDriver SCDriverRight ={
AnyKinRotational &SC
= …HumanModel.Right.ShoulderArm.Jnt.SCRot;
DriverPos = {-0.56, 0.128228, -0.250000};
DriverVel = {-0.0,-0.0,-0.0};
Reaction.Type={0,0,0};
};
// This joint is set to a default position and cannot be
controlled from
// the mannequin.
AnyKinEqSimpleDriver WristDriverRight ={
AnyKinMeasureOrg &Wrist
=…HumanModel.Right.ShoulderArm.Jnt.WristJoint;
DriverPos = {0,0};
DriverVel = {0,0};
Reaction.Type={1,1};
};
// This joint is set to a default position and cannot be
controlled from
// the mannequin.
AnyKinEqSimpleDriver SCDriverLeft ={
AnyKinRotational &SC
= …HumanModel.Left.ShoulderArm.Jnt.SCRot;
// DriverPos = {0.284040, -0.019744, 0.282412};
DriverPos = {0.56, -0.128228, 0.250000};
DriverVel = {-0.0,-0.0,-0.0};
Reaction.Type={0,0,0};
};
// This joint is set to a default position and cannot be
controlled from
// the mannequin.
AnyKinEqSimpleDriver WristDriveLeft ={
AnyKinMeasureOrg &Wrist
= …HumanModel.Left.ShoulderArm.Jnt.WristJoint;
DriverPos = {0,0};
DriverVel = {0,0};
Reaction.Type={1,1};
};
AnyKinRotational GHRotR = {
AnyRefNode &scapula_gh
= …HumanModel.Trunk.SegmentsThorax.ThoraxSeg.ij;
AnyRefNode &humerus_gh
= …HumanModel.Right.ShoulderArm.Seg.Humerus.gh;
Type = RotAxesAngles;
Axis1 = z;
Axis2 = x;
Axis3 = y;
};
AnyKinRotational GHRotL = {
AnyRefNode &scapula_gh
= …HumanModel.Trunk.SegmentsThorax.ThoraxSeg.ij;
AnyRefNode &humerus_gh
= …HumanModel.Left.ShoulderArm.Seg.Humerus.gh;
Type = RotAxesAngles;
Axis1 = z;
Axis2 = x;
Axis3 = y;
};
// This kinematic measure compiles all the degrees of freedom
controlled by the
// manikin.
AnyKinMeasureOrg Right = {
// Leg movements
AnySphericalJoint &Hip = .LegR.Jnt.Hip;
// AnyRevoluteJoint &Knee = .LegR.Jnt.Knee;
AnyUniversalJoint &Ankle = .LegR.Jnt.Ankle;
// Arm movements
//AnyKinRotational &GH
= …HumanModel.Right.ShoulderArm.Jnt.GHRot;
AnyKinRotational &GH = .GHRotR;
AnyRevoluteJoint &Elbow =...HumanModel.Right.ShoulderArm.Jnt.FE;
// Forearm pronation/supination
AnyKinMeasureOrg &ForearmPronat
= …HumanModel.Right.ShoulderArm.Jnt.PS;
MeasureOrganizer={0,1,4,5,7,8,9};
};
AnyKinEqSimpleDriver DriverRight ={
AnyKinMeasureOrg &AllDofs = .Right;
DriverPos = pi/180*{
// -.JntPos.Right.HipFlexionExtension,
.JntPos.Right.HipAbductionAdduction,
.JntPos.Right.HipInternalExternalRotation,
//.JntPos.Right.KneeFlexionExtension,
//.JntPos.Right.KneeAbductionAdduction,
//.JntPos.Right.KneeRotation,
//.JntPos.Right.AnkleDorsiFlexionPlantarFlexion,
//.JntPos.Right.AnkleInternalExternalRotation,
.JntPos.Right.AnkleInversionAnteriorRotation,
.JntPos.Right.GlenohumeralAbductionAdduction, //GH joint
//.JntPos.Right.GlenohumeralFlexionExtension, //GH joint
-.JntPos.Right.GlenohumeralRotation, //GH joint
.JntPos.Right.ElbowFlexionExtension,
//.JntPos.Right.ElbowAbductionAdduction, //not in use
.JntPos.Right.ElbowPronationSupination//not in use
};
// This is static posture, so all velocities are zero.
DriverVel = pi/180*{
// 0.0,
0.0,
0.0,
//0.0,
//10.0,
0.0,
0.0,//abbduction aaduction
//0.0,//flex extension
0.0,//glenohumeral rot
0.0,//fe
0 //ps
};
Reaction.Type = {
// 0.0,
0.0,
0.0,
// 0.0,
//0.0,
0.0,
0.0,
//0.0,
0.0,
0.0,
0.0
};
};
// This kinematic measure compiles all the degrees of freedom
controlled by the
// manikin.
AnyKinMeasureOrg Left = {
// Leg movements
AnySphericalJoint &Hip = .LegL.Jnt.Hip;
//AnyRevoluteJoint &Knee = .LegL.Jnt.Knee;
AnyUniversalJoint &Ankle = .LegL.Jnt.Ankle;
// Arm movements
//AnyKinRotational &GH
= …HumanModel.Left.ShoulderArm.Jnt.GHRot;
AnyKinRotational &GH = .GHRotL;
AnyRevoluteJoint &Elbow = ...HumanModel.Left.ShoulderArm.Jnt.FE;
// Forearm pronation/supination
AnyKinMeasureOrg &ForearmPronat
= …HumanModel.Left.ShoulderArm.Jnt.PS;
// MeasureOrganizer={2,0,1,3,5,6,7,8,9};
MeasureOrganizer={0,1,4,5,7,8,9};
};
AnyKinEqSimpleDriver DriverLeft ={
AnyKinMeasureOrg &AllDofs = .Left;
DriverPos = pi/180*{
// -.JntPos.Left.HipFlexionExtension,
-.JntPos.Left.HipAbductionAdduction,
-.JntPos.Left.HipInternalExternalRotation,
//.JntPos.Left.KneeFlexionExtension,
//.JntPos.Left.KneeAbductionAdduction,
//.JntPos.Left.KneeRotation,
//.JntPos.Left.AnkleDorsiFlexionPlantarFlexion,
//.JntPos.Left.AnkleInternalExternalRotation,
.JntPos.Left.AnkleInversionAnteriorRotation,
.JntPos.Left.GlenohumeralAbductionAdduction, //GH joint
//-.JntPos.Left.GlenohumeralFlexionExtension, //GH joint
-.JntPos.Left.GlenohumeralRotation, //GH joint
180-.JntPos.Left.ElbowFlexionExtension,
//.Jnt.Left.ElbowAbductionAdduction, //not in use
180-.JntPos.Left.ElbowPronationSupination
};
// This is static posture, so all velocities are zero.
DriverVel = pi/180*{
// 0.0,
0.0,
0.0,
//10.0,
//0.0,
0.0,
0.0,
//0.0,
0.0,
0.0,
0.0
};
Reaction.Type = {
// 0.0,
0.0,
0.0,
//0.0,
//0.0,
0.0,
0.0,
//0.0,
0.0,
0.0,
0.0
};
};
AnyKinMeasureOrg Attivi={
AnyRevoluteJoint &KneeL = .LegL.Jnt.Knee;
AnyRevoluteJoint &KneeR = .LegR.Jnt.Knee;
AnyKinRotational &GHL = .GHRotL;
AnyKinRotational &GHR = .GHRotR;
//AnySphericalJoint &HipL = .LegL.Jnt.Hip;
//AnySphericalJoint &HipR = .LegR.Jnt.Hip;
MeasureOrganizer={0,1,3,6};
//MeasureOrganizer={0,1,3,6,8,9};
};
// AnyVector Time = { 0, 0.04, 0.12, 0.24, 0.32, 0.40};
AnyVector Time = { 0, 0.1, 0.2, 0.3, 0.4, 0.5 };
AnyKinEqInterPolDriver KneeDriver ={
AnyKinMeasureOrg &AllDofs = .Attivi;
//
T = .Time;
Type = Bspline;
Data = {{90.00,
80.00,
70.00,
60.00,
50.00,
30
},
{90.00,
80.00,
70.00,
60.00,
50.00,
30
},
-{50.00,
60.00,
70.00,
80.00,
90.00,
100
},
-{50.00,
60.00,
70.00,
80.00,
90.00,
100
}
} * pi/180* (-1);
// Reaction.Type = {0.0};
};// chiude AnyKinEqInterPolDriver
AnyKinMeasureOrg Anca={
AnySphericalJoint &HipL = .LegL.Jnt.Hip;
AnySphericalJoint &HipR = .LegR.Jnt.Hip;
MeasureOrganizer={0,1};
};
AnyVector Time1 = { 0, 0.1, 0.2, 0.3, 0.4, 0.5 };
AnyKinEqInterPolDriver AncaDriver ={
AnyKinMeasureOrg &AllDofs = .Anca;
//
T = .Time1;
Type = Bspline;
Data = {{60,
66,
72,
78,
84,
90},
{60,
66,
72,
78,
84,
90}
} * pi/180;
/* Data = {{60.00,
66,
72,
78,
84,
90},
{60.00,
66,
72,
78,
84,
90}
} * pi/180;*/
};// chiude AnyKinEqInterPolDriver
/*AnyKinMeasureOrg Anca={
AnySphericalJoint &HipL = .LegL.Jnt.Hip;
AnySphericalJoint &HipR = .LegR.Jnt.Hip;
MeasureOrganizer={0,1};
};
AnyVector Time1 = { 0,0.08, 0.16, 0.28, 0.34, 0.40};
AnyKinEqInterPolDriver AncaDriver ={
AnyKinMeasureOrg &AllDofs = .Anca;
//
T = .Time;
Type = Bspline;
Data = {{30.00,
40.00,
60.00,
70.00,
90.00,
120
},
{30.00,
40.00,
60.00,
70.00,
90.00,
120
}
} * pi/180;
// Reaction.Type = {0.0};
};// chiude AnyKinEqInterPolDriver */
// Create reaction forces below the feet. Thi provides reactions
// for the feet regardless of their positions.
AnyKinMeasureOrg RightFoot = {
AnyKinLinear RightFootLinMeasure = {
AnySeg &ref1=…LegR.Seg.Foot;
AnyFixedRefFrame &ref2 = …EnvironmentModel.GlobalRef;
};
MeasureOrganizer = {0,2};
};
AnyReacForce RightFootReaction = {
AnyKinMeasureOrg &ref1= .RightFoot;
// AnyKinRotational &ref2=.RightFootRotMeasure;
};
AnyKinMeasureOrg LeftFoot = {
AnyKinLinear LeftFootLinMeasure = {
AnySeg &ref1=…LegL.Seg.Foot;
AnyFixedRefFrame &ref2 = …EnvironmentModel.GlobalRef;
};
MeasureOrganizer = {0,2};
};
AnyKinRotational LeftFootRotMeasure = {
AnySeg &ref1=.LegL.Seg.Foot;
AnyFixedRefFrame &ref2 = …EnvironmentModel.GlobalRef;
Type = RotVector;
AngVelOnOff = On;
};
AnyReacForce LeftFootReaction = {
AnyKinMeasureOrg &ref1= .LeftFoot;
};
};//Drivers
// ---------------------------------
// Loads from the Mannequin.any file
// ---------------------------------
AnyFolder MannequinLoads = {
AnyFolder &hm = Main.Model.HumanModel; // For easy reference
AnyFolder &mql = Main.Model.Mannequin.Load;
AnyForce3D TopVertebra = {
AnyRefNode &ApplPoint
= .hm.Trunk.SegmentsThorax.ThoraxSeg.C1HatNode;
F = .mql.TopVertebra;
};
AnyFolder Right = {
AnyFolder &rhm = .hm.Right;
AnyFolder &locmql = .mql.Right;
AnyForce3D Shoulder = {
AnyRefNode &ApplPoint = .rhm.ShoulderArm.Seg.Humerus.gh;
F = .locmql.Shoulder;
};
AnyForce3D Elbow = {
AnyRefNode &ApplPoint = .rhm.ShoulderArm.Seg.Humerus.fe;
F = .locmql.Elbow;
};
AnyForce3D Hand = {
AnyRefNode &ApplPoint = .rhm.ShoulderArm.Seg.Hand.PalmJoint;
// F = .locmql.Hand*t;
F = .locmql.Hand;
};
AnyForce3D Hip = {
AnyRefNode &ApplPoint = .rhm.Leg.Seg.Thigh.HipJoint;
F = .locmql.Hip;
};
AnyForce3D Knee = {
AnyRefNode &ApplPoint = .rhm.Leg.Seg.Thigh.KneeJoint;
F = .locmql.Knee;
};
AnyForce3D Ankle = {
AnyRefNode &ApplPoint = .rhm.Leg.Seg.Foot.AnkleJoint;
F = .locmql.Ankle;
};
}; // Right
AnyFolder Left = {
AnyFolder &lhm = .hm.Left;
AnyFolder &locmql = .mql.Left;
AnyForce3D Shoulder = {
AnyRefNode &ApplPoint = .lhm.ShoulderArm.Seg.Humerus.gh;
F = .locmql.Shoulder;
};
AnyForce3D Elbow = {
AnyRefNode &ApplPoint = .lhm.ShoulderArm.Seg.Humerus.fe;
F = .locmql.Elbow;
};
AnyForce3D Hand = {
AnyRefNode &ApplPoint = .lhm.ShoulderArm.Seg.Hand.PalmJoint;
// F = .locmql.Hand*t;
F = .locmql.Hand;
};
AnyForce3D Hip = {
AnyRefNode &ApplPoint = .lhm.Leg.Seg.Thigh.HipJoint;
F = .locmql.Hip;
};
AnyForce3D Knee = {
AnyRefNode &ApplPoint = .lhm.Leg.Seg.Thigh.KneeJoint;
F = .locmql.Knee;
};
AnyForce3D Ankle = {
AnyRefNode &ApplPoint = .lhm.Leg.Seg.Foot.AnkleJoint;
F = .locmql.Ankle;
};
}; // Left
};
Thanks
Raffaella