RobotHand.world
Go to the documentation of this file.
1 
2 [CONSTANTS]
3 
4 % Anchor points of the fingers at the palm
5 % (we assume that the universal joint connecting the hand and the finger has
6 % the rotation axis aligned with the palm axis)
7 q_1_1_x:= 9.5
8 q_1_1_y:=-67
9 q_1_1_z:=197.55
10 
11 q_2_1_x:=9.5
12 q_2_1_y:=0
13 q_2_1_z:=197.55
14 
15 q_3_1_x:=9.5
16 q_3_1_y:=67
17 q_3_1_z:=197.55
18 
19 q_4_1_x:=40.1650
20 q_4_1_y:=30.012
21 q_4_1_z:=66.8142
22 
23 % Length of the phalanges. first index is the leg, second
24 % index is the phalanx.
25 % Phalanges are numbered from 2 since the attachment point
26 % of the finger on the palm is seen as the first phalanx
27 p_1_2:=76.66
28 p_1_3:=56
29 p_1_4:=33.805151243
30 
31 p_2_2:=76.66
32 p_2_3:=56
33 p_2_4:=33.805151243
34 
35 p_3_2:=76.66
36 p_3_3:=56
37 p_3_4:=33.805151243
38 
39 p_4_2:=76.66
40 p_4_3:=66
41 p_4_4:=39.862238567
42 
43 % Contact point on the object
44 
45 x_1_x:=125.8625
46 x_1_y:=-67.0000
47 x_1_z:=218.5170
48 
49 x_2_x:=117.4179
50 x_2_y:= 0
51 x_2_z:=245.8564
52 
53 x_3_x:=125.8623
54 x_3_y:= 67.0000
55 x_3_z:= 218.5168
56 
57 x_4_x:=160.4200
58 x_4_y:= 10.4509
59 x_4_z:=139.8173
60 
61 % Normals of the object surface at the contact points
62 % Pointing into the object
63 nhat_1_x:=-0.7071
64 nhat_1_y:= 0
65 nhat_1_z:=-0.7071
66 
67 nhat_2_x:=-0.5165
68 nhat_2_y:= 0
69 nhat_2_z:=-0.8563
70 
71 nhat_3_x:=-0.7071
72 nhat_3_y:= 0
73 nhat_3_z:=-0.7071
74 
75 nhat_4_x:=-0.9778
76 nhat_4_y:=-0.0542
77 nhat_4_z:= 0.2023
78 
79 % Contact point on the fingertip
80 q_1_4_x:=27.856821097374684
81 q_1_4_y:=0
82 q_1_4_z:=19.151400000000000
83 
84 q_2_4_x:=27.856821097374684
85 q_2_4_y:=0
86 q_2_4_z:=19.151651859208762
87 
88 q_3_4_x:=27.856821097374684
89 q_3_4_y:=0
90 q_3_4_z:=19.151651859208762
91 
92 q_4_4_x:=34.762406989603285
93 q_4_4_y:=0
94 q_4_4_z:=19.508283467663215
95 
96 % Normals of the fingertip at the contact point
97 % Pointing outward the finger
98 mhat_1_x:=0
99 mhat_1_y:=0
100 mhat_1_z:=1
101 
102 mhat_2_x:=0
103 mhat_2_y:=0
104 mhat_2_z:=1
105 
106 mhat_3_x:=0
107 mhat_3_y:=0
108 mhat_3_z:=1
109 
110 mhat_4_x:=0
111 mhat_4_y:=0
112 mhat_4_z:=1
113 
114 % Joint ranges
115 
116 % Two ranges for the universal joint connecting the palm and finger 1
117 phi_1_1_min:=-15*pi/180
118 phi_1_1_max:= 15*pi/180
119 
120 phi_1_2_min:=0
121 phi_1_2_max:=pi/2
122 
123 % Range for the first rotation in finger 1
124 phi_1_3_min:=0
125 phi_1_3_max:=pi/2
126 
127 % Range for the second rotation in finger 1
128 phi_1_4_min:=0
129 phi_1_4_max:=pi/2
130 
131 % Two ranges for the universal joint connecting the palm and finger 2
132 phi_2_1_min:=-15*pi/180
133 phi_2_1_max:= 15*pi/180
134 
135 phi_2_2_min:=0
136 phi_2_2_max:=pi/2
137 
138 % Range for the first rotation in finger 2
139 phi_2_3_min:=0
140 phi_2_3_max:=pi/2
141 
142 % Range for the second rotation in finger 2
143 phi_2_4_min:=0
144 phi_2_4_max:=pi/2
145 
146 % Two ranges for the universal joint connecting the palm and finger 3
147 phi_3_1_min:=-15*pi/180
148 phi_3_1_max:= 15*pi/180
149 
150 phi_3_2_min:=0
151 phi_3_2_max:=pi/2
152 
153 % Range for the first rotation in finger 2
154 phi_3_3_min:=0
155 phi_3_3_max:=pi/2
156 
157 % Range for the second rotation in finger 2
158 phi_3_4_min:=0
159 phi_3_4_max:=pi/2
160 
161 % Two ranges for the universal joint connecting the palm and finger 4
162 phi_4_1_min:=-15*pi/180
163 phi_4_1_max:= 15*pi/180
164 
165 phi_4_2_min:= pi/2
166 phi_4_2_max:= 3*pi/2
167 
168 % Range for the first rotation in finger 2
169 phi_4_3_min:=0
170 phi_4_3_max:=pi/2
171 
172 % Range for the second rotation in finger 2
173 phi_4_4_min:=0
174 phi_4_4_max:=pi/2
175 
176 % Radius of the cylinders representing the fingers
177 rf:=20
178 
179 % Radius of the spheres representing rotulas
180 rr:=25
181 
182 % Radius of the spheres representing contact points on the object
183 rc:=5
184 
185 [LINKS]
186 
187 % palm
188  palm: body "bodies/palm.off" color (0.75,0.75,0)
189 
190 % finger 1
191  p12: sphere rr (0,0,0) color (0.30,0.9,0.1)
192  cylinder rf (0,0,0)
193  (p_1_2,0,0) color (0.25,0.6,0.6)
194 
195  p13: sphere rr (0,0,0) color (0.30,0.9,0.1)
196  cylinder rf (0,0,0)
197  (p_1_3,0,0) color (0.25,0.6,0.6)
198 
199  p14: sphere rr (0,0,0) color (0.3,0.9,0.10)
200  cylinder rf (0,0,0)
201  (p_1_4,0,0) color (0.3,0.5,0.98)
202  sphere rf (p_1_4,0,0) color (0.3,0.5,0.98)
203 
204 % finger 2
205  p22: sphere rr (0,0,0) color (0.30,0.9,0.1)
206  cylinder rf (0,0,0)
207  (p_2_2,0,0) color (0.25,0.6,0.6)
208 
209  p23: sphere rr (0,0,0) color (0.30,0.9,0.1)
210  cylinder rf (0,0,0)
211  (p_2_3,0,0) color (0.25,0.6,0.6)
212 
213  p24: sphere rr (0,0,0) color (0.3,0.9,0.10)
214  cylinder rf (0,0,0)
215  (p_2_4,0,0) color (0.3,0.5,0.98)
216  sphere rf (p_2_4,0,0) color (0.3,0.5,0.98)
217 
218 % finger 3
219  p32: sphere rr (0,0,0) color (0.30,0.9,0.1)
220  cylinder rf (0,0,0)
221  (p_3_2,0,0) color (0.25,0.6,0.6)
222 
223  p33: sphere rr (0,0,0) color (0.30,0.9,0.1)
224  cylinder rf (0,0,0)
225  (p_3_3,0,0) color (0.25,0.6,0.6)
226 
227  p34: sphere rr (0,0,0) color (0.3,0.9,0.10)
228  cylinder rf (0,0,0)
229  (p_3_4,0,0) color (0.3,0.5,0.98)
230  sphere rf (p_3_4,0,0) color (0.3,0.5,0.98)
231 
232 % finger 4
233  p42: sphere rr (0,0,0) color (0.3,0.9,0.10)
234  cylinder rf (0,0,0)
235  (p_4_2,0,0) color (0.25,0.6,0.6)
236 
237  p43: sphere rr (0,0,0) color (0.3,0.9,0.10)
238  cylinder rf (0,0,0)
239  (p_4_3,0,0) color (0.25,0.6,0.6)
240 
241  p44: sphere rr (0,0,0) color (0.3,0.9,0.10)
242  cylinder rf (0,0,0)
243  (p_4_4,0,0) color (0.3,0.5,0.98)
244  sphere rf (p_4_4,0,0) color (0.3,0.5,0.98)
245 
246  % object: one small circle at the contact points plus cylinders
247  % connecting the contact points (representing the object body).
248  object: 0.75*red
249  sphere rc (x_1_x,x_1_y,x_1_z)
250  sphere rc (x_2_x,x_2_y,x_2_z)
251  sphere rc (x_3_x,x_3_y,x_3_z)
252  sphere rc (x_4_x,x_4_y,x_4_z)
253  cylinder rc*0.5 (x_1_x,x_1_y,x_1_z) (x_2_x,x_2_y,x_2_z)
254  cylinder rc*0.5 (x_1_x,x_1_y,x_1_z) (x_3_x,x_3_y,x_3_z)
255  cylinder rc*0.5 (x_1_x,x_1_y,x_1_z) (x_4_x,x_4_y,x_4_z)
256  cylinder rc*0.5 (x_2_x,x_2_y,x_2_z) (x_3_x,x_3_y,x_3_z)
257  cylinder rc*0.5 (x_2_x,x_2_y,x_2_z) (x_4_x,x_4_y,x_4_z)
258  cylinder rc*0.5 (x_3_x,x_3_y,x_3_z) (x_4_x,x_4_y,x_4_z)
259 
260 [JOINTS]
261 
262 % finger 1
263  universal: palm (q_1_1_x,q_1_1_y,q_1_1_z)+(1,0,0)
264  p12 (0,0,0)+(0,1,0)
265  range [phi_1_1_min,phi_1_1_max] +(0,-1,0)
266  [phi_1_2_min,phi_1_2_max] +(1, 0,0)
267 
268  revolute: p12 (p_1_2,0,0)+(0,-1,0)
269  p13 (0,0,0)+(0,-1,0)
270  range [phi_1_3_min,phi_1_3_max] +(1,0,0) +(1,0,0)
271 
272  revolute: p13 (p_1_3,0,0)+(0,-1,0)
273  p14 (0,0,0)+(0,-1,0)
274  range [phi_1_4_min,phi_1_4_max] +(1,0,0) +(1,0,0)
275 
276 % finger 2
277  universal: palm (q_2_1_x,q_2_1_y,q_2_1_z)+(1,0,0)
278  p22 (0,0,0)+(0,1,0)
279  range [phi_2_1_min,phi_2_1_max] +(0,-1,0)
280  [phi_2_2_min,phi_2_2_max] +(1, 0,0)
281 
282  revolute: p22 (p_2_2,0,0)+(0,-1,0)
283  p23 (0,0,0)+(0,-1,0)
284  range [phi_2_3_min,phi_2_3_max] +(1,0,0) +(1,0,0)
285 
286  revolute: p23 (p_2_3,0,0)+(0,-1,0)
287  p24 (0,0,0)+(0,-1,0)
288  range [phi_2_4_min,phi_2_4_max] +(1,0,0) +(1,0,0)
289 
290 % finger 3
291  universal: palm (q_3_1_x,q_3_1_y,q_3_1_z)+(1,0,0)
292  p32 (0,0,0)+(0,1,0)
293  range [phi_3_1_min,phi_3_1_max] +(0,-1,0)
294  [phi_3_2_min,phi_3_2_max] +(1, 0,0)
295 
296  revolute: p32 (p_3_2,0,0)+(0,-1,0)
297  p33 (0,0,0)+(0,-1,0)
298  range [phi_3_3_min,phi_3_3_max] +(1,0,0) +(1,0,0)
299 
300  revolute: p33 (p_3_3,0,0)+(0,-1,0)
301  p34 (0,0,0)+(0,-1,0)
302  range [phi_3_4_min,phi_3_4_max] +(1,0,0) +(1,0,0)
303 
304 % finger 4
305  universal: palm (q_4_1_x,q_4_1_y,q_4_1_z)+(-1,0,0)
306  p42 (0,0,0)+(0,-1,0)
307  range [phi_4_1_min,phi_4_1_max] +(0,-1,0)
308  [phi_4_2_min,phi_4_2_max] +(1, 0,0)
309 
310  revolute: p42 (p_4_2,0,0)+(0,-1,0)
311  p43 (0,0,0)+(0,-1,0)
312  range [phi_4_3_min,phi_4_3_max] +(1,0,0) +(1,0,0)
313 
314  revolute: p43 (p_4_3,0,0)+(0,-1,0)
315  p44 (0,0,0)+(0,-1,0)
316  range [phi_4_4_min,phi_4_4_max] +(1,0,0) +(1,0,0)
317 
318 % contacts finger-object
319  revolute: p14 (q_1_4_x,q_1_4_y,q_1_4_z)+(mhat_1_x,mhat_1_y,mhat_1_z)
320  object (x_1_x,x_1_y,x_1_z)+(nhat_1_x,nhat_1_y,nhat_1_z)
321 
322 
323  revolute: p24 (q_2_4_x,q_2_4_y,q_2_4_z)+(mhat_2_x,mhat_2_y,mhat_2_z)
324  object (x_2_x,x_2_y,x_2_z)+(nhat_2_x,nhat_2_y,nhat_2_z)
325 
326 
327  revolute: p34 (q_3_4_x,q_3_4_y,q_3_4_z)+(mhat_3_x,mhat_3_y,mhat_3_z)
328  object (x_3_x,x_3_y,x_3_z)+(nhat_3_x,nhat_3_y,nhat_3_z)
329 
330  revolute: p44 (q_4_4_x,q_4_4_y,q_4_4_z)+(mhat_4_x,mhat_4_y,mhat_4_z)
331  object (x_4_x,x_4_y,x_4_z)+(nhat_4_x,nhat_4_y,nhat_4_z)
332 
333