Challenge

Week 2- 2R Robotic Arm Challenge

AIM:To create a program to stimulate the forward kinematics of 2R Robotic Arm by using a matlab.

EXPLANATION OF FORWARD KINEMATICS ROBOTIC ARM:The process to obtain the position and velocity of end factor,given the known join angles and angular velocities.it also defined as the mechanism to perform the functions of the robot by programming for the industries and other applications.

1.when the link1 which is fixed with base.the angle between the base and link1 is 01, similarly the link2 which is movable arm thats make an angle 02.let us assumed the L1is fixed with origin at axis point (x0,y0)and the origin of link2 will be (x1,y1).the length of the links are L1 and L2 is showned in above figure.

EXPLANATION OF CODES:steps should be followed while typing programs should be explained given below.

1.create the parameters(i.e.inputs) which i have used in the program.

2.To provide a coordinates,as well as link lengths.

3.Angles should be consided as 'theta'.

4.linespace command is use to generate various angle.linespace means '(the initial value:final value:increamental value)'

5.To provide a for loop command to repeate the program.

6.plotting the variables.

7.create a frame array and also create the vedio by using the vedio command and as well as type the format of the vedio which could be saved.

%program to calculate 2R robotic arm
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.2 1.5 0 1.5]);
    m(ct)=getframe(gcf);
    ct=ct+1;    
    end
end
movie(m)
vediofile= VideoWriter('forward_kinematics.avi','Uncompressed AVI');
open(vediofile)
writeVideo(vediofile,m);
close(vediofile)

Errors in programming :

The error i have facing is missed to type the format to save the vediofile.after identified they should be solved.

vedio:kinematic linkages of 2r robotic arm

https://drive.google.com/file/d/12aasfGjWHhvu_xJs0HuzJTuAx9U3oYyR/view?usp=sharing

conslusion:

Thus we write a program to create a forward kinematics of 2R robotic arm using matlab and made a collective frame into vedio for the movement of forward kinematics linkages in the graph

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.