All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
Aim To simulate the forward kinematics of a 2R Robotic Arm in matlab Introductiion Robots are progammable machine like some human capabilities.They are used in many industeries. These elemens can be arranged in different ways and can vary in different size. Thus robots are available in a wide variety of types in their…
Dipin K D
updated on 02 Nov 2022
Aim
To simulate the forward kinematics of a 2R Robotic Arm in matlab
Introductiion
Robots are progammable machine like some human capabilities.They are used in many industeries. These elemens can be arranged in different ways and can vary in different size. Thus robots are available in a wide variety of types in their mechanical cofiguration
code
clear all
close all
clc
%inputs
L1=1; %length of 'Arm link 1' in m
L2=0.5; %length of 'Arm link 2' in m
theta1 = linspace(0,90,10); %angle of bottom surface and arm link 1
theta2 = linspace(0,90,10); %angle of arm link 1 & arm link 2
ct=1; %counter variable
for i =1:length(theta1)
THETA1 = theta1(i);
for j=1:length(theta2)
THETA2 = theta2(j);
% three coordinates points
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); %plotting in graph
axis([-0.1 1.5 0 1.5])
grid on
pause(0.03) % pause command
M(ct) = getframe(gcf); % store movie frame
ct=ct+1; %increment
end
end
% movie stored in file (.avi)
movie(M)
videofile = VideoWriter('forward_kinematic.avi','Uncompressed AVI'); %write in '.avi format'
open(videofile); %write the file
writeVideo(videofile,M); %write the file
close(videofile)%close file
Step-Wise explanation
Youtube link for animation
Conclusion
1. Rectify the error in above images
2. Use the correct dimensions for 'accurate results'
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Project 2 - Rankine cycle Simulator
Aim: To calculate the performance of a Steam turbine Engine and plot the T-S and H-S diagram of a Rankine Cycle. Objective: To calculate the performance of a Steam turbine Engine.To plot the T-S and H-S diagram of a Rankine Cycle. Theory: Rankine Cycle: A rankine cycle is an idealised Thermodynamic cycle which governs…
23 Nov 2022 08:08 AM IST
Week 5 - Genetic Algorithm
AIM : To study about Genetic Algorithm and to calculate the global maxima of stalagmite function using Genetic Algorithm in MATLAB. OBJECTIVE : To study about Genetic Algorithm and Stalagmite function.To write a code in Matlab to optimise the stalagmite function and find the global maxima of the function.To plot graphs…
22 Nov 2022 07:46 PM IST
Week 4.1 - Solving second order ODEs
AIM: To solve an ODE and use the calculated information to animate the motion of the pendulum via matlab THEORY Pendulum have many applications and were utilized often before the digital age. They are used in clocks and metronomes due to regularity of their period. A…
12 Nov 2022 03:45 AM IST
Week 3.2 - 2R Robotic Arm Challenge
Aim To simulate the forward kinematics of a 2R Robotic Arm in matlab Introductiion Robots are progammable machine like some human capabilities.They are used in many industeries. These elemens can be arranged in different ways and can vary in different size. Thus robots are available in a wide variety of types in their…
02 Nov 2022 06:56 PM IST
Related Courses
0 Hours of Content
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.