@@ -13,13 +13,6 @@ def transformation_matrix(self):
13
13
a = self .dh_params_ [2 ]
14
14
d = self .dh_params_ [3 ]
15
15
16
- '''
17
- trans = np.array(
18
- [[math.cos(theta), -math.sin(theta), 0, a],
19
- [math.cos(alpha) * math.sin(theta), math.cos(alpha) * math.cos(theta), -math.sin(alpha), -d * math.sin(alpha)],
20
- [math.sin(alpha) * math.sin(theta), math.sin(alpha) * math.cos(theta), math.cos(alpha), d * math.cos(alpha)],
21
- [0, 0, 0, 1]])
22
- '''
23
16
st = math .sin (theta )
24
17
ct = math .cos (theta )
25
18
sa = math .sin (alpha )
@@ -196,16 +189,3 @@ def plot(self):
196
189
self .ax .set_ylim (- 1 , 1 )
197
190
self .ax .set_zlim (- 1 , 1 )
198
191
plt .show ()
199
-
200
- if __name__ == "__main__" :
201
- n_link_arm = NLinkArm ([[0. , - math .pi / 2 , .1 , 0. ],
202
- [math .pi / 2 , math .pi / 2 , 0. , 0. ],
203
- [0. , - math .pi / 2 , 0. , .4 ],
204
- [0. , math .pi / 2 , 0. , 0. ],
205
- [0. , - math .pi / 2 , 0. , .321 ],
206
- [0. , math .pi / 2 , 0. , 0. ],
207
- [0. , 0. , 0. , 0. ]])
208
-
209
- print (n_link_arm .forward_kinematics ())
210
- n_link_arm .set_joint_angles ([1 , 1 , 1 , 1 , 1 , 1 , 1 ])
211
- n_link_arm .plot ()
0 commit comments