User Tools

Site Tools


2_link_kinematics

This is an old revision of the document!


2-Link Kinematics of Planar Robotic Arm

Author: Norberto Torres-Reyes Email: [email protected]
Date: Last modified on 09/06/18
Keywords: kinematics, planar, robotic arm, 2 link


The photo above depicts a diagram for a 2-link planar robotic arm. The big picture problem is to be able to obtain kinematic equations for any given degree of freedom robotic arm. This tutorial shows you how to obtain the kinematics of a 2-link robotic arm in order to solve for the joint angles given an arbitrary end-effector position.

Motivation and Audience

This tutorial's motivation is to <fill in the blank>. Readers of this tutorial assumes the reader has the following background and interests:

* Knows How to Use Matlab
* Perhaps also knows linear algebra.
* Perhaps additional background needed may include knowledge of kinematics


The rest of this tutorial is presented as follows:

  • Background And Theory
  • Numerical Simulation
  • Graphical Simulation
  • Final Words

Background and Theory

This section provides a short background of the problem and basic theory used.

Forward Kinematics


The image above shows a diagram of the 2-link robotic arm that will be used in this example. The forward kinematics are used to calculate the joint angles. This is done using planar transformations to go from the origin plane to the end-effector plane using the equation below.
Each matrix “A” is obtained using the Denavit-Hartenberg parameters.

Denavit-Hartenberg (DH) Parameters

The DH-parameters (theta_j, d_j, a_j, alpha_j) are obtained from a set of rules that can be easily referenced online.
*The first parameter, the joint angle, is labeled on the diagram and is the angle from the previous x-axis to the new x-axis about the old z-axis.
*The Link Offset is the distance from the origin of the previous frame of reference to the new x-axis along the old z-axis.
*The link length is the distance between the old z-axis and the new z-axis along the new x-axis.
*Finally, the Link Twist is the angle from the old z-axis to the new z-axis about the new x-axis.

The parameters obtained can be substituted into the “A” matrix below for each transformation (with j = 1,2):

Numerical Simulation - MatLab



clear; clc; format compact;

L1 = 1;
L2 = 1;

L(1) = Link([0 0 L1 0]);
L(2) = Link([0 0 L2 0]);

TwoLink_arm = SerialLink(L, 'name', '2Link Arm');


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)
T =

   1     0     0     1
   0     1     0     0
   0     0     1     0
   0     0     0     1

» q = TwoLink_arm.ikine(T,'mask',[1 1 0 0 0 0],'q0',[1 0])
q =

  1.0472   -2.0944

» p = TwoLink_arm.fkine(q)

p =

  0.5000    0.8660         0         1
 -0.8660    0.5000         0 9.309e-13
       0         0         1         0
       0         0         0         1



The 'TwoLink_arm.plot(q)' function along with the joint angles can be used to plot the position of the robotic arm with the given angles, shown in the image below with the end-effector at (1,0).

Graphical Simulation


TBA

Final Words


TBA

For questions, clarifications, etc, Email: torresre@unlv.nevada.edu

2_link_kinematics.1536641063.txt.gz · Last modified: 2018/09/10 21:44 by ntorresreyes