Challenge

Week 2- 2R Robotic Arm Challenge

AIM-

program in Matlab to simulate the forward kinematics of a 2R Robotic Arm.

INTRODUCTION-

In this robotics arm like automobile ibdustries & aviation all the process like welding & painting are automatic.thies all the process are automatically done by robots.the design stage of robot need a work space  i.e range which upto arm can be reach.

GOVERNING EQUATION-

We will take a simple robotic arm use two link for for the program. as per below image we have two length (l1&l2) making two angles  with the horizontal axis respectively.

 

Link one is attached to the base and end of link is connected to thre other link 2 and end of link 2 is used to the which perform the disiear operation.

Equation of calculating the co ordinate of the link starting & ending point.

link1-

Starting point =[x0 ,y0]=[0,0]

Ending point=[x1,y1]=[l1cosd theta1,l1sind theta1]

link2-

Starting point =[x1 ,y1]=[l1cosd theta1,l1sind theta1]

Ending point=[x2,y2]=[x1+l2cosd theta2,y1+l2sind theta2]

PROGRAM-

clear all
clc
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=l1+l2*cosd(THETA2);
y2=l1+l2*sind(THETA2);
plot([x0 x1],[y0 y1],[x1 x2],[y1 y2],'linewidth',3);
axis([-0.1 1.7 0 1.7])
title('kinematics of 2R robotics arm')
xlabel('arm moment in x axis');
ylabel('arm moment in y axis');
pause(0.3);
M(ct) = getframe(gcf);
ct = ct+1;
grid on
end
end
movie(M);
videofile=VideoWriter('videountitled.m','Uncompressed AVI');
open(videofile)
writeVideo(videofile,M);
close(videofile);

 

ERRORS-

Error1- I have missing the clear all at the start of program.

clear all
clc
 
Error2- Ihave missing the for loop before the J.
for j=1:length(theta2);
 
Error3= speling missing titel insted of title.
 
Error 4=video not run.
 
 
You tube video link-
https://youtu.be/eezzZ_4WakM
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.