Challenge

Week 2- 2R Robotic Arm Challenge

AIM:simulate the forward kinematics of a 2R Robotic Arm using matlab

Theory :A robotic arm is a type of mechanical arm, usually programmable , with similar functions to a human arm. the arm may be the sum total of the mechanism or may be part of a more complex robot. The links of such a manipulator are connected by joints allowing either rotational motion or translational displacement.The links of the manipulator can be considered to form a kinematic chain. The terminus of the kinematic chain of the manipulator is called the end effector and it is analogous to the human hand.

Researchers have classified the robotic arm by showing its industrial application, medical application, and technology, It has been first introduced in the late 1930s by William Pollard and Harold A. Roseland, where they developed a sprayer that had about five degrees of freedom and an electric control system. Pollard's was called “first position controlling apparatus.” William Pollard never designed or built his arm, but it was a base for other inventors in the future

close all
clc

%Inputs assigned

l1 = 1; % the link 1
l2 = 0.5; % The this which is used for opration

theta1 = linspace(0,90,10); %the values of theta have been specfied
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);
%ploting
plot([x0 x1],[y0 y1],[x1 x2],[y1 y2],'LineWidth',10); % for ploting the graph values have been specfied
axis([-0.1 1.5 0 1.5])% values of the axis 
pause(.01) % the time interval give for the arm to move 
M(ct)=getframe(gcf);
cct=ct+1; % it specfices each and every frame
end 


end


movie(M) %to dump all the frame 
vidiofile=VideoWriter('forward','Uncompressed AVI'); % helps in saving as a vidio so that it can watched as vidio
open(vidiofile)
writeVideo(vidiofile,M)
close(vidiofile)

https://youtu.be/HkorK3mm0gw

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.