Week 2- 2R Robotic Arm Challenge
INPUT CODES FOR ROBOTIC ARM
%This Program is all about Forward Kinematics of a Robotic Arm Manipulator
clear all
close all
clc
%Inputs will be used in this program be like
l1 = 1;
l2 = 0.45;
%angular inputs for this program be like
theta1 = linspace(0,90,10);
theta2 = linspace(0,90,10);
%after that I am using For loop iteration for the condition
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);
%After Initialize the condition, I need to plot the final result in
%the proper animation video
ct = 1;
plot([x0 x1],[y0 y1],[x1 x2],[y1 y2],'linewidth', 3)
axis([-0.1 1.5 0 1.75])
pause(0.03)
M(ct) = getframe(gcf);
ct = ct+1;
end
end
%M(ct) = getframe(gcf);
%ct = ct+1;
movie(M)
videofile = VideoWriter('forward.kinematics.avi', 'Uncompressed AVI');
open(videofile)
writeVideo(videofile, M)
close(videofile)
REPORT
ABSTRACT
This is the inital codes after several modification to analyze the movement of a ROBOTIC ARM. This code includes the basic coordinates location as well as the movement through the entire cartesian system.
INTRODUCTION
It starts with initial position of robotic armm. After we provide the instantaneous position in the relation with initial position. At last we define the final position by using the relation of initial and instantaneous position.
OBJECTIVE
To achieve our requirements according to the question statement we used an iterative coomand which runs until the condition get satisfied or the final limit reached. We used this recursive statement and use in plotting the achieved result according to the rules and limits.
RESULTS

SUMMARY
The final result we obtain is in a form of movie or we cal it as an animation of motion of the robotic arm through Cartesian plane. All the related proofs and designed codes is attached in the file which is clipped with this report. Please go through with that file for the reference during checking and grading of challenge.
Thankyou