WORKING AND SIMULATION OF FORWARD KINEMATICS OF A 2R-ROBOTIC ARM
AIM:
To create and simulate the forward kinematics of a 2R-Robotic arm.
OBJECTIVES:
- To understand the working and the principles of a 2R-Robotic arm.
- To simulate the movement of the manipulator attached and understand the geometry behind it.
INTRODUCTION:
Robots and automated machines have changed the way we saw the world. The robotic arm, is more like a mechanical arm, usually, programmable, to act like a human arm. It can be made of different components or it may be itself a part of a complex robot. The geometry behind this robotic arm is attached following the text. Here, we can see the manipulator is the main component that we need to do our work as it may be a soldering rod, a paint-brush and etc. So, it is necessary that we build it geometrically perfect and program it to our needs.
SIMULATION OF THE MODEL:
The model of a simple robotic arm was programmed and simulated in MATLAB for better understanding of its movement. The movement of the second arm w.r.t to the movement of the first arm is an essential part of its designing as any fault can result in huge damage.
The program can be referred in the following:
%% SIMULATION OF FORWARD KINEMATICS OF A 2R ROBOTIC ARM
clear all;
close all;
clc;
%% Initialization of parameters
l1 = 1.5; % length of the arm from first rotary joint to the stand (in m)
l2 = 1; % length of the arm from second rotary joint to first rotary joint (in m)
theta1 = linspace(0,90,20); % angle between stand and first arm
theta2 = linspace(0,45,20); % angle between first arm and second arm
[x0,y0] = deal(0); % coordinates of the first rotary joint
% Setting up the movie
movie = VideoWriter('2D_robotic_arm.avi');
open(movie)
%% Using iterations to simulate the mechanism
for i = 1:length(theta1)
for j = 1:length(theta2)
% coordinates of the second rotary joint
x1 = l1*cosd(theta1(i));
y1 = l1*sind(theta1(i));
% coordiantes of the manipulator
x2 = x1 + l2*cosd(theta2(j));
y2 = y1 + l2*sind(theta2(j));
% plotting
plot([x0 x1],[y0 y1],[x1 x2],[y1 y2],'linew',4)
axis([-0.5 2.5 0 2.5])
set(gca,'xtick',[],'ytick',[])
title('2R Robotic arm')
legend('First arm','Second arm')
% updating the movie frame
writeVideo(movie,getframe(gcf))
pause(0.1)
end
end
% writing out movie
close(movie)
The simulation of the robotic arm according to the program is as follows:
CONCLUSION:
Robots and A.I are going to be vital in the near future of mankind due to its precision and work-ability. But, it still lacks the decision-ability which can be done using Machine-Learning and stuff. Nevertheless, simulation and working of these incredible machines using MATLAB and other such softwares can prove to be handful in creation of these machines. Newcomers can learn about data animations using MATLAB which will help them in learning new dimensions of MATLAB.