model drivers

Hi,
I send you the whole file of the drivers of my model so you have the
possibility to understand my errors:

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
};

// INSERISCO UN’INTERPOLAZIONE PER IL TALLONE:

/* AnyFolder HeelDriver ={
AnyVector Time1 = { 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.56, 0.62, 0.67,
0.72, 0.77, 0.82, 0.95, 0.98, 1.0, 1.1, 1.17 };
AnyKinEqInterPolDriver HeelJointDriver = {
AnyKinLinear HeelPos = {
AnyRefNode &BallL =
Main.Model.HumanModel.Left.Leg.Seg.Foot.HeelJoint;
AnyRefNode &BallR =
Main.Model.HumanModel.Right.Leg.Seg.Foot.HeelJoint;
};
MeasureOrganizer={0,1};
T = .Time1;
Type = Bspline;
Data = {{0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0

     },
     {0,
       0,
       0,
       0,
       0,
       0,
       0,
       0,
       0,
       0,
       0,
       0,
       0,
       0,
       0,
       0,
        0

    } } * pi/180 ;

   Reaction.Type = {0,0};

   };// chiude AnyKinEqInterPolDriver

  }; // chiude il folder */

AnyKinEqInterPolDriver 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
AnyVector Time1 = { 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.56, 0.62,
0.67, 0.72, 0.77, 0.82, 0.95, 0.98, 1.0, 1.1, 1.17 };

T = .Time1;
Type = Bspline;
Data = {
{0, 0, 0,0, 0, 0, 0, 0, 0.1, 0.1, 0.1,
0.1,0,0,0,0, 0}
};

Reaction.Type = {1}; // Provide ground reaction forces
};

AnyKinEqInterPolDriver 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
AnyVector Time1 = { 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.56, 0.62,
0.67, 0.72, 0.77, 0.82, 0.95, 0.98, 1.0, 1.1, 1.17
};

T = .Time1;
Type = Bspline;

Data = {
{0, 0, 0,0, 0, 0, 0, 0, 0.1, 0.1, 0.1,
0.1,0,0,0,0, 0}
};

Reaction.Type = {1}; // Provide ground reaction forces
};

/* 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.1, 0.2, 0.3, 0.4, 0.5, 0.56, 0.62, 0.67,
0.72, 0.77, 0.82, 0.95, 0.98, 1.0, 1.1, 1.17 };
AnyKinEqInterPolDriver AnkleJointDriver = {

AnyJoint &ref1 = Main.Model.HumanModel.Left.Leg.Jnt.Ankle;
AnyJoint &ref2 = Main.Model.HumanModel.Right.Leg.Jnt.Ankle;
MeasureOrganizer={0,2};

//AnyRevoluteJoint &AnkleJoint =
Main.Model.HumanModel.Left.Leg.Jnt.Ankle;

T = .Time;
Type = Bspline;
Data = {{110, //140,
106, //136,
102, //132,
98, //128,
94, //124,
90, //120,
100, //130,
140,
135,
130,
125,
120,
122,
125,
135,
140,
150

     },
     {  110,  //140,
             106,     //136,
             102,       //132,
              98,         //128,
              94,    //124,
              90,     //120,
              100,        //130,
       140,
       135,
       130,
       125,
       120,
       122,
       125,
       135,
       140,
       150

    } } * pi/180 ;

   Reaction.Type = {0.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 z directions.
DriverPos = {0,0};
DriverVel = {0,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 = pi/180 *{0,0,10, 0,0,15, 0,0,15, 0,0,15, 0,0,15,

0,0,30};
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.1, 0.2, 0.3, 0.4, 0.5, 0.56, 0.62, 0.67,
0.72, 0.77, 0.82, 0.95, 0.98, 1.0, 1.1, 1.17 };
AnyKinEqInterPolDriver NeckJntDriver = {
AnyRevoluteJoint &T12L1Joint =
Main.Model.HumanModel.Trunk.JointsLumbar.NeckJnt;
T = .Time2;
Type = Bspline;
Data = {{50.00,
55.00,
60.00,
62.00,
63.00,
70,
71,
72,
73,
74,
75,
76,
77,
63,
62,
55,
50
}} * 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;

 //AnyRefFrame &GlenoHumR= Main.Model.EnvironmentModel.GlobalRef;

 Type = RotVector;
  AngVelOnOff = On;

scapula_gh={
AnyDrawRefFrame drawcoorR={
RGB={0,0,1}; //draw a blue coordinate system
};

};

humerus_gh={
AnyDrawRefFrame drawcoorR={
RGB={0,1,0}; //draw a green coordinate system
};

};

};

  /*  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;

 //AnyRefFrame &GlenoHumL= Main.Model.EnvironmentModel.GlobalRef;

 Type = RotVector;
 AngVelOnOff = On;



   scapula_gh={

AnyDrawRefFrame drawcoorL={
RGB={0,0,1}; //draw a blue coordinate system
};

};

humerus_gh={
AnyDrawRefFrame drawcoorL={
RGB={0,1,0}; //draw a green coordinate system
};

};

};

 /*  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,6};

};

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,6};
MeasureOrganizer={0,1,4,5,6};
};

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={

// INTERPOLAZIONE PRIMA FASE: DALLO STACCO AL TERMINE DELLA PRIMA
TIRATA

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,2,3,4,5,6,7};
//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, 0.56, 0.62,

0.67, 0.72, 0.77, 0.82, 0.95, 0.98, 1.0, 1.1, 1.17 };
AnyKinEqInterPolDriver KneeDriver ={
AnyKinMeasureOrg &AllDofs = .Attivi;
//
T = .Time;
Type = Bspline;

   // GLI ANGOLI PER LE GINOCCHIA VANNO DALLA POSIZIONE INIZIALE

90 GRADI A 150 GRADI AL TERMINE DELLA PRIMA TIRATA.
// angoli prof (MAtchad)…sequenza z,y,x per la spalla:

   /* Data = {{90.00,
       80.00,
       70.00,
       60.00,
       50.00,
       30
       },
      {90.00,
       80.00,
       70.00,
       60.00,
       50.00,
       30
       },
       {0.00,
       7.00,
       14.00,
       21.00,
       21.00,
       21.00
       },
       {0.00,
       19.00,
       38.00,
       57.00,
       57.00,
       57
       },
        {40.00,
       -39.00,
       -38.00,
       -36.00,
       -36.00,
       -36
       },
       {0.00,
       7.00,
       14.00,
       21.00,
       21.00,
       21.00
       },
       {0.00,
       19.00,
       38.00,
       57.00,
       57.00,
       57
       },
        -{40.00,
       -39.00,
       -38.00,
       -36.00,
       -36.00,
       -36
       }

     } *  pi/180* (-1); */


     // VA FORSE BENE:


      Data = {{120.00,
       110.00,
       100.00,
       90.00,
       80.00,
       70,
       80,
       90,
       80,
          62,
       50,
       40,   // sono arrivata all'iperestensione
       50,
       70,
       90,
       120,
       140
     },
      {120.00,
       110.00,
       100.00,
       90.00,
       80.00,
       70,
       80,
       90,
       80,
       62,
       50,
       40,   // sono arrivata all'iperestensione
       50,
       70,
       90,
       120,
       140
       },

      {//169,
       79,
        -85,
         -90,
         -95,
         -100,
         -105,
         -110,
         -115,
         -120,
         -125,
         -130,
         -135,
         -140,
         -145,
         -150,
         -165,
         -169},

       {61.00, // asse y
       0.00,
       0.00,
       0.00,
       0.00,
       0,
       0,
       0,
       0.00,
       0.00,
       0,
       0,
       0,
                0.00,
       0.00,
       0.00,
       -61.00   // posizione finale va bene.
       },

        {-1.00,     // asse z
       40.00,
       40.00,
       40.00,
       40.00,
       40.00,
       40,
       40,
       40.00,
       40.00,
       40.00,
       40,
       40,
       0,
       0.00,
                 0,
       0     // posizione finale e va bene.
       },

      /*{-80.00,
       -56.00,
       -52.00,
       -50.00,
       -48.00,
       -42,
       -42,
       -42,
       -42,
       -42,
       -42,
       -42,
       -42,
       -50,
       -60,
       -65,
       -70,
       -100,
      -169.00   // ok

       },*/

       {79,
         -85,
         -90,
         -95,
         -100,
         -105,
         -110,
         -115,
         -120,
         -125,
         -130,
         -135,
         -140,
         -145,
         -150,
         -165,
         -169},

       {-61.00,
       0.00,
       0.00,
       0.00,
       0.00,
       0,
       0,
       0,
       0,
       0,
       0,
       0.00,
       0.00,
       0.00,
       0.00,
       0.00,
       61.00    // ok
       },

       {-1.00,
       40.00,
       40.00,
       40.00,
       40.00,
       40.00,
       40,
       40,
       40.00,
       40.00,
       40.00,
       40,
       40,
       0,
       0.00,
       0,
       0             // ok
       }

     } *  pi/180* (-1);



   // Reaction.Type = {0.0};


  /* Data = {{90.00,
       80.00,
       70.00,
       60.00,
       50.00,
       30
       },
      {90.00,
       80.00,
       70.00,
       60.00,
       50.00,
       30
       },
       {40.00,
       40.00,
       40.00,
       40.00,
       40.00,
       40
       },
      -{60.00,
       60.00,
       60.00,
       60.00,
       60.00,
       60
       },
        {35.00,
       0.00,
       0.00,
       0.00,
       0.00,
       0.00
       },
     -{40.00,
       40.00,
       40.00,
       40.00,
       40.00,
       40
       },
    {60.00,
       60.00,
       60.00,
       60.00,
       60.00,
       60
       },
       -{35.00,
       0.00,
       0.00,
       0.00,
       0.00,
       0
       }

     } *  pi/180* (-1); */


   };// chiude AnyKinEqInterPolDriver




   // INSERISCO L'INTERPOLAZIONE SOLO PER LA FLESSIONE DELL'ANCA:

(gli angoli vanno da 60 gradi alla partenza
// a 90 gradi al termine della prima tirata)

  AnyKinMeasureOrg Anca={

 AnySphericalJoint &HipL = .LegL.Jnt.Hip;

AnySphericalJoint &HipR = .LegR.Jnt.Hip;

MeasureOrganizer={2,5};

};

AnyVector Time1 = { 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.56, 0.62, 0.67,

0.72, 0.77, 0.82, 0.95, 0.98, 1.0, 1.1, 1.17 };
AnyKinEqInterPolDriver AncaDriver ={
AnyKinMeasureOrg &AllDofs = .Anca;
//

T = .Time1;
Type = Bspline;
Data = {{130,
124,
118,
112,
106,
100,
90,
80,
60,
40,
20,
10, // fin qua le anche si distendono di 130 gradi
ovvero da 60 gradi della posizione iniziale a 180 gradi della
esplosione
40,
60,
90,
110,
140 // corrispondono alla fase di squat, quindi da 180
gradi nell’iperestensione a 50 gradi nello squat???
},
{130,
124,
118,
112,
106,
100,
90,
80,
60,
40,
20,
10, // fin qua le anche si distendono di 130 gradi
ovvero da 60 gradi della posizione iniziale a 180 gradi della
esplosione
40,
60,
90,
110,
140 // corrispondono alla fase di squat, quindi da 180
gradi nell’iperestensione a 50 gradi nello squat???
}
} * pi/180 * (-1);

    /* Data = {{100,
       90,
       85,
       80,
       75,
       70, // qua termina la prima tirata
       60,
       50,
       40,
       30,
       20,
       5,
       -20,
       20,
       30,
       40,
       50,
       60,
       70
     },
     {100,
       90,
       85,
       80,
       75,
       70,
       60,
       50,
     40,
       30,
       20,
       5,
       -20,
       20,
       30,
       40,
       50,
       60,
       70
     }
    } *  pi/180 * (-1); */


     };// chiude AnyKinEqInterPolDriver


     // cerco, adesso, di creare un'interpolazione che mi guidi
     // la flessione del gomito:


  /*   AnyKinMeasureOrg Gomito={
AnyRevoluteJoint &ElbowL

= …HumanModel.Left.ShoulderArm.Jnt.FE;
AnyRevoluteJoint &ElbowR
= …HumanModel.Right.ShoulderArm.Jnt.FE;

  MeasureOrganizer={0,1};


};

  AnyVector Time2 = { 0, 0.1, 0.2, 0.3, 0.4, 0.5 };
  AnyKinEqInterPolDriver GomitoDriver ={
AnyKinMeasureOrg &AllDofs = .Gomito;

  T = .Time2;
   Type = Bspline;

    Data = {{0,
       15,
       20,
       25,
       30,
       35
     },
     {175,
       160,
       155,
       150,
       145,
       140
     }
    } *  pi/180;


     };// 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
};

I’ll attend your answer!

Thanks
Raffaella

Hi Raffaella

I have uploaded a new file to the file section named
JointsAndDriverVer2.any

Please use this facility in the future for uploading files, copying
entire AnyScript files into the email is not a good solution, since
Yahoo breaks the lines up sometimes, this causes a good deal of
manual work to make the script compile.

I have found a few things in the drivers which where wrong:

1 left toe had no constraint in the y direction
2 both ankle drivers are not needed, as i see this problem…

So i have added one constraint and removed 2 dof and now it
apparently work, so i think your model had too many drivers on, but
i can not be sure that this was what you had in mind. This work
would have been much easier if i have had the sketches, and i think
making them would be very instructive.

Best regards
AnyBody Support

— In anyscript@yahoogroups.com, “ing_bio982” <ing_bio982@y…>
wrote:
> Hi,
> I send you the whole file of the drivers of my model so you have
the
> possibility to understand my errors:
>
> 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
> };
>
>
>
> // INSERISCO UN’INTERPOLAZIONE PER IL TALLONE:
>
> /* AnyFolder HeelDriver ={
> AnyVector Time1 = { 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.56, 0.62,
0.67,
> 0.72, 0.77, 0.82, 0.95, 0.98, 1.0, 1.1, 1.17 };
> AnyKinEqInterPolDriver HeelJointDriver = {
> AnyKinLinear HeelPos = {
> AnyRefNode &BallL =
> Main.Model.HumanModel.Left.Leg.Seg.Foot.HeelJoint;
> AnyRefNode &BallR =
> Main.Model.HumanModel.Right.Leg.Seg.Foot.HeelJoint;
> };
> MeasureOrganizer={0,1};
> T = .Time1;
> Type = Bspline;
> Data = {{0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0
>
>
> },
> {0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0
>
> } } * pi/180 ;
>
> Reaction.Type = {0,0};
>
> };// chiude AnyKinEqInterPolDriver
>
> }; // chiude il folder /
>
>
> AnyKinEqInterPolDriver 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
> AnyVector Time1 = { 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.56, 0.62,
> 0.67, 0.72, 0.77, 0.82, 0.95, 0.98, 1.0, 1.1, 1.17 };
>
>
> T = .Time1;
> Type = Bspline;
> Data = {
> {0, 0, 0,0, 0, 0, 0, 0, 0.1, 0.1, 0.1,
> 0.1,0,0,0,0, 0}
> };
>
>
> Reaction.Type = {1}; // Provide ground reaction forces
> };
>
>
> AnyKinEqInterPolDriver 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
> AnyVector Time1 = { 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.56, 0.62,
> 0.67, 0.72, 0.77, 0.82, 0.95, 0.98, 1.0, 1.1, 1.17
> };
>
> T = .Time1;
> Type = Bspline;
>
> Data = {
> {0, 0, 0,0, 0, 0, 0, 0, 0.1, 0.1, 0.1,
> 0.1,0,0,0,0, 0}
> };
>
> Reaction.Type = {1}; // Provide ground reaction forces
> };
>
>
>
>
>
>
>
>
>
> /
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.1, 0.2, 0.3, 0.4, 0.5, 0.56, 0.62, 0.67,
> 0.72, 0.77, 0.82, 0.95, 0.98, 1.0, 1.1, 1.17 };
> AnyKinEqInterPolDriver AnkleJointDriver = {
>
> AnyJoint &ref1 = Main.Model.HumanModel.Left.Leg.Jnt.Ankle;
> AnyJoint &ref2 = Main.Model.HumanModel.Right.Leg.Jnt.Ankle;
> MeasureOrganizer={0,2};
>
>
> //AnyRevoluteJoint &AnkleJoint =
> Main.Model.HumanModel.Left.Leg.Jnt.Ankle;
>
> T = .Time;
> Type = Bspline;
> Data = {{110, //140,
> 106, //136,
> 102, //132,
> 98, //128,
> 94, //124,
> 90, //120,
> 100, //130,
> 140,
> 135,
> 130,
> 125,
> 120,
> 122,
> 125,
> 135,
> 140,
> 150
>
> },
> { 110, //140,
> 106, //136,
> 102, //132,
> 98, //128,
> 94, //124,
> 90, //120,
> 100, //130,
> 140,
> 135,
> 130,
> 125,
> 120,
> 122,
> 125,
> 135,
> 140,
> 150
>
> } } * pi/180 ;
>
> Reaction.Type = {0.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 z directions.
> DriverPos = {0,0};
> DriverVel = {0,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 = pi/180 {0,0,10, 0,0,15, 0,0,15, 0,0,15, 0,0,15,
> 0,0,30};
> 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.1, 0.2, 0.3, 0.4, 0.5, 0.56, 0.62,
0.67,
> 0.72, 0.77, 0.82, 0.95, 0.98, 1.0, 1.1, 1.17 };
> AnyKinEqInterPolDriver NeckJntDriver = {
> AnyRevoluteJoint &T12L1Joint =
> Main.Model.HumanModel.Trunk.JointsLumbar.NeckJnt;
> T = .Time2;
> Type = Bspline;
> Data = {{50.00,
> 55.00,
> 60.00,
> 62.00,
> 63.00,
> 70,
> 71,
> 72,
> 73,
> 74,
> 75,
> 76,
> 77,
> 63,
> 62,
> 55,
> 50
> }} * 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;
>
> //AnyRefFrame &GlenoHumR=
Main.Model.EnvironmentModel.GlobalRef;
>
> Type = RotVector;
> AngVelOnOff = On;
>
>
>
> scapula_gh={
> AnyDrawRefFrame drawcoorR={
> RGB={0,0,1}; //draw a blue coordinate system
> };
>
> };
>
> humerus_gh={
> AnyDrawRefFrame drawcoorR={
> RGB={0,1,0}; //draw a green coordinate system
> };
>
> };
>
> };
>
>
>
>
> /* 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;
>
> //AnyRefFrame &GlenoHumL=
Main.Model.EnvironmentModel.GlobalRef;
>
> Type = RotVector;
> AngVelOnOff = On;
>
>
>
> scapula_gh={
> AnyDrawRefFrame drawcoorL={
> RGB={0,0,1}; //draw a blue coordinate system
> };
>
> };
>
> humerus_gh={
> AnyDrawRefFrame drawcoorL={
> RGB={0,1,0}; //draw a green coordinate system
> };
>
> };
>
> };
>
>
>
>
>
>
>
>
>
>
> /
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,6};
> };
>
> 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,6};
> MeasureOrganizer={0,1,4,5,6};
> };
>
> 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={
>
> // INTERPOLAZIONE PRIMA FASE: DALLO STACCO AL TERMINE DELLA PRIMA
> TIRATA
>
> 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,2,3,4,5,6,7};
> //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, 0.56, 0.62,
> 0.67, 0.72, 0.77, 0.82, 0.95, 0.98, 1.0, 1.1, 1.17 };
> AnyKinEqInterPolDriver KneeDriver ={
> AnyKinMeasureOrg &AllDofs = .Attivi;
> //
> T = .Time;
> Type = Bspline;
>
> // GLI ANGOLI PER LE GINOCCHIA VANNO DALLA POSIZIONE
INIZIALE
> 90 GRADI A 150 GRADI AL TERMINE DELLA PRIMA TIRATA.
> // angoli prof (MAtchad)…sequenza z,y,x per la spalla:
>
>
> /* Data = {{90.00,
> 80.00,
> 70.00,
> 60.00,
> 50.00,
> 30
> },
> {90.00,
> 80.00,
> 70.00,
> 60.00,
> 50.00,
> 30
> },
> {0.00,
> 7.00,
> 14.00,
> 21.00,
> 21.00,
> 21.00
> },
> {0.00,
> 19.00,
> 38.00,
> 57.00,
> 57.00,
> 57
> },
> {40.00,
> -39.00,
> -38.00,
> -36.00,
> -36.00,
> -36
> },
> {0.00,
> 7.00,
> 14.00,
> 21.00,
> 21.00,
> 21.00
> },
> {0.00,
> 19.00,
> 38.00,
> 57.00,
> 57.00,
> 57
> },
> -{40.00,
> -39.00,
> -38.00,
> -36.00,
> -36.00,
> -36
> }
>
> } * pi/180* (-1); /
>
>
> // VA FORSE BENE:
>
>
> Data = {{120.00,
> 110.00,
> 100.00,
> 90.00,
> 80.00,
> 70,
> 80,
> 90,
> 80,
> 62,
> 50,
> 40, // sono arrivata all’iperestensione
> 50,
> 70,
> 90,
> 120,
> 140
> },
> {120.00,
> 110.00,
> 100.00,
> 90.00,
> 80.00,
> 70,
> 80,
> 90,
> 80,
> 62,
> 50,
> 40, // sono arrivata all’iperestensione
> 50,
> 70,
> 90,
> 120,
> 140
> },
>
> {//169,
> 79,
> -85,
> -90,
> -95,
> -100,
> -105,
> -110,
> -115,
> -120,
> -125,
> -130,
> -135,
> -140,
> -145,
> -150,
> -165,
> -169},
>
> {61.00, // asse y
> 0.00,
> 0.00,
> 0.00,
> 0.00,
> 0,
> 0,
> 0,
> 0.00,
> 0.00,
> 0,
> 0,
> 0,
> 0.00,
> 0.00,
> 0.00,
> -61.00 // posizione finale va bene.
> },
>
> {-1.00, // asse z
> 40.00,
> 40.00,
> 40.00,
> 40.00,
> 40.00,
> 40,
> 40,
> 40.00,
> 40.00,
> 40.00,
> 40,
> 40,
> 0,
> 0.00,
> 0,
> 0 // posizione finale e va bene.
> },
>
> /
{-80.00,
> -56.00,
> -52.00,
> -50.00,
> -48.00,
> -42,
> -42,
> -42,
> -42,
> -42,
> -42,
> -42,
> -42,
> -50,
> -60,
> -65,
> -70,
> -100,
> -169.00 // ok
>
> },/
>
> {79,
> -85,
> -90,
> -95,
> -100,
> -105,
> -110,
> -115,
> -120,
> -125,
> -130,
> -135,
> -140,
> -145,
> -150,
> -165,
> -169},
>
> {-61.00,
> 0.00,
> 0.00,
> 0.00,
> 0.00,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0,
> 0.00,
> 0.00,
> 0.00,
> 0.00,
> 0.00,
> 61.00 // ok
> },
>
> {-1.00,
> 40.00,
> 40.00,
> 40.00,
> 40.00,
> 40.00,
> 40,
> 40,
> 40.00,
> 40.00,
> 40.00,
> 40,
> 40,
> 0,
> 0.00,
> 0,
> 0 // ok
> }
>
> } * pi/180
(-1);
>
>
>
> // Reaction.Type = {0.0};
>
>
> /* Data = {{90.00,
> 80.00,
> 70.00,
> 60.00,
> 50.00,
> 30
> },
> {90.00,
> 80.00,
> 70.00,
> 60.00,
> 50.00,
> 30
> },
> {40.00,
> 40.00,
> 40.00,
> 40.00,
> 40.00,
> 40
> },
> -{60.00,
> 60.00,
> 60.00,
> 60.00,
> 60.00,
> 60
> },
> {35.00,
> 0.00,
> 0.00,
> 0.00,
> 0.00,
> 0.00
> },
> -{40.00,
> 40.00,
> 40.00,
> 40.00,
> 40.00,
> 40
> },
> {60.00,
> 60.00,
> 60.00,
> 60.00,
> 60.00,
> 60
> },
> -{35.00,
> 0.00,
> 0.00,
> 0.00,
> 0.00,
> 0
> }
>
> } * pi/180* (-1); /
>
>
> };// chiude AnyKinEqInterPolDriver
>
>
>
>
> // INSERISCO L’INTERPOLAZIONE SOLO PER LA FLESSIONE
DELL’ANCA:
> (gli angoli vanno da 60 gradi alla partenza
> // a 90 gradi al termine della prima tirata)
>
>
> AnyKinMeasureOrg Anca={
>
> AnySphericalJoint &HipL = .LegL.Jnt.Hip;
> AnySphericalJoint &HipR = .LegR.Jnt.Hip;
>
>
> MeasureOrganizer={2,5};
>
>
> };
>
> AnyVector Time1 = { 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.56, 0.62,
0.67,
> 0.72, 0.77, 0.82, 0.95, 0.98, 1.0, 1.1, 1.17 };
> AnyKinEqInterPolDriver AncaDriver ={
> AnyKinMeasureOrg &AllDofs = .Anca;
> //
>
> T = .Time1;
> Type = Bspline;
> Data = {{130,
> 124,
> 118,
> 112,
> 106,
> 100,
> 90,
> 80,
> 60,
> 40,
> 20,
> 10, // fin qua le anche si distendono di 130 gradi
> ovvero da 60 gradi della posizione iniziale a 180 gradi della
> esplosione
> 40,
> 60,
> 90,
> 110,
> 140 // corrispondono alla fase di squat, quindi da
180
> gradi nell’iperestensione a 50 gradi nello squat???
> },
> {130,
> 124,
> 118,
> 112,
> 106,
> 100,
> 90,
> 80,
> 60,
> 40,
> 20,
> 10, // fin qua le anche si distendono di 130 gradi
> ovvero da 60 gradi della posizione iniziale a 180 gradi della
> esplosione
> 40,
> 60,
> 90,
> 110,
> 140 // corrispondono alla fase di squat, quindi da
180
> gradi nell’iperestensione a 50 gradi nello squat???
> }
> } * pi/180 * (-1);
>
> /
Data = {{100,
> 90,
> 85,
> 80,
> 75,
> 70, // qua termina la prima tirata
> 60,
> 50,
> 40,
> 30,
> 20,
> 5,
> -20,
> 20,
> 30,
> 40,
> 50,
> 60,
> 70
> },
> {100,
> 90,
> 85,
> 80,
> 75,
> 70,
> 60,
> 50,
> 40,
> 30,
> 20,
> 5,
> -20,
> 20,
> 30,
> 40,
> 50,
> 60,
> 70
> }
> } * pi/180 * (-1); /
>
>
> };// chiude AnyKinEqInterPolDriver
>
>
> // cerco, adesso, di creare un’interpolazione che mi guidi
> // la flessione del gomito:
>
>
> /
AnyKinMeasureOrg Gomito={
> AnyRevoluteJoint &ElbowL
> = …HumanModel.Left.ShoulderArm.Jnt.FE;
> AnyRevoluteJoint &ElbowR
> = …HumanModel.Right.ShoulderArm.Jnt.FE;
>
> MeasureOrganizer={0,1};
>
>
> };
>
> AnyVector Time2 = { 0, 0.1, 0.2, 0.3, 0.4, 0.5 };
> AnyKinEqInterPolDriver GomitoDriver ={
> AnyKinMeasureOrg &AllDofs = .Gomito;
>
> T = .Time2;
> Type = Bspline;
>
> Data = {{0,
> 15,
> 20,
> 25,
> 30,
> 35
> },
> {175,
> 160,
> 155,
> 150,
> 145,
> 140
> }
> } * pi/180;
>
>
> };// 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.Handt;
> 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
> };
>
>
>
>
> I’ll attend your answer!
>
> Thanks
> Raffaella