Project

FORWARD KINEMATICS OF A 2R ROBOTIC ARM

AIM: To simulate the forward kinematic motion of a 2R robotic arm using MATLAB.

SOFTWARE USED: Matlab R2019

THEORY:

FORWARD KINEMATICS - Forward kinematics refers to the use of kinematic equations of a robotic arm to determine the motion of the various links of the manipulator,by knowing the joint angles and angular velocities of the arms.We use forward kinematics to trace the 'workspace' of the robotic arm which is very essential while working on minute and precise applications.With the help of geometry and angular positions the motion of a number of links with corresponding 'Degrees of freedom' can be traced.

WORKSPACE - Workspace is defined as the maximum possible regions the robotic arm can access.Determining the workspace of the manipulator is a very important part of robotics,to trace the maximum area that can be coverd by a robotic arm.

2R ROBOTIC ARM:

L1,L2 - Lengths of link1 and link2

`theta1,theta2`- angles of links 1 and 2, wrt the Base

(X0,Y0) - Starting point of link1 (fixed to base)

(X1,Y1) - Ending point of link1 and starting point of link2

(x2,y2) - Ending point of link2

PROGRAM:

close all
clear all 
clc

%inputs
l1=1;
l2=0.5;
theta1=linspace(0,90,10)
theta2=linspace(0,90,10)

ct=1;
for i=1:length(theta1)
    THETA1=theta1(i)
    for j=1:length(theta2)
        THETA2=theta2(j)
        x0=0
        y0=0
        
        x1=l1*cosd(THETA1);
        y1=l1*sind(THETA1);
        
        x2=x1+l2*cosd(THETA2);
        y2=y1+l2*sind(THETA2);
        
    %Plotting
    plot([x0 x1],[y0 y1],[x1 x2],[y1 y2],'linewidth',2)
    axis([-0.1 2 0 2])
    pause(0.03)
    M(ct)= getframe(gcf);
    ct=ct+1;
    
    
    end
end

movie(M)
videofile= VideoWriter('forward_kinematics.arm','uncompressed AVI');
open(videofile)
writeVideo(videofile,M)
close(videofile)

PLOT DIAGRAM:

VIDEO SIMULATION:

The plot simulation on the 2R Robotic arm can be seen in the link below,

ERRORS DURING SIMULATION:

Assigning the wrong theta1 and theta2 variables for x1,y1 and x2,y2; resulted in the wrong plot diagram,as the end points of the links were not rightly recognised by the system.

RESULT:

Thus by using Matlab program we are able to trace the workspace of the 2R Robotic arm.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.