|
a |
|
b/Tests/Symmetry/DynamicTest/Model/MannequinInterpolation.any |
|
|
1 |
//This file can be used for controlling the mannequin to certain motions |
|
|
2 |
//All drivers in the model is based on interpolation drivers (PiesewiseLine) |
|
|
3 |
// |
|
|
4 |
//In this mannequin file you may type a vetor of values for each joint or |
|
|
5 |
//make a reference to a file containing the values as a column |
|
|
6 |
//For each data vector there must be an equivalent time serie |
|
|
7 |
// |
|
|
8 |
//In this file there are examples of joints which are diven using two values, three values |
|
|
9 |
//(Hip and Glenohumeral) and finally there is a joint using an include file (PelvisThorax rotation) |
|
|
10 |
|
|
|
11 |
|
|
|
12 |
Main.HumanModel.Mannequin ={ |
|
|
13 |
|
|
|
14 |
// special functions to estimate initial conditions |
|
|
15 |
#include "InterpolationFunctions.any" |
|
|
16 |
|
|
|
17 |
Posture ={ |
|
|
18 |
|
|
|
19 |
AnyVector TimeSerie={0/4,1/4,2/4,3/4,4/4}; //This time serie should be used in general |
|
|
20 |
|
|
|
21 |
AnyVector PelvisPosTime=TimeSerie; |
|
|
22 |
AnyVector PelvisPos = .InterpolationFunctions.PelvisGroundFunction(Main.Study.tStart); // uses Pelvis..Vec |
|
|
23 |
|
|
|
24 |
//This controls the position of the pelvi wrt. to the global reference frame |
|
|
25 |
PelvisPosX= PelvisPos[0]; |
|
|
26 |
PelvisPosY= PelvisPos[1]; |
|
|
27 |
PelvisPosZ= PelvisPos[2]; |
|
|
28 |
|
|
|
29 |
//This controls the rotation of the pelvis wrt. to the global reference frame |
|
|
30 |
AnyVector PelvisRotTime=TimeSerie; |
|
|
31 |
PelvisRotX=(180/pi)*PelvisPos[3]; |
|
|
32 |
PelvisRotY=(180/pi)*PelvisPos[4]; |
|
|
33 |
PelvisRotZ=(180/pi)*PelvisPos[5]; |
|
|
34 |
|
|
|
35 |
|
|
|
36 |
AnyVector PelvisPosXVec={0,0,0,0,0}; |
|
|
37 |
AnyVector PelvisPosYVec={1,1,1,1,1}; |
|
|
38 |
AnyVector PelvisPosZVec={0,0,0,0,0}; |
|
|
39 |
AnyVector PelvisRotXVec={0,0,0,0,0}; |
|
|
40 |
AnyVector PelvisRotYVec={0,0,0,0,0}; |
|
|
41 |
AnyVector PelvisRotZVec={0,0,0,0,0}; |
|
|
42 |
|
|
|
43 |
|
|
|
44 |
// These variables control the rotation of the thorax wrt the |
|
|
45 |
// pelvis |
|
|
46 |
AnyVector PelvisThoraxTime=TimeSerie; |
|
|
47 |
AnyVector ThoraxRot = .InterpolationFunctions.PostureFunction(Main.Study.tStart); // uses PelvisThorax..Vec |
|
|
48 |
PelvisThoraxExtension=(180/pi)*ThoraxRot[2]; |
|
|
49 |
PelvisThoraxLateralBending=(180/pi)*ThoraxRot[1]; |
|
|
50 |
PelvisThoraxRotation=(180/pi)*ThoraxRot[0]; |
|
|
51 |
|
|
|
52 |
AnyVector PelvisThoraxExtensionVec={-30,-15,0,15,30}-8; |
|
|
53 |
AnyVector PelvisThoraxLateralBendingVec=0*{0,10,20,30,40}; |
|
|
54 |
AnyVector PelvisThoraxRotationVec={0,0,0,0,0}; |
|
|
55 |
|
|
|
56 |
AnyVector NeckTime=TimeSerie; |
|
|
57 |
NeckExtension =(180/pi)*.InterpolationFunctions.NeckFunction(Main.Study.tStart)[2]; // uses NeckExtensionVec |
|
|
58 |
NeckRotation =(180/pi)*.InterpolationFunctions.NeckFunction(Main.Study.tStart)[1]; // uses NeckAxialRotationVec |
|
|
59 |
NeckLateralBending =(180/pi)*.InterpolationFunctions.NeckFunction(Main.Study.tStart)[0]; // uses NeckLateralBendingVec |
|
|
60 |
|
|
|
61 |
AnyVector NeckExtensionVec={0,0,0,0,0}; |
|
|
62 |
AnyVector NeckLateralBendingVec={0,0,0,0,0}; |
|
|
63 |
AnyVector NeckAxialRotationVec={0,0,0,0,0}; |
|
|
64 |
|
|
|
65 |
Right ={ |
|
|
66 |
//Arm |
|
|
67 |
AnyVector SternoClavicularTime=.TimeSerie; |
|
|
68 |
AnyVector SternoClavicularProtractionVec={-20,-23,-26,-29,-30}; //This value is not used for initial position |
|
|
69 |
AnyVector SternoClavicularElevationVec={8.5,10.5,11.5,12.5,13.5}; //This value is not used for initial position |
|
|
70 |
|
|
|
71 |
|
|
|
72 |
AnyVector GlenohumeralTime=.TimeSerie; |
|
|
73 |
AnyVec3 GHInitPos = ..InterpolationFunctions.GHFunctionRight(Main.Study.tStart); // uses Glenohumeral..Vec |
|
|
74 |
GlenohumeralFlexion = (180/pi)*GHInitPos[0]; |
|
|
75 |
GlenohumeralAbduction = (180/pi)*GHInitPos[1]; |
|
|
76 |
GlenohumeralExternalRotation = (180/pi)*GHInitPos[2]; |
|
|
77 |
|
|
|
78 |
AnyVector GlenohumeralFlexionVec ={10,30,50,70,90} ; |
|
|
79 |
AnyVector GlenohumeralAbductionVec =2*{ 10,30,50,70,90}; |
|
|
80 |
AnyVector GlenohumeralExternalRotationVec ={10,30,50,70,90}; |
|
|
81 |
|
|
|
82 |
AnyVector ElbowFlexionTime=.TimeSerie; |
|
|
83 |
ElbowFlexion =(180/pi)*..InterpolationFunctions.ElbowFlexionFunctionRight(Main.Study.tStart)[0]; // uses ElbowFlexionVec |
|
|
84 |
AnyVector ElbowFlexionVec ={ 0,12,24,40,140}; |
|
|
85 |
|
|
|
86 |
AnyVector ElbowPronationTime=.TimeSerie; |
|
|
87 |
ElbowPronation =(180/pi)*..InterpolationFunctions.ElbowPronationFunctionRight(Main.Study.tStart)[0]; // uses ElbowPronationVec |
|
|
88 |
AnyVector ElbowPronationVec ={ 30.0,-15,-30,-45,-60.0}; |
|
|
89 |
|
|
|
90 |
|
|
|
91 |
AnyVector WristTime=.TimeSerie; |
|
|
92 |
AnyVector WristRot =..InterpolationFunctions.WristFunctionRight(Main.Study.tStart); // uses Wrist..Vec |
|
|
93 |
WristFlexion = (180/pi)*WristRot[0]; |
|
|
94 |
WristAbduction = (180/pi)*WristRot[1]; |
|
|
95 |
|
|
|
96 |
AnyVector WristFlexionVec =3*{10,5,0,-5,-10}; |
|
|
97 |
AnyVector WristAbductionVec =3*{-10,5,0,5,10}; |
|
|
98 |
|
|
|
99 |
Finger1 ={ |
|
|
100 |
AnyVector FingerTime=..TimeSerie; |
|
|
101 |
AnyVector CMCDeviationVec={0,-5,-10,-15,-20}; |
|
|
102 |
AnyVector CMCFlexionVec={0,5,10,15,20}; |
|
|
103 |
AnyVector MCPFlexionVec= {0,5,10,15,20}; |
|
|
104 |
AnyVector MCPDeviationVec={0,0,0,0,0}; |
|
|
105 |
AnyVector DIPFlexionVec={0,5,10,15,20}; |
|
|
106 |
CMCFlexion=...InterpolationFunctions.Right.CMC1Flexion(Main.Study.tStart)[0]; |
|
|
107 |
CMCDeviation=...InterpolationFunctions.Right.CMC1Abduction(Main.Study.tStart)[0]; |
|
|
108 |
MCPFlexion=...InterpolationFunctions.Right.MCP1Flexion(Main.Study.tStart)[0]; |
|
|
109 |
MCPDeviation=...InterpolationFunctions.Right.MCP1Abduction(Main.Study.tStart)[0]; |
|
|
110 |
DIPFlexion=...InterpolationFunctions.Right.DIP1(Main.Study.tStart)[0]; |
|
|
111 |
|
|
|
112 |
}; |
|
|
113 |
|
|
|
114 |
Finger2 ={ |
|
|
115 |
AnyVector FingerTime=..TimeSerie; |
|
|
116 |
AnyVector MCPFlexionVec={50,60,70,80,90}; |
|
|
117 |
AnyVector PIPFlexionVec={50,60,70,80,90}; |
|
|
118 |
AnyVector DIPFlexionVec={50,60,70,80,90}; |
|
|
119 |
MCPFlexion=...InterpolationFunctions.Right.MCP2(Main.Study.tStart)[0]; |
|
|
120 |
PIPFlexion=...InterpolationFunctions.Right.PIP2(Main.Study.tStart)[0]; |
|
|
121 |
DIPFlexion=...InterpolationFunctions.Right.DIP2(Main.Study.tStart)[0]; |
|
|
122 |
}; |
|
|
123 |
|
|
|
124 |
Finger3 ={ |
|
|
125 |
AnyVector FingerTime=..TimeSerie; |
|
|
126 |
AnyVector MCPFlexionVec={0,5,10,15,20}; |
|
|
127 |
AnyVector PIPFlexionVec={0,5,10,15,20}; |
|
|
128 |
AnyVector DIPFlexionVec={0,5,10,15,20}; |
|
|
129 |
MCPFlexion=...InterpolationFunctions.Right.MCP3(Main.Study.tStart)[0]; |
|
|
130 |
PIPFlexion=...InterpolationFunctions.Right.PIP3(Main.Study.tStart)[0]; |
|
|
131 |
DIPFlexion=...InterpolationFunctions.Right.DIP3(Main.Study.tStart)[0]; |
|
|
132 |
|
|
|
133 |
}; |
|
|
134 |
|
|
|
135 |
Finger4 ={ |
|
|
136 |
AnyVector FingerTime=..TimeSerie; |
|
|
137 |
AnyVector MCPFlexionVec={0,5,10,15,20}; |
|
|
138 |
AnyVector PIPFlexionVec={0,5,10,15,20}; |
|
|
139 |
AnyVector DIPFlexionVec={0,5,10,15,20}; |
|
|
140 |
MCPFlexion=...InterpolationFunctions.Right.MCP4(Main.Study.tStart)[0]; |
|
|
141 |
PIPFlexion=...InterpolationFunctions.Right.PIP4(Main.Study.tStart)[0]; |
|
|
142 |
DIPFlexion=...InterpolationFunctions.Right.DIP4(Main.Study.tStart)[0]; |
|
|
143 |
|
|
|
144 |
}; |
|
|
145 |
|
|
|
146 |
Finger5 ={ |
|
|
147 |
AnyVector FingerTime=..TimeSerie; |
|
|
148 |
AnyVector MCPFlexionVec={0,5,10,15,20}; |
|
|
149 |
AnyVector PIPFlexionVec={0,5,10,15,20}; |
|
|
150 |
AnyVector DIPFlexionVec={0,5,10,15,20}; |
|
|
151 |
MCPFlexion=...InterpolationFunctions.Right.MCP5(Main.Study.tStart)[0]; |
|
|
152 |
PIPFlexion=...InterpolationFunctions.Right.PIP5(Main.Study.tStart)[0]; |
|
|
153 |
DIPFlexion=...InterpolationFunctions.Right.DIP5(Main.Study.tStart)[0]; |
|
|
154 |
}; |
|
|
155 |
|
|
|
156 |
|
|
|
157 |
AnyVector HipTime=.TimeSerie; |
|
|
158 |
|
|
|
159 |
AnyVector HipRot =..InterpolationFunctions.HipFunctionRight(Main.Study.tStart); // uses Hip...Vec |
|
|
160 |
HipFlexion =(180/pi)*HipRot[0]; |
|
|
161 |
HipAbduction =(180/pi)*HipRot[1]; |
|
|
162 |
HipExternalRotation =(180/pi)*HipRot[2]; |
|
|
163 |
|
|
|
164 |
AnyVector HipFlexionVec = { 20,55,90,45,-10}-8; |
|
|
165 |
AnyVector HipAbductionVec ={ 20,40,60,45,0}; |
|
|
166 |
AnyVector HipExternalRotationVec ={ 10,5,0,-5,-10}; |
|
|
167 |
|
|
|
168 |
AnyVector KneeTime=.TimeSerie; |
|
|
169 |
KneeFlexion =(180/pi)*..InterpolationFunctions.KneeFunctionRight(Main.Study.tStart)[0]; // uses KneeFlexionVec |
|
|
170 |
AnyVector KneeFlexionVec ={ 120.0,60,16,8,0}; |
|
|
171 |
|
|
|
172 |
AnyVector AnkleTime=.TimeSerie; |
|
|
173 |
AnyVector AnkleRot = ..InterpolationFunctions.AnkleFunctionRight(Main.Study.tStart); |
|
|
174 |
AnklePlantarFlexion =(180/pi)*AnkleRot[0]; |
|
|
175 |
SubTalarEversion =(180/pi)*AnkleRot[1]; // uses SubTalarEversionVec |
|
|
176 |
|
|
|
177 |
AnyVector AnklePlantarFlexionVec ={0,5,10,15,20}; |
|
|
178 |
AnyVector SubTalarEversionVec ={0,5,10,15,20}; //used by Leg |
|
|
179 |
}; |
|
|
180 |
|
|
|
181 |
Left ={ |
|
|
182 |
//all values are set to be equal to the right side values |
|
|
183 |
//feel free to change this! |
|
|
184 |
|
|
|
185 |
//Arm |
|
|
186 |
AnyVector SternoClavicularTime=.Right.SternoClavicularTime; |
|
|
187 |
AnyVector SternoClavicularProtractionVec=.Right.SternoClavicularProtractionVec; |
|
|
188 |
AnyVector SternoClavicularElevationVec=.Right.SternoClavicularElevationVec; |
|
|
189 |
|
|
|
190 |
AnyVector GlenohumeralTime=.Right.GlenohumeralTime; |
|
|
191 |
AnyVec3 GHInitPos = ..InterpolationFunctions.GHFunctionLeft(Main.Study.tStart); // uses Glenohumeral..Vec |
|
|
192 |
GlenohumeralFlexion = (180/pi)*GHInitPos[0]; |
|
|
193 |
GlenohumeralAbduction = (180/pi)*GHInitPos[1]; |
|
|
194 |
GlenohumeralExternalRotation = (180/pi)*GHInitPos[2]; |
|
|
195 |
AnyVector GlenohumeralFlexionVec = .Right.GlenohumeralFlexionVec ; |
|
|
196 |
AnyVector GlenohumeralAbductionVec =.Right.GlenohumeralAbductionVec; |
|
|
197 |
AnyVector GlenohumeralExternalRotationVec =.Right.GlenohumeralExternalRotationVec ; |
|
|
198 |
|
|
|
199 |
AnyVector ElbowFlexionTime=.Right.ElbowFlexionTime; |
|
|
200 |
ElbowFlexion =(180/pi)*..InterpolationFunctions.ElbowFEFunctionLeft(Main.Study.tStart)[0]; // uses ElbowFlexionVec |
|
|
201 |
AnyVector ElbowFlexionVec = .Right.ElbowFlexionVec; |
|
|
202 |
|
|
|
203 |
AnyVector ElbowPronationTime=.Right.ElbowPronationTime; |
|
|
204 |
ElbowPronation =(180/pi)*..InterpolationFunctions.ElbowPSFunctionLeft(Main.Study.tStart)[0]; // uses ElbowPronationVec |
|
|
205 |
AnyVector ElbowPronationVec = .Right.ElbowPronationVec; |
|
|
206 |
|
|
|
207 |
AnyVector WristTime=.Right.WristTime; |
|
|
208 |
AnyVector WristRot =..InterpolationFunctions.WristFunctionLeft(Main.Study.tStart); // uses Wrist..Vec |
|
|
209 |
WristFlexion =(180/pi)*WristRot[0]; |
|
|
210 |
WristAbduction =(180/pi)*WristRot[1]; |
|
|
211 |
AnyVector WristFlexionVec =.Right.WristFlexionVec; |
|
|
212 |
AnyVector WristAbductionVec =.Right.WristAbductionVec; |
|
|
213 |
|
|
|
214 |
|
|
|
215 |
|
|
|
216 |
|
|
|
217 |
|
|
|
218 |
Finger1 ={ |
|
|
219 |
AnyVector FingerTime=..TimeSerie; |
|
|
220 |
AnyVector CMCDeviationVec={0,-5,-10,-15,-20}; |
|
|
221 |
AnyVector CMCFlexionVec={0,5,10,15,20}; |
|
|
222 |
AnyVector MCPFlexionVec= {0,5,10,15,20}; |
|
|
223 |
AnyVector MCPDeviationVec={0,0,0,0,0}; |
|
|
224 |
AnyVector DIPFlexionVec={0,5,10,15,20}; |
|
|
225 |
CMCFlexion=...InterpolationFunctions.Left.CMC1Flexion(Main.Study.tStart)[0]; |
|
|
226 |
CMCDeviation=...InterpolationFunctions.Left.CMC1Abduction(Main.Study.tStart)[0]; |
|
|
227 |
MCPFlexion=...InterpolationFunctions.Left.MCP1Flexion(Main.Study.tStart)[0]; |
|
|
228 |
MCPDeviation=...InterpolationFunctions.Left.MCP1Abduction(Main.Study.tStart)[0]; |
|
|
229 |
DIPFlexion=...InterpolationFunctions.Left.DIP1(Main.Study.tStart)[0]; |
|
|
230 |
|
|
|
231 |
}; |
|
|
232 |
|
|
|
233 |
Finger2 ={ |
|
|
234 |
AnyVector FingerTime=..TimeSerie; |
|
|
235 |
AnyVector MCPFlexionVec={50,60,70,80,90}; |
|
|
236 |
AnyVector PIPFlexionVec={50,60,70,80,90}; |
|
|
237 |
AnyVector DIPFlexionVec={50,60,70,80,90}; |
|
|
238 |
MCPFlexion=...InterpolationFunctions.Left.MCP2(Main.Study.tStart)[0]; |
|
|
239 |
PIPFlexion=...InterpolationFunctions.Left.PIP2(Main.Study.tStart)[0]; |
|
|
240 |
DIPFlexion=...InterpolationFunctions.Left.DIP2(Main.Study.tStart)[0]; |
|
|
241 |
}; |
|
|
242 |
|
|
|
243 |
Finger3 ={ |
|
|
244 |
AnyVector FingerTime=..TimeSerie; |
|
|
245 |
AnyVector MCPFlexionVec={0,5,10,15,20}; |
|
|
246 |
AnyVector PIPFlexionVec={0,5,10,15,20}; |
|
|
247 |
AnyVector DIPFlexionVec={0,5,10,15,20}; |
|
|
248 |
MCPFlexion=...InterpolationFunctions.Left.MCP3(Main.Study.tStart)[0]; |
|
|
249 |
PIPFlexion=...InterpolationFunctions.Left.PIP3(Main.Study.tStart)[0]; |
|
|
250 |
DIPFlexion=...InterpolationFunctions.Left.DIP3(Main.Study.tStart)[0]; |
|
|
251 |
|
|
|
252 |
}; |
|
|
253 |
|
|
|
254 |
Finger4 ={ |
|
|
255 |
AnyVector FingerTime=..TimeSerie; |
|
|
256 |
AnyVector MCPFlexionVec={0,5,10,15,20}; |
|
|
257 |
AnyVector PIPFlexionVec={0,5,10,15,20}; |
|
|
258 |
AnyVector DIPFlexionVec={0,5,10,15,20}; |
|
|
259 |
MCPFlexion=...InterpolationFunctions.Left.MCP4(Main.Study.tStart)[0]; |
|
|
260 |
PIPFlexion=...InterpolationFunctions.Left.PIP4(Main.Study.tStart)[0]; |
|
|
261 |
DIPFlexion=...InterpolationFunctions.Left.DIP4(Main.Study.tStart)[0]; |
|
|
262 |
|
|
|
263 |
}; |
|
|
264 |
|
|
|
265 |
Finger5 ={ |
|
|
266 |
AnyVector FingerTime=..TimeSerie; |
|
|
267 |
AnyVector MCPFlexionVec={0,5,10,15,20}; |
|
|
268 |
AnyVector PIPFlexionVec={0,5,10,15,20}; |
|
|
269 |
AnyVector DIPFlexionVec={0,5,10,15,20}; |
|
|
270 |
MCPFlexion=...InterpolationFunctions.Left.MCP5(Main.Study.tStart)[0]; |
|
|
271 |
PIPFlexion=...InterpolationFunctions.Left.PIP5(Main.Study.tStart)[0]; |
|
|
272 |
DIPFlexion=...InterpolationFunctions.Left.DIP5(Main.Study.tStart)[0]; |
|
|
273 |
}; |
|
|
274 |
|
|
|
275 |
|
|
|
276 |
|
|
|
277 |
|
|
|
278 |
|
|
|
279 |
//Leg |
|
|
280 |
AnyVector HipTime=.Right.HipTime; |
|
|
281 |
HipFlexion =.Right.HipFlexion; |
|
|
282 |
AnyVector HipFlexionVec =.Right.HipFlexionVec; |
|
|
283 |
HipAbduction =.Right.HipAbduction; |
|
|
284 |
AnyVector HipAbductionVec =.Right.HipAbductionVec; |
|
|
285 |
HipExternalRotation = .Right.HipExternalRotation; |
|
|
286 |
AnyVector HipExternalRotationVec = .Right.HipExternalRotationVec; |
|
|
287 |
|
|
|
288 |
AnyVector KneeTime=.Right.KneeTime; |
|
|
289 |
KneeFlexion = .Right.KneeFlexion; |
|
|
290 |
AnyVector KneeFlexionVec = .Right.KneeFlexionVec; |
|
|
291 |
|
|
|
292 |
AnyVector AnkleTime=.Right.AnkleTime; |
|
|
293 |
AnklePlantarFlexion = .Right.AnklePlantarFlexion ; |
|
|
294 |
AnyVector AnklePlantarFlexionVec = .Right.AnklePlantarFlexionVec ; |
|
|
295 |
SubTalarEversion =.Right.SubTalarEversion; |
|
|
296 |
AnyVector SubTalarEversionVec =.Right.SubTalarEversionVec; |
|
|
297 |
}; |
|
|
298 |
}; |
|
|
299 |
PostureVel={}; |
|
|
300 |
}; |
|
|
301 |
|
|
|
302 |
|
|
|
303 |
|