Challenge

FINAL INDEPENDENT PROJECT

My project:-

Forward kinematics of 4 arm robot

geomentrical details:-

It has four arms of length

arm one length is 3 units

arm two length is 2 units

arm three length is 1 unit

arm four length is 0.5 units

Applications:-

Now,a days this robots become most important tool in eatch and every industry from small industry to a large scale industry to perform many operations.Evolution of thuis robots give birth of the industrial age. This robots also decrease human effort and have many advantages .This robots are used in industries where human can,t work or take a lot of time to perform same operation but still not accurate as a robot.Most commonely this robots are used to perform operations such as:

1)weldind comlex shapes

2)used in forging shops

3)used to lift bodyes of cars in automobile industries

4)used in painting of parts

5)robotic assemblies

6)robotic part transfers

etc................

code for 4R robot :-

clear all
close all
clc
%four arm robot forward kinematics
%assigning the length of arms
l4=0.5;
l3=1;
l2=2;
l1=3;
%assigning the value of theata(s)
theata1=linspace(0,90,10);
theata2=linspace(0,90,5);
theata3=linspace(0,90,4);
theata4=linspace(0,90,2);
ct=1

%plotting
for i=1:length(theata1);
    Theata1=theata1(i);
    for j=1:length(theata2);
        Theata2=theata2(j);
        for k=1:length(theata3);
            Theata3=theata3(k);
            for l=1:length(theata4);
                Theata4=theata4(l);
                x0=0;
                y0=0;
                x1=l1*cosd(Theata1);
                y1=l1*sind(Theata1);
                x2=l1+l2*cosd(Theata2);
                y2=l1+l2*sind(Theata2);
                x3=l1+l2+l3*cosd(Theata3);
                y3=l1+l2+l3*sind(Theata3);
                x4=l1+l2+l3+l4*cosd(Theata4);
                y4=l1+l2+l3+l4*sind(Theata4);
                
               plot([x0,x1],[y0,y1],[x1,x2],[y1,y2],[x2,x3],[y2,y3],[x3,x4],[y3,y4],'linewidth',3)
                 title('forward kinematics of 4R robot')
                 axis([-5 10 0 10])   
               pause(0.00009)
                
                M(ct)=getframe(gcf);
               ct=ct+1;
            end
        end
    end
end
movie(M);

%Creating a video file 
videofile=VideoWriter('forward_kinematics_of_4r_robotic_arm.avi','Uncompressed AVI');
open(videofile);
 
%Video  in videofilewriteVideo(videofile,M)
writeVideo(videofile,M)
close(videofile)

Explanation of code:-

1)starting code with clear all,close all,clc which make work space annd command window empty and close all previous plots close

2)assigning the lengths to arms as l1,l2,l3,l4

3)assigning angles to arms by using linspace command

4) assigning value to ct as 1 later it will be incremented as ct+1 in for loop

5) Now,plotting is to be done using for command with coordinats such s x0,y0,x1,y1.........etc

6)creates frames of 'm' using getfram

7)create a movie using m

8)create a video file with a name 'forward_kinematics_of_4R_robotic_arm'

9)imprint slides of m into vide file

10)close video file

video:-

https://youtu.be/TmM5jGtB-cw

Screen shot of windows:-

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.