Switch to unified view

a b/Application/Examples/StandingModelScalingDisplay/Model/RightLegDrivers.any
1
2
3
4
  // Place the right toe and heel on the ground
5
  AnyKinEqSimpleDriver RToeGroundConstraint ={
6
    AnyKinLinear ToePos = {
7
      AnyFixedRefFrame &Ground = Main.Model.Environment.GlobalRef;
8
      AnyRefNode &Ball = Main.Model.HumanModel.Right.Leg.Seg.Foot.ToeJoint;
9
    };
10
   MeasureOrganizer = {1};  // Only the y coordinate
11
    DriverPos = {0.0};
12
    DriverVel = {0};
13
    Reaction.Type = {Off};   // Provide ground reaction forces
14
  
15
  };
16
  
17
  AnyKinEqSimpleDriver RHeelGroundConstraint ={
18
    AnyKinLinear HeelPos = {
19
      AnyFixedRefFrame &Ground = Main.Model.Environment.GlobalRef;
20
      AnyRefNode &Ball = Main.Model.HumanModel.Right.Leg.Seg.Foot.HeelJoint;
21
    };
22
    MeasureOrganizer = {1};  // Only the y coordinate
23
    DriverPos = {0.0};
24
    DriverVel = {0};
25
    Reaction.Type = {Off};   // Provide ground reaction forces
26
  };
27
28
  
29
    // Position the Ankles right above the z axis
30
  AnyKinEqSimpleDriver RAnkleX = {
31
    AnyKinLinear AnklePos = {
32
      AnyFixedRefFrame &Ground = Main.Model.Environment.GlobalRef;
33
      AnyRefNode &Ankle = ..LegR.Seg.Foot.AnkleJoint;
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
    // ************************************
44
  // Drivers for the right leg
45
  // ************************************
46
  
47
   //Hip driver 
48
  AnyKinEqSimpleDriver HipDriverRight={
49
    AnyKinMeasure& ref1 =...HumanModel.Interface.Right.HipFlexion;
50
    AnyKinMeasure& ref2 =...HumanModel.Interface.Right.HipExternalRotation;
51
    AnyKinMeasure& ref3 =...HumanModel.Interface.Right.HipAbduction;
52
    DriverPos= pi/180*{
53
      .JntPos.Right.HipFlexion,
54
      .JntPos.Right.HipExternalRotation,
55
      .JntPos.Right.HipAbduction
56
    };    
57
    DriverVel = pi/180*{
58
      .JntVel.Right.HipFlexion,
59
      .JntVel.Right.HipExternalRotation,
60
      .JntVel.Right.HipAbduction
61
    };    
62
    Reaction.Type={Off,Off,Off};
63
  
64
  };
65
   
66
  //Knee driver
67
  AnyKinEqSimpleDriver KneeDriverRight={
68
    AnyKinMeasure& Knee = ...HumanModel.Interface.Right.KneeFlexion;
69
    DriverPos=pi/180*{.JntPos.Right.KneeFlexion};  
70
    DriverVel = pi/180*{.JntVel.Right.KneeFlexion};  
71
    Reaction.Type={Off};
72
  };
73
  
74
  //Ankle driver
75
  AnyKinEqSimpleDriver AnkleDriverRight={
76
    AnyKinMeasure& ref1=...HumanModel.Interface.Right.AnklePlantarFlexion;
77
    AnyKinMeasure& ref2=...HumanModel.Interface.Right.AnkleEversion;
78
    DriverPos = pi/180*{.JntPos.Right.SubTalarEversion};  
79
    DriverVel=pi/180*{.JntVel.Right.SubTalarEversion};  
80
    Reaction.Type={Off};
81
    MeasureOrganizer={1};
82
  };
83
  
84
  
85
  
86
  
87
    AnyReacForce RightFootReaction = {
88
    
89
    
90
    AnyKinRotational rot = {
91
      AnySeg &ref1=..LegR.Seg.Foot;
92
      AnyFixedRefFrame &ref2 = ....Environment.GlobalRef;
93
      Type = RotVector;
94
    };  
95
    
96
    AnyKinLinear RightFootLinMeasure = {
97
      AnySeg &ref1=..LegR.Seg.Foot;
98
      AnyFixedRefFrame &ref2 = ....Environment.GlobalRef;  
99
    };
100
    
101
  };
102
103
  
104
  
105
  MannequinLoads.Right = {
106
  
107
      AnyForce3D Hip = {
108
      AnyRefNode &ApplPoint = .rhm.Leg.Seg.Thigh.HipJoint;
109
      F = .locmql.Hip;
110
    };
111
    
112
    AnyForce3D Knee = {
113
      AnyRefNode &ApplPoint = .rhm.Leg.Seg.Thigh.KneeJoint;
114
      F = .locmql.Knee;
115
    };
116
    
117
    AnyForce3D Ankle = {
118
      AnyRefNode &ApplPoint = .rhm.Leg.Seg.Foot.AnkleJoint;
119
      F = .locmql.Ankle;
120
    };    
121
  };