AIM:forword kinamatics of 2-R robotic arm maniplater.
CODE:
% forword kinametics of 2R robotic arm manuplater
clear all
close all
clc
%inputs
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.03)
M(ct)=getframe(gcf);
ct=ct+1;
end
end
movie(M)
videofile=VideoWriter('forword kinametic of 2R robotic arm progr_1.m');
open(videofile)
writevideo(videofile,M)
close(videofile)
EXPLANATION:
1.To write a code of forword kinametics of 2-R robotic arm maniplater.
2.firstly by using clear all,close all,clc commands before write a code.
3.after we give the inputs length of link 1 and link 2 of robotic arms.
4. And inputs of two links angles theta1 and theta2 we give 0to90 of 10 values by
using linspace cammand and inputs of co-ordinates of each link.
5.by using for loop to give the ten values of two angles.because of to convert
animation.
6.link1 have ten values link2 also ten values maniplater move all angles.
7. and we use ct cammand to reduse the plot size and increment to ct+1.
8.axis gived to -0.1to1.5.
9.plots are appiars like animated view.
10.after we canvert to movie form as shown above the using cammands.
RESULT:Farward kinametics of 2-R robotic arm maniplater works appiars like animated
view.
CONCLUSION:forword kinamatics of 2-R robotic arm maniplater using MATLAB is done.