Week 2- 2R Robotic Arm Challenge
Aim;
Write a program to Matlab application and simulate for given forward kinematics of a 2R robotic arm and show the video.
Eplanation;
A robotic arm is a links of manipulator is called end effector and manipulator connects by joints to allow rotational motion.

- (x0, y0) = Start point
- (x1, y1) = Start point to end point
- (x2, y2) = End point
- (L1, L2) = Length of links
- (theta1) = angle of x-axis
- (theta2) = angle of y-axis
Procedure;
Step 1: Start
Step 2: OPen the Matlab application
Step 3: Open editor window to type the program
Step 4: Then run program to command window
Step 5: Display the output and plot diagram
Step 6: Stop
Program;
%Forward robotic_arm
l1 = 2;
l2 = 1;
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);
%start point
x0 = 0;
y0 = 0;
%start point to end point
x1 = 1*cosd(THETA1)
y1 = 1*sind(THETA1)
%end point
x2 = x1 + l2*cosd(THETA2)
y2 = y1 + l2*sind(THETA2)
%plotting
plot([x0 x1],[y0 y1],[x1 x2], [y1 y2],'linewidth',3)
pause(0.1)
m(ct) = getframe(gcf);
ct=ct+1;
end
end
%movie
movie(m)
videofile = VideoWriter('forward_kinematicsrobotic_arm','uncompressed AVI')
open(videofile)
writeVideo(videofile,m)
close(videofile)
Output link;
https://drive.google.com/file/d/1mDUmoKM4Pxt8J9652CgnGv7jgqXFDxNp/view?usp=sharing
Conclusion;
The given program to simulate forward kinematics of a 2R robotic arm is executed successfully.