Project

STIMULATING THE FORWARD KINEMATICS OF A 2R ROBOTICS ARM

AIM: To write a program in Matlab to simulate the forward kinematics of a 2R Robotic Arm
SOFTWARE: MATLAB R2019b
PURPOSE OF ASSIGNMENT: To learn the forward kinematics movement a 2R Robotic Arm
FORWARD KINEMATICS: Forward kinematics refers to the use of the kinematic equations of a robot to compute the position of the end-effector from specified values for the joint parameters.
KINEMATICS EQUATION:
The kinematics equations for the series chain of a robot are obtained using a rigid transformation [Z] to characterize the relative movement allowed at each joint and separate rigid transformation [X] to define the dimensions of each link. The result is a sequence of rigid transformations alternating joint and link transformations from the base of the chain to its end link, which is equated to the specified position for the end link

where [T] is the transformation locating the end-link. These equations are called the kinematics equations of the serial chain.
CODE WORK:

% FORWARD KINEMATICS OF A 2R ROBOTICS ARM MANIPULATOR using for loop
clear all 
close all
clc

%INPUTS
L1 = 1;
L2 = 1.5;
theta1 = linspace(0,90,15);
theta2 = linspace(0,90,15);
ct=1;
for n = 1:length(theta1)
   THETA1 = theta1(n); 
   for o = 1:length(theta2)
       THETA2 = theta2(o);
       %CO-ORDINATES
%LINK 1
x0 = 0;
y0 = 0;

x1 = L1*cosd(THETA1);
y1 = L1*sind(THETA1);

%CO-ORDINATES 
%LINK 2

x2 = x1+L2*cosd(THETA2);
y2 = y1+L2*sind(THETA2);

%Plotting

plot([x0 x1],[y0 y1],[x1 x2],[y1 y2],'linewidth',6)
axis([-0.1 2.5 0 2.5])
pause(0.02)
M(ct) = getframe(gcf);
ct=ct+1;
  
     
   
   end
   
       
end

movie(M)
videofile = VideoWriter('FORWARD_KINEMATICS_OF_A_2R_ROBOTICS_ARM_MANIPULATOR_using_for_loop','uncompressed AVI');
open(videofile)
writeVideo(videofile,M)
close(videofile)

ERROR:

VIDEO LINK: https://youtu.be/lVj2WUrHMfQ

CONCLUSION: We learned the skill how to stimulate the forward kinematics of a 2R Robotic Arm using MATLAB

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.