wafr.world
Go to the documentation of this file.
1 
2 [CONSTANTS]
3 
4 % qji_k is a vector expreseing the anchor point of reference
5 % frame i with respect to reference frame k of finger j.
6 % if k is not given, it means it is respect to the palm,
7 % which in our case, it is the absoulute one.
8 
9 q11x := -4.3
10 q11y := -40.165
11 q11z := 145.43
12 %q11 = q12
13 
14 q21x := -4.3
15 q21y := 0
16 q21z := 150.15
17 %q21 = q22
18 
19 q31x := -4.3
20 q31y := 40.165
21 q31z := 145.43
22 %q31 = q32
23 
24 q40x := -3
25 q40y := 27.1
26 q40z := 0
27 
28 q41x_0:= 97
29 q41y_0:= 6
30 q41z_0:=-87
31 %q41_0 = q42_0
32 
33 
34 % These anchor points can be seen as the length of the phalanges,
35 % but that is because the phalanges are aligned with this vectors.
36 q13x_2 := 67.8
37 q13y_2 := 0
38 q13z_2 := 0
39 
40 q14x_3 := 30
41 q14y_3 := 0
42 q14z_3 := 0
43 
44 
45 q23x_2 := 67.8
46 q23y_2 := 0
47 q23z_2 := 0
48 
49 q24x_3 := 30
50 q24y_3 := 0
51 q24z_3 := 0
52 
53 
54 q33x_2 := 67.8
55 q33y_2 := 0
56 q33z_2 := 0
57 
58 q34x_3 := 30
59 q34y_3 := 0
60 q34z_3 := 0
61 
62 
63 q43x_2 := 67.8
64 q43y_2 := 0
65 q43z_2 := 0
66 
67 q44x_3 := 30
68 q44y_3 := 0
69 q44z_3 := 0
70 
71 
72 % Hand-object contact points (plus normals)
73 % The points are numbered as 1,2,3 and
74 % those in the object must contact the corresponding
75 % one in the hand.
76 % The contact points in the hand are at the end of
77 % fingers 2,3 and 4.
78 % All contact points are given in local coordinates of
79 % the corresponding bodies.
80 
81 op1_x:= 15
82 op1_y:=-17
83 op1_z:= 23
84 
85 op2_x:= 12
86 op2_y:= 19
87 op2_z:= 23
88 
89 op3_x:= 21
90 op3_y:= 0
91 op3_z:=-22
92 
93 on1_x:= 0
94 on1_y:= 0
95 on1_z:= 1
96 
97 on2_x:= 0
98 on2_y:= 0
99 on2_z:= 1
100 
101 on3_x:= 0
102 on3_y:= 0
103 on3_z:=-1
104 
105 % aprox (26,0,13)
106 hp1_x:=26.745362130452246
107 hp1_y:=-0.320775916066435
108 hp1_z:=13.600172216189954
109 
110 % aprox (26,0,13)
111 hp2_x:=27.186824561219627
112 hp2_y:= 0.988403453869847
113 hp2_z:=14.015803798995954
114 
115 %aprox (39,2,5)
116 hp3_x:=38.177015391947400
117 hp3_y:= 1.899999999999999
118 hp3_z:= 6.216744353301863
119 
120 hn1_x:=-0.269074918627895
121 hn1_y:= 0.137944652813314
122 hn1_z:=-0.953189362574723
123 
124 hn2_x:=-0.237373330082984
125 hn2_y:= 0.113242205988468
126 hn2_z:=-0.964795369468667
127 
128 hn3_x:=-0.975994458224612
129 hn3_y:= 0
130 hn3_z:=-0.217795356963474
131 
132 % Joint ranges
133 
134 % We can symmetrically enlarge the ranges for the joints so that
135 % the hand can better manipulate objects without regrasping.
136 % Set to zero to use the original ranges
137 enlarge_range := 20*pi/180
138 
139 % Two ranges for the universal joint connecting the palm and finger 1
140 phi_1_1_min:= 0
141 phi_1_1_max:= 0
142 
143 phi_1_2_min:= 0
144 phi_1_2_max:= 0
145 
146 % Range for the first rotation in finger 1
147 phi_1_3_min:= 0
148 phi_1_3_max:= 0
149 
150 % Range for the second rotation in finger 1
151 phi_1_4_min:= 0
152 phi_1_4_max:= 0
153 
154 % Two ranges for the universal joint connecting the palm and finger 2
155 % -pi/16
156 phi_2_1_min:= -pi/8 -enlarge_range
157 phi_2_1_max:= pi/8 +enlarge_range
158 
159 % 1.35*pi/16
160 phi_2_2_min:= 0 -enlarge_range
161 phi_2_2_max:= pi/2 +enlarge_range
162 
163 % Range for the first rotation in finger 2
164 % pi/8
165 phi_2_3_min:= 0 -enlarge_range
166 phi_2_3_max:= pi/2 +enlarge_range
167 
168 % Range for the second rotation in finger 2
169 % pi/8
170 phi_2_4_min:= 0 -enlarge_range
171 phi_2_4_max:= pi/2 +enlarge_range
172 
173 % Two ranges for the universal joint connecting the palm and finger 3
174 % -pi/16
175 phi_3_1_min:= -pi/8 -enlarge_range
176 phi_3_1_max:= pi/8 +enlarge_range
177 
178 % 1.2*pi/16
179 phi_3_2_min:= 0 -enlarge_range
180 phi_3_2_max:= pi/2 +enlarge_range
181 
182 % Range for the first rotation in finger 3
183 % pi/8
184 phi_3_3_min:= 0 -enlarge_range
185 phi_3_3_max:= pi/2 +enlarge_range
186 
187 % Range for the second rotation in finger 3
188 % pi/8
189 phi_3_4_min:= 0 -enlarge_range
190 phi_3_4_max:= pi/2 +enlarge_range
191 
192 % Two ranges for the universal joint connecting the palm and finger 4
193 % pi/2
194 phi_4_0_min:= 0 -enlarge_range
195 phi_4_0_max:= pi/2 +enlarge_range
196 
197 % 0
198 phi_4_1_min:= -pi/8 -enlarge_range
199 phi_4_1_max:= pi/8 +enlarge_range
200 
201 % 0
202 phi_4_2_min:= 0 -enlarge_range
203 phi_4_2_max:= pi/2 +enlarge_range
204 
205 % Range for the first rotation in finger 4
206 % 3*pi/16
207 phi_4_3_min:= 0 -enlarge_range
208 phi_4_3_max:= pi/2 +enlarge_range
209 
210 % Range for the second rotation in finger 4
211 % 3*pi/16
212 phi_4_4_min:= 0 -enlarge_range
213 phi_4_4_max:= pi/2 +enlarge_range
214 
215 
216 %-------------------------------------------------------------------
217 %--------------------------------------------------------------------
218 
219 [LINKS]
220 
221 % palm
222  palm:body "bodies/palmSAH.off" white
223  body "bodies/acs1palm.off" blue
224  body "bodies/acs2palm.off" blue
225  body "bodies/acs3palm.off"
226 
227  // finger 1 fixed
228  body "bodies/p1_fix.off" white
229  body "bodies/p2_fix.off" white
230  body "bodies/b2_fix.off" blue
231  body "bodies/p3_fix.off" white
232  body "bodies/p4_fix.off" white
233  body "bodies/b4_fix.off" blue
234 /*
235 %% finger 1 (NOT USED)
236  p12: body "bodies/p1.off" white
237  body "bodies/p2.off" white
238  body "bodies/b2.off" blue
239 
240  p13: body "bodies/p3.off" white
241 
242  p14: body "bodies/p4.off" white
243  body "bodies/b4.off" blue
244 */
245 
246 % finger 2
247  p22: body "bodies/p1.off" white
248  body "bodies/p2.off" white
249  body "bodies/b2.off" blue
250 
251  p23: body "bodies/p3.off" white
252 
253  p24: body "bodies/p4.off" white
254  body "bodies/b4.off" blue
255 
256 % finger 3
257  p32: body "bodies/p1.off" white
258  body "bodies/p2.off" white
259  body "bodies/b2.off" blue
260 
261  p33: body "bodies/p3.off" white
262 
263  p34: body "bodies/p4.off" white
264  body "bodies/b4.off" blue
265 
266 % finger 4
267  p40: body "bodies/p0thumb.off" white
268 
269  p42: body "bodies/p1.off" white
270  body "bodies/p2.off" white
271  body "bodies/b2.off" blue
272 
273  p43: body "bodies/p3.off" white
274 
275  p44: body "bodies/p4.off" white
276  body "bodies/b4.off" blue
277 
278 %object
279  object: body "bodies/needle.off" green
280 
281 [JOINTS]
282 /*
283 
284 %% finger 1 (NOT USED)
285  universal: palm (q11x,q11y,q11z)+(1,0,0)
286  p12 (0,0,0)+(0,1,0)
287  range [phi_1_1_min,phi_1_1_max] +(0,-0.99941,0.034301)
288  [phi_1_2_min,phi_1_2_max] +(1,0,0)
289  avoid limits
290 
291  revolute: p12 (q13x_2,q13y_2,q13z_2)+(0,-1,0)
292  p13 (0,0,0)+(0,-1,0)
293  range [phi_1_3_min,phi_1_3_max] +(1,0,0) +(1,0,0)
294  avoid limits
295 
296  crevolute: p13 (q14x_3,q14y_3,q14z_3)+(0,-1,0)
297  p14 (0,0,0)+(0,-1,0)
298  range [phi_1_4_min,phi_1_4_max] +(1,0,0) +(1,0,0)
299  avoid limits
300 */
301 
302 
303 % finger 2
304  universal: palm (q21x,q21y,q21z)+(1,0,0)
305  p22 (0,0,0)+(0,1,0)
306  range [phi_2_1_min,phi_2_1_max] +(0,-1,0)
307  [phi_2_2_min,phi_2_2_max] +(1, 0,0)
308 
309  revolute: p22 (q23x_2,q23y_2,q23z_2)+(0,-1,0)
310  p23 (0,0,0)+(0,-1,0)
311  range [phi_2_3_min,phi_2_3_max] +(1,0,0) +(1,0,0)
312 
313  crevolute: p23 (q24x_3,q24y_3,q24z_3)+(0,-1,0)
314  p24 (0,0,0)+(0,-1,0)
315  range [phi_2_4_min,phi_2_4_max] +(1,0,0) +(1,0,0)
316 
317 
318 % finger 3
319  universal: palm (q31x,q31y,q31z)+(1,0,0)
320  p32 (0,0,0)+(0,1,0)
321  range [phi_3_1_min,phi_3_1_max] +(0,-0.99937,-0.035485)
322  [phi_3_2_min,phi_3_2_max] +(1,0,0)
323 
324  revolute: p32 (q33x_2,q33y_2,q33z_2)+(0,-1,0)
325  p33 (0,0,0)+(0,-1,0)
326  range [phi_3_3_min,phi_3_3_max] +(1,0,0) +(1,0,0)
327 
328  crevolute: p33 (q34x_3,q34y_3,q34z_3)+(0,-1,0)
329  p34 (0,0,0)+(0,-1,0)
330  range [phi_3_4_min,phi_3_4_max] +(1,0,0) +(1,0,0)
331 
332 
333 % finger 4
334  revolute: palm (q40x,q40y,q40z)+(0,0,-1)
335  p40 (0,0,0)+(-1,0,0)
336  range [phi_4_0_min,phi_4_0_max] +(0,-1,0) +(0,0,1)
337 
338  universal: p40 (q41x_0,q41y_0,q41z_0)+(0.573580,0,0.81915)
339  p42 (0,0,0)+(0,1,0)
340  range [phi_4_1_min,phi_4_1_max] +(0,1,0)
341  [phi_4_2_min,phi_4_2_max] +(1,0,0)
342 
343  revolute: p42 (q43x_2,q43y_2,q43z_2)+(0,-1,0)
344  p43 (0,0,0)+(0,-1,0)
345  range [phi_4_3_min,phi_4_3_max] +(1,0,0) +(1,0,0)
346 
347  revolute: p43 (q44x_3,q44y_3,q44z_3)+(0,-1,0)
348  p44 (0,0,0)+(0,-1,0)
349  range [phi_4_4_min,phi_4_4_max] +(1,0,0) +(1,0,0)
350 
351 
352 % Now we define the hand-object connection via revolute joints
353  revolute: p24 (hp1_x,hp1_y,hp1_z)+(hn1_x,hn1_y,hn1_z)
354  object (op1_x,op1_y,op1_z)+(on1_x,on1_y,on1_z)
355 
356  revolute: p34 (hp2_x,hp2_y,hp2_z)+(hn2_x,hn2_y,hn2_z)
357  object (op2_x,op2_y,op2_z)+(on2_x,on2_y,on2_z)
358 
359  revolute: p44 (hp3_x,hp3_y,hp3_z)+(hn3_x,hn3_y,hn3_z)
360  object (op3_x,op3_y,op3_z)+(on3_x,on3_y,on3_z)
361 
362 
363 % This the fix transformation to the object used to defined the grasping
364 % fix: palm object Tx(25) * Ry(-pi/4) *Tz(120)* Tx(180) * Ty(35)
365 
366 [OBSTACLES]
367 
368  obs1: body "bodies/obstacle1" color (0.9,0.9,0.1)
369  obs2: body "bodies/obstacle2" color (0.9,0.9,0.1)
370  obs3: body "bodies/obstacle3" color (0.9,0.9,0.1)
371  % obs4: body "bodies/obstacle4" color (0.9,0.9,0.1)
372  obs4: body "bodies/obstacle4" color (0.9,0.9,0.1)
373 
374 [COLLISIONS]
375 
376 Do Not Check: all
377 Check: object,obs1
378 Check: object,obs2
379 Check: object,obs3
380 Check: object,obs4
381 
382