a b/Application/Examples/StandingModelScalingDisplay/Model/LeftLegTDDrivers.any
1
2
3
  // Place the left toe and heel on the ground
4
AnyKinEqSimpleDriver LToeGroundConstraint ={
5
    AnyKinLinear ToePos = {
6
      AnyFixedRefFrame &Ground = Main.Model.Environment.GlobalRef;
7
      AnyRefNode &Ball = Main.Model.BodyModel.Left.Leg.Seg.Foot.ToeJoint;
8
    };
9
    MeasureOrganizer = {1};  // Only the y coordinate
10
    DriverPos = {0.0};
11
    DriverVel = {0};
12
    Reaction.Type = {Off};  // Provide ground reaction
13
14
  };
15
  
16
  AnyKinEqSimpleDriver LHeelGroundConstraint ={
17
    AnyKinLinear HeelPos = {
18
      AnyFixedRefFrame &Ground = Main.Model.Environment.GlobalRef;
19
      AnyRefNode &Ball = Main.Model.BodyModel.Left.Leg.Seg.Foot.HeelNode;
20
    };
21
    MeasureOrganizer = {1};  // Only the y coordinate
22
    DriverPos = {0.0};
23
  DriverVel = {0};
24
    Reaction.Type = {Off};  // Provide ground reaction
25
  };  
26
27
  
28
  
29
    // Position the Ankles right above the z axis
30
  AnyKinEqSimpleDriver LAnkleX ={
31
    AnyKinLinear AnklePos = {
32
      AnyFixedRefFrame &Ground = Main.Model.Environment.GlobalRef;
33
      AnyRefNode &Ankle = ..LegL.Seg.Foot.SubTalarJoint;
34
    };
35
    MeasureOrganizer = {0};  // Only the x coordinate
36
    DriverPos = {0.0};
37
    DriverVel = {0.0};
38
    Reaction.Type = {Off};
39
  };
40
41
  
42
    // ************************************
43
  // Drivers for the Left leg
44
  // ************************************
45
  
46
  //Left hip driver
47
  AnyKinEqSimpleDriver HipDriverLeft={
48
    AnyKinMeasure& ref1 =...BodyModel.Interface.Left.HipFlexion;
49
    AnyKinMeasure& ref2 =...BodyModel.Interface.Left.HipExternalRotation;
50
    AnyKinMeasure& ref3 =...BodyModel.Interface.Left.HipAbduction;
51
    DriverPos=pi/180*{
52
      .JntPos.Left.HipFlexion,
53
      .JntPos.Left.HipExternalRotation,
54
      .JntPos.Left.HipAbduction
55
    };    
56
    DriverVel = pi/180*{
57
      .JntVel.Left.HipFlexion,
58
      .JntVel.Left.HipExternalRotation,
59
      .JntVel.Left.HipAbduction
60
    };    
61
    Reaction.Type={Off,Off,Off};
62
  };
63
  
64
  //Knee driver
65
  AnyKinEqSimpleDriver KneeDriverLeft={
66
    AnyKinMeasure& Knee =...BodyModel.Interface.Left.KneeFlexion;
67
    DriverPos=pi/180*{      .JntPos.Left.KneeFlexion   };  
68
    DriverVel = pi/180*{      .JntVel.Left.KneeFlexion   };  
69
    Reaction.Type={Off};
70
  };
71
  
72
73
  
74
 
75
//Ankle driver
76
  AnyKinEqSimpleDriver AnkleDriverLeft={
77
    AnyKinMeasure& ref1=...BodyModel.Interface.Left.AnklePlantarFlexion;
78
    AnyKinMeasure& ref2=...BodyModel.Interface.Left.SubTalarEversion;
79
    DriverPos = pi/180*{.JntPos.Left.SubTalarEversion};  
80
    DriverVel=pi/180*{.JntVel.Left.SubTalarEversion};  
81
    Reaction.Type={Off};
82
    MeasureOrganizer={1};
83
  };
84
  
85
  
86
  
87
  
88
    AnyReacForce LeftFootReaction = {
89
    
90
    AnyKinLinear LeftFootLinMeasure = {
91
      AnySeg &ref1=..LegL.Seg.Foot;
92
      AnyFixedRefFrame &ref2 = ....Environment.GlobalRef;
93
    };
94
    AnyKinRotational LeftFootRotMeasure = {
95
      AnySeg &ref1=..LegL.Seg.Foot;
96
      AnyFixedRefFrame &ref2 = ....Environment.GlobalRef;
97
      Type = RotVector;
98
    };  
99
    
100
    
101
  };
102
103
104
  
105
  
106
    MannequinLoads.Left = {
107
  
108
      AnyForce3D Hip = {
109
      AnyRefNode &ApplPoint = .lhm.Leg.Seg.Thigh.HipJoint;
110
      F = .locmql.Hip;
111
    };
112
    
113
    AnyForce3D Knee = {
114
      AnyRefNode &ApplPoint = .lhm.Leg.Seg.Thigh.KneeJoint;
115
      F = .locmql.Knee;
116
    };
117
    
118
    AnyForce3D Ankle = {
119
      AnyRefNode &ApplPoint = .lhm.Leg.Seg.Talus.AnkleJoint;
120
      F = .locmql.Ankle;
121
    };    
122
  };
123
124