User Tools

Site Tools


2_link_kinematics

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
2_link_kinematics [2018/09/10 21:44] – [Graphical Simulation] ntorresreyes2_link_kinematics [2018/09/25 21:36] – [Background and Theory] ntorresreyes
Line 10: Line 10:
 <!-- Add a representative photo of your tutorial below.  Make it centered in the page --> <!-- Add a representative photo of your tutorial below.  Make it centered in the page -->
  
-{{ torres:tutorials:2_link_tutorial_1.png?200 |}}+{{ torres:tutorials:2_link_tutorial_1.png?400 |}}
  
 \\ \\
Line 29: Line 29:
 \\ \\
 The rest of this tutorial is presented as follows: The rest of this tutorial is presented as follows:
 +  * Homogeneous Transformations
   * Background And Theory   * Background And Theory
-  * Numerical Simulation+  * Analytical Solution 
 +  * Numerical Solution
   * Graphical Simulation   * Graphical Simulation
   * Final Words   * Final Words
Line 37: Line 39:
  
 This section provides a short background of the problem and basic theory used. This section provides a short background of the problem and basic theory used.
 +\\
 +\\
 +** Homogeneous Transformations **
 +\\
 +\\
 +{{:torres:tutorials:2_link_tutorial_9.png?450|}}
 +\\
 +\\
 +In this case, we will only consider 2-dimensional homogeneous transformations. First, we must introduce homogeneous coordinates:
 +\\
 +\\
 +Vector v = [x y w]<sup>T</sup> , where scale factor w = 1
 +\\
 +\\
 +These coordinates are useful in applying rotations and translations and make transformations simpler than in Cartesian coordinates.
 +We can apply an elementary rotation about the z-axis (normal to the page) with matrix:
 +\\
 +\\
 +[R<sub>z</sub>] = [<sup>A</sup>x<sub>B</sub> <sup>A</sup>y<sub>B</sub> <sup>A</sup>z<sub>B</sub>]
 +\\
 +\\
 +Where <sup>A</sup>x,y,z<sub>B</sub> are the unit vectors along the x,y,z-axis of frame B w.r.t frame A. This results in:
 +\\
 +\\
 +{{:torres:tutorials:2_link_tutorial_10.png?300|}}
 +\\
 +\\
 +A translation vector **p** = p<sub>x</sub>i + p<sub>y</sub>j translates the origin of B from the origin of A. The given translation matrix **P** is given by:
 +\\
 +\\
 +{{:torres:tutorials:2_link_tutorial_11.png?200|}}
 +\\
 +\\
 +Next, the translation matrix can be multiplied by the rotation matrix to obtain the complete homogeneous transformation matrix:
 +\\
 +\\
 +{{:torres:tutorials:2_link_tutorial_12.png?nolink&300|}}
 \\ \\
 \\ \\
Line 71: Line 110:
 \\ \\
 ---- ----
 +<code>
 clear; clc; format compact;  clear; clc; format compact; 
  
-L1 = 1; \\+L1 = 1; 
 L2 = 1; L2 = 1;
  
-L(1) = Link([0 0 L1 0]); \\+L(1) = Link([0 0 L1 0]); 
 L(2) = Link([0 0 L2 0]); L(2) = Link([0 0 L2 0]);
  
-TwoLink_arm = SerialLink(L, 'name', '2Link Arm');+TwoLink_arm = SerialLink(L, 'name', '2Link Arm');  
 +</code>
 ---- ----
 The code above in Matlab creates a planar 2-link robotic arm class with arbitrary link lengths. From this, many functions can be used to do simulations and numerical analysis. For example, forward and inverse kinematics can be easily calculated. The code below translates the end-effector in the x-axis only and creates a transformation matrix. The 'ikine' function uses inverse kinematics to obtain the joint angles needed for the end-effector to achieve the desired position. The 'fkine' function takes in arbitrary joint angles and will return the position of the end-effector. The code above in Matlab creates a planar 2-link robotic arm class with arbitrary link lengths. From this, many functions can be used to do simulations and numerical analysis. For example, forward and inverse kinematics can be easily calculated. The code below translates the end-effector in the x-axis only and creates a transformation matrix. The 'ikine' function uses inverse kinematics to obtain the joint angles needed for the end-effector to achieve the desired position. The 'fkine' function takes in arbitrary joint angles and will return the position of the end-effector.
 \\ \\
 ---- ----
-T = transl(1,0,0) \\+<code> 
 +T = transl(1,0,0)
 T = T =
                  1                  1
Line 90: Line 132:
                  0                  0
                  1                  1
->> q = TwoLink_arm.ikine(T,'mask',[1 1 0 0 0 0],'q0',[1 0]) \\+>> q = TwoLink_arm.ikine(T,'mask',[1 1 0 0 0 0],'q0',[1 0]) 
 q = q =
     1.0472   -2.0944     1.0472   -2.0944
->> p = TwoLink_arm.fkine(q) \\+>> p = TwoLink_arm.fkine(q) 
  
 p =  p = 
Line 100: Line 142:
                                  0                                  0
                                  1                                  1
 +</code>
  
 \\ \\
2_link_kinematics.txt · Last modified: 2018/09/27 01:12 by ntorresreyes