KINAMATIC OF 2R ROBOTIC ARMS IN MATLAD
AIM : To stimulate the forward kinematic of 2R robotic arms.
OBJECTIVE:
- Using matalb stimulate the kinematic of 2R robotic arms
- video presentation of the kinematic of 2R robotic arms
THEORY: Kinematics is the study of motion,apart from the force whiche produce that motion without considerration of the force which act upon it.
USES: its is used in several industries on material handling,for welding purposes,thermal handling.
figure shows that two links is their L1 & L2.L1 makes angle theta1 ,l2 makes angle theta2.
Programming in MATLAB for kinematic of 2R robotic arms
%input
l1=1;
l2=0.5;
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);
x0 = 0;
y0 = 0;
x1 = l1*cosd(THETA1);
y1 = l1*sind(THETA1);
x2 = x1+l2*cosd(THETA2);
y2 = y1+l2*sind(THETA2);
%plotting
plot([x0 x1],[y0 y1],[x1 x2],[y1 y2],'linewidth',3)
axis([-0.1 1.5 0 1.5])
pause(0.01)
M(ct)= getframe(gcf)
ct=ct+1;
end
end
movie(M)
videofile = VideoWriter('robotics_arms.avi','Uncompressed AVI');
open(videofile)
writeVideo(videofile,M)
close(videofile)
EXPLANATION: Assign the inputs value:
l1=1(link1)
l2=0.5(link2)
theta1=linspace(0,90,10)
theta2=linspace(0,90,10)
linspace function used for varies 0 to 90 equally separeted in 10 values.
then , for loop work its define contionous work with certain restriction.
counter is used for increment the loop by 1.
pause function used for controlling the speed of frame .
movie(M) used for create movie of frame and M is an array.
videofile command used to assign in program.
Video presentation in kinematic of 2R robotic arms in MATLAB:
CONCULSION: To stimulate the kinematic of 2R robotis arms is done by using coding and animation.