CS 4733 Notes: Stanford Arm Inverse Kinematics

CS 4733 Notes: Stanford Arm Inverse Kinematics

CS 4733 Notes: Stanford Arm Inverse Kinematics Figure 1: Stanford Robotic Arm. The frame diagram shows the first three joints, which are in a R-R-P configuration (Revolute-Revolute-Prismatic. 1. To solve inverse kinematics for the ®rst 3 joints of the Stanford arm we ®rst look 0 at the matrix T3 : C1C2 S1 C1S2 C1S2d3 S1d2 Nx Sx Ax Px 2 − − 3 2 3 0 S1C2 C1 S1S2 S1S2d3 + C1d2 Ny Sy Ay Py T 6 7 6 7 3 = 6 7 = 6 7 6 S2 0 C2 C2d3 + d1 7 6 Nz Sz Az Pz 7 6 7 6 7 6 − 7 6 7 6 0 0 0 1 7 6 0 0 0 1 7 4 5 4 5 Looking at P (last column of matrix) there are no obvious relationships that isolate a single joint variable (Θ1,Θ2,d3). 2. The technique we employ is to try to rearrange the equations hoping a single variable can be isolated. 0 0 1 2 T3 = T1 T2 T3 0 1 Multiplying both sides (on the left) by (T1 )− we get 0 1 0 1 2 1 (T1 )− T3 = T2 T3 = T3 1 The matrices are below with only the fourth column ®lled in: C1Px + S1P y S2d3 2 j j j 3 2 j j j 3 0 1 0 Pz + d1 C2d3 1 T T 6 7 6 7 T ( 1 )− 3 = 6 j j j − 7 = 6 j j j − 7 = 3 6 S1Px + C1P y 7 6 d2 7 6 7 6 7 6 j j j − 7 6 j j j 7 6 1 7 6 1 7 4 j j j 5 4 j j j 5 We can equate the third entry in last column in each matrix: S Px + C Py = d (1) − 1 1 2 We have now isolated Θ1. To solve for Θ1, de®ne auxiliary variables r and Φ: r P 2 P 2 atan P ; P = r x + y ; Φ = 2( y x) Substitute in (1) for Px,Py : Px = r C φ, Py = r S φ S rCφ + C rSφ = d − 1 1 2 r(SφC S Cφ) = d 1 − 1 2 d S(φ Θ ) = 2 − 1 r and by the fact that C = p1 S2 − d r2 d2 v 2 2 2 C(φ Θ1) = u1 ( ) = q − u − t − r r d2 S(φ Θ1) r d2 − = 2 2 = C φ pr d2 2 2 ( Θ1) − r d2 − r q − 2 2 φ Θ1 = atan2 d2; r d − q − 2 Solving for Θ1, we get Θ = φ atan d ; r2 d2 1 − 2 2 q − 2 2 2 Θ = atan (Py; Px) atan d ; r d 2 solutions 1 2 − 2 2 q − 2 − 2 Figure 2: Geometric analysis of Stanford Arm Geometrically, the ®gure above describes what the solution for Θ1 is all about. Project vector (Px; Py; Pz) onto the unit vector axis which is along the direction of d2. The unit vector axis along d2 is simply the direction of the Y axis after a rotation of Θ1. S1 2 − 3 Px Py Pz C1 = d2 S1Px + C1Py = d2 h i 6 7 6 7 ! − 6 0 7 4 5 d C(Θ + 90 φ) = 2 = C(90 (φ Θ )) = S(φ Θ ) 1 − r − − 1 − 1 d d r2 d2 2 v 2 2 2 If S(φ Θ1) = then C(φ Θ1) = u1 ( ) = q − u − r − t − r r Since we know angle φ = atan2(Py; Px) we can ®nd Θ1. 3 d = 1 2 y θ 1 = 0 , θ 2 = 90 d 3 = 3 ¡ ¡ P ( 3, 1) x d = 3 £ £ 3 ¢ ¢ P (-1, 3) P (-1, 3) d 2 = 1 θ1 y y θ =−30 θ = 90 , θ = 90 1 1 2 θ 2 = 90 x x Figure 3: Top: Arm with Θ1 = 0 , Θ2 = 90. Bottom: multiple solutions for Θ1 when P = ( 1; p3; 0) − 3. Example: if Θ2 = 90◦, then the manipulator looks as in ®gure 3(top). (assume d3 = p3; d2 = 1). Now rotate Θ by 90 and P = ( 1; p3; 0) (bottom part of ®gure 3). 1 − Using the formula for Θ1: 2 2 Θ1 = atan2(Py; Px) atan2(d2; r d ) − q − 2 = atan (p3; 1) atan (1; p3) 2 − − 2 Θ1 = 120 30 = 90 or − 120 150 = 30 − − These are the 2 solutions for Θ1. 4 z 0 A (P ,P ,P ) x y z d 3 d2 90−θ 2 d B x1 1 y1 C (P x ,P y ,d 1 ) x0 y0 A (-S 1 , C 1) θ 1 y0 d3 Pz - d1 (C1 , S1 ) C B x0 C1 Px + S 1 Py Figure 4: Geometry for finding Θ2 5 0 1 0 1 2 1 4. To ®nd Θ2 from our relationship (T1 )− T3 = T2 T3 = T3 we notice that: S2d3 C1Px + S1Py T an Θ2 = = C d Pz d 2 3 − 1 or Θ = atan (C Px + S Py; Pz d ) 2 2 1 1 − 1 Figure 4 shows the geometric relationships for ®nding Θ2. As in the previous section, the distance CB in ®gure 4 is the projection of the vector (Px; Py; Pz) onto the unit vector axis which is along the direction of the X axis rotated by Θ1. C1 2 3 Px Py Pz S1 = C1Px + S1Py h i 6 7 6 7 6 0 7 4 5 5. To ®nd d3 (3) C1Px + S1Py = S2d3 (4) Pz + d = C d − 1 − 2 3 Multiply (3) by S2 and (4) by C2 then add the equations: 2 S2(C1Px + S1Py) = S2d3 + C ( P z + d ) = C2d 2 − 1 3 S (C Px + S Py) + C (Pz d ) = d 2 1 1 2 − 1 3 6. Recapping 2 2 Θ = atan (Px; Py) atan (d ; pr d ) 1 2 − 2 2 − Θ = atan (C Px + S Py; Pz d ) 2 2 1 1 − 1 atan ( (C Px + S Py); d Pz) 2 − 1 1 1 − d = S (C Px + S Py) + C (Pz d ) 3 2 1 1 2 − 1 if P = ( 1; p3; 5), and assume d = 5 and d = 1: − 1 2 Θ Θ S C S C S (C Px + S Py) + C (Pz d ) = d 1 2 1 1 2 2 2 1 1 2 − 1 3 90 90 1 0 1 0 p3 90 -90 1 0 -1 0 p3 − -30 -90 1 p3 -1 0 p3 −2 2 -30 90 1 p3 1 0 p3 −2 2 − 6 1 y 120 o 1 3 3 ¡ ¡ P ( 3, 1, 5) x Figure 5: Multiple solutions of arm for P = (p3; 1; 5) 7. Find a solution if P = (p3; 1; 5) assume d2 = 1 and d1 = 5. Θ Θ S C S C S (C Px + S Py) + C (Pz d ) = d 1 2 1 1 2 2 2 1 1 2 − 1 3 0 90 0 1 1 0 p3 0 -90 0 1 -1 0 p3 − -120 -90 p3 1 -1 0 p3 − 2 −2 -120 90 p3 1 1 0 p3 − 2 −2 − Θ = atan (1; p3) atan (1; p3) = 30 30 = 0 1 2 − 2 − = atan (1; p3) atan (1; p3) = 30 150 = 120 2 − 2 − − − Θ2 = atan2(p3; 0) = 90◦ = atan ( p3; 0) = 90◦ 2 − − Geometrically : 4 solutions in all. Figure 5 shows 2 - the other 2 are simply with a negative value of r. 7 Calculating Angles from Sin, Cos,Tan There will be many situations in robotic calculations where the magnitude of the sine, cosine, or tangent • of an angle is known, and we need to calculate the magnitude of the angle. Although this seems to be a trivial matter, in reality, it is very important, because there can be grave ambiguities in the answer that may yield an erroneous result, stopping a robot controller from functioning properly. This is true even with a calculator or a computer. To understand this, let's do a simple calculation. Suppose that you use your calculator to calculate sin 75◦ as 0.966. If you enter the same number into your • ◦ calculator and calculate the angle from it, you will ®nd the same 75 angle. However, if you do the same with sin 105◦, you will ®nd the same 0.966 as before. Here lies the basic error. The sine of two angles with equal distance from 90◦ is always the same, and thus the calculator always returns the smaller angle. The same is true for cosine and tangent of an angle; the cosine of the plus or minus of the same angle is the same, while the tangent of an angle is the same if 180◦ is added to it. To know the exact magnitude of an angle, it is necessary to determine in what quadrant the angle lies. • This will enable us to correctly know what the angle really is. However, to determine the quadrant of an angle, it is necessary to know the signs of both the sine and the cosine of the angle. In the previous example, if you calculate the values of cos 75◦ and cos 105◦, you will notice that they are • ◦ ◦ respectively 0.259 and -0.259. Considering both the sines and the cosine of 75 and 105 , we can easily calculate their correct values. The same principle is true for the tangent of an angle. In robotic calculations, we will encounter the same situation, where tan of angles are generally found. If • the simple atan (arctan) function of a calculator or computer is used, it may yield an erroneous result.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us