@@ -13,13 +13,6 @@ def transformation_matrix(self):
1313 a = self .dh_params_ [2 ]
1414 d = self .dh_params_ [3 ]
1515
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- '''
2316 st = math .sin (theta )
2417 ct = math .cos (theta )
2518 sa = math .sin (alpha )
@@ -196,16 +189,3 @@ def plot(self):
196189 self .ax .set_ylim (- 1 , 1 )
197190 self .ax .set_zlim (- 1 , 1 )
198191 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