universal.world
Go to the documentation of this file.
1 
2 [CONSTANTS]
3 
4 % Q1-P1 define the first rotation axis
5 % Both defined in the link1 refence frame
6 q1_x:=0
7 q1_y:=0
8 q1_z:=0
9 
10 p1_x:=1
11 p1_y:=0
12 p1_z:=0
13 
14 % Q2-R2 define the second rotation axis
15 % Both defined in the link2 refence frame
16 q2_x:=0
17 q2_y:=0
18 q2_z:=0
19 
20 r2_x:= 0
21 r2_y:= 1
22 r2_z:= 0
23 
24 % Tecall that when the joint is assembled Q1 and Q2 coincide and
25 % vectors Q1-P1 and Q2-R2 are orthogonal
26 
27 % Vector Q1-S1 is the reference vector for the 1st rotation
28 % (S is in the link1 reference frame)
29 % Vector Q2-R2 is coincident with vector Q1-S1 when the 1st rotation is 0
30 s1_x:= 0
31 s1_y:= 0
32 s1_z:= 1
33 
34 % Vector Q2-T2 is the reference vector for the 2nd rotation
35 % (T is in the link2 reference frame)
36 % Vector Q1-P1 is coincident with vector Q2-T2 when the 2nd rotation is 0
37 t2_x:= 0
38 t2_y:= 0
39 t2_z:=-1
40 
41 % Range of movements of the 1st rotation
42 r1:=1.5*pi/4
43 
44 % Range of movements of the 2nd rotation
45 r2:=1.5*pi/4
46 
47 % Offset for the 1st rotation
48 o1:=0
49 
50 % Offset for the 2nd rotation
51 o2:=0
52 
53 % Radius of the cylinders representing links
54 rcl:=0.1
55 % Radius of the cylinders representing joints
56 rcj:=0.05
57 
58 [LINKS]
59 
60  link1: 0.9*white
61  sphere rcl (0,2,0)
62  cylinder rcl (0,0.5,0) (0,2,0)
63  sphere rcl (0,0.5,0)
64  cylinder rcl (0,0.5,0) (-0.5,0.5,0)
65  sphere rcl (-0.5,0.5,0)
66  cylinder rcl (-0.5,0.5,0) (-0.5,0,0)
67  cylinder rcl (0,0.5,0) ( 0.5,0.5,0)
68  sphere rcl ( 0.5,0.5,0)
69  cylinder rcl ( 0.5,0.5,0) ( 0.5,0,0)
70  sphere rcl (-0.5,0,0)
71  sphere rcl (0.5,0,0)
72  cylinder rcj (-0.5,0,0)(0.5,0,0)
73 
74  link2: 0.1*white
75  sphere rcl (2,0,0)
76  cylinder rcl (0.5,0,0) (2,0,0)
77  sphere rcl (0.5,0,0)
78  cylinder rcl (0.5,0,0) (0.5,-0.25,0)
79  sphere rcl (0.5,-0.25,0)
80  cylinder rcl (0.5,-0.25,0) (0,-0.25,0)
81 
82  cylinder rcl (0.5,0,0) ( 0.5,0.25,0)
83  sphere rcl ( 0.5,0.25,0)
84  cylinder rcl ( 0.5,0.25,0) ( 0,0.25,0)
85 
86  sphere rcl (0,-0.25,0)
87  sphere rcl (0,0.25,0)
88  cylinder rcj (0,-0.25,0)(0,0.25,0)
89 
90 
91 [JOINTS]
92  UNIVERSAL: link1 (q1_x,q1_y,q1_z) (p1_x,p1_y,p1_z)
93  link2 (q2_x,q2_y,q2_z) (r2_x,r2_y,r2_z)
94  range [o1-r1,o1+r1] (s1_x,s1_y,s1_z)
95  [o2-r2,o2+r2] (t2_x,t2_y,t2_z)
96 
97