1
// this unit isn't used at all at the moment, just putting down some ideas
2
// for serial-link manipulators
15
// Joint(Z1) Joint(Z3)
27
// --------------------------------------------
28
// X(n) = Common normal between joint axis Z(n-1) & Z(n)
31
TGLBaseJoint = class(TObject)
34
TGLBaseLink = class(TObject)
37
TGLJoint = class(TGLBaseJoint)
38
Link1: TGLBaseLink; // if Link1 is nil, assumed to be base
39
Link2: TGLBaseLink; // if Link2 is nil, assumed to be wrist
40
// Object1:TGLBaseSceneObject;
41
// Object2:TGLBaseSceneObject;
44
// Links are mainly for used for Serial-Link manipulators
46
// Direct & Inverse Kinematics algorithms are planned
47
TGLLink = class(TGLBaseLink)
49
fLinkLength: Real; // Length of common normal which is orthogonal to both
50
// joint axes Z[n-1] and Z[n] (a.k.a. L)
51
fTwistAngle: Real; // Twist angle between joint axes, if joint frames were
52
// coincident (a.k.a. Theta?)
54
// Angle between common normals X[n-1] and X[n] (a.k.a. Alpha?)
56
// Distance along joint axis Z[n-1] between intersection
57
// points of common normals X[n-1] and X[n] (a.k.a. d)
61
// [ Cos(Theta) -Sin(Theta)*Cos(Alpha) Sin(Theta)*Sin(Alpha) L*Cos(Theta) ]
62
// [ Sin(Theta) Cos(Theta)*cos(Alpha) -Cos(Theta)*Sin(Alpha) L*Sin(Theta) ]
63
// [ 0 Sin(Alpha) Cos(Alpha) d ]
68
constructor Create(LinkLength, TwistAngle, LinkAngle, LinkDistance: Real);
69
// constructor Create();virtual;
72
// see html file for description of the different links
74
// Type 1 Two-Link Manipulator
87
TGLType1Link = class(TGLLink)
88
Length: Real; // fixed
89
Angle: Real; // variable
98
constructor Create(Length, Angle: Real);
101
// Type 2 Two-Link Manipulator
103
// / \___________________
104
// | + |___________________|
116
TGLType2Link = class(TGLLink)
117
Length: Real; // fixed
118
Angle: Real; // variable
119
constructor Create(Length, Angle: Real);
122
// Type 3 Two-Link Manipulator
125
// <-|_________| |__|->
135
TGLType3Link = class(TGLLink)
136
Length: Real; // fixed
137
Angle: Real; // variable
146
constructor Create(Length, Angle: Real);
149
TGLType4Link = class(TGLLink)
150
Length: Real; // fixed
151
Angle: Real; // variable
152
constructor Create(Length, Angle: Real);
155
// Type 5 Two-Link Manipulator
159
// <-|_____________|->
172
TGLType5Link = class(TGLLink)
173
Length: Real; // variable
174
constructor Create(Length, Angle: Real);
177
TGLType6Link = class(TGLLink)
178
Length: Real; // fixed
179
Angle: Real; // variable
180
constructor Create(Length, Angle: Real);
183
TGLType7Link = class(TGLLink)
184
Length: Real; // fixed
185
Angle: Real; // variable
186
constructor Create(Length, Angle: Real);
189
TGLType8Link = class(TGLLink)
190
Length: Real; // variable
191
constructor Create(Length, Angle: Real);
194
TGLPrismaticJoint = class(TGLJoint)
197
TGLRevoluteJoint = class(TGLJoint)
200
TGLBallAndSocketJoint = class(TGLJoint)
203
//======================================================================
205
//======================================================================
207
constructor TGLLink.Create(LinkLength, TwistAngle, LinkAngle,
210
fLinkLength := LinkLength;
211
fTwistAngle := TwistAngle;
212
fLinkAngle := LinkAngle;
213
fLinkDistance := LinkDistance;
216
constructor TGLType1Link.Create(Length, Angle: Real);
218
inherited Create(Length, 0, Angle, 0);
221
constructor TGLType2Link.Create(Length, Angle: Real);
223
inherited Create(Length, 0, Angle, 0);
226
constructor TGLType3Link.Create(Length, Angle: Real);
228
inherited Create(Length, 0, Angle, 0);
231
constructor TGLType4Link.Create(Length, Angle: Real);
233
inherited Create(Length, 0, Angle, 0);
236
constructor TGLType5Link.Create(Length, Angle: Real);
238
inherited Create(Length, 0, Angle, 0);
241
constructor TGLType6Link.Create(Length, Angle: Real);
243
inherited Create(Length, 0, Angle, 0);
246
constructor TGLType7Link.Create(Length, Angle: Real);
248
inherited Create(Length, 0, Angle, 0);
251
constructor TGLType8Link.Create(Length, Angle: Real);
253
inherited Create(Length, 0, Angle, 0);