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