All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
Simulate the Workspace of a 2R Robotic Arm using Matlab. AIM : To write a program in Matlab to simulate the forward kinematics of a 2R Robotic Arm. INTRODUCTION : The Robotic Arm is a type of Mechanical Arm which is programmable to perform different tasks. It is composed of a set of joints separated in space by the arm…
Vinit Velekar
updated on 12 Apr 2020
Simulate the Workspace of a 2R Robotic Arm using Matlab.
AIM : To write a program in Matlab to simulate the forward kinematics of a 2R Robotic Arm.
INTRODUCTION :
The Robotic Arm is a type of Mechanical Arm which is programmable to perform different tasks. It is composed of a set of joints separated in space by the arm links. The joints are where the motion in the arm occurs. In basic, a robot arm consists of different parts which are the base, joints, links, and a gripper. Workspace or work envelope is defined as the set of points representing the maximum and minimum extent or reach of the manipulator in all directions.
Description of a 2R Robotic Arm :
A 2R Robotic Arm consists of two links (l1,l2) and two rotational joints and is pivoted to the base as shown in the following figure. Let θ1 and θ2 be the angle made by the links l1 and l2 respectively with the horizontal axis. Let (x0,y0),(x1,y1),(x2,y2) be the co-ordinates of the points as shown.
In practice the Robotic Arm moves at different positions to perform a particular task. The simulation of workspace of 2R Robotic Arm can be done using Matlab.
MATLAB Program :
Inputs –
The values of links l1 and l2 are assumed to be 3m and 1.5m respectively and the angle made by the two links are in between 0o and 90o with an increment of 15o to obtain smooth animation. The values of x0 and y0 are considered to be 0 and x1,y1,x2,y2 are calculated by using trigonometric relations.
%Forward Kinemtacis of Robotic Arm Animation
clear all
close all
clc
%Inputs
%Assuming length of link 1 as 3m and length of link 2 as 1.5m.
l1 = 3;
l2 = 1.5;
%t1 and t2 are the angle of traverse of 1st arm and 2nd arm respectively
t1 = linspace(0,90,15);
t2 = linspace(0,90,15);
ct = 1;
for i = 1:length(t1)
T1 = t1(i);
for j = 1:length(t2)
T2 = t2(j);
x0 = 0;
y0 = 0;
x1 = l1*cosd(T1);
y1 = l1*sind(T1);
x2 = x1 + l2*cosd(T2);
y2 = y1 + l2*sind(T2);
%Plotting
plot([x0 x1],[y0 y1],[x1 x2],[y1 y2],'linewidth',3)
axis([-0.3 5 0 5])
title('2R Robotic Arm')
pause(0.01)
M(ct) = getframe(gcf);
ct=ct+1;
end
end
%Animation of Workspace of Arm
movie(M)
videofile = VideoWriter('Robotic_Arm.avi','Uncompressed AVI')
open(videofile)
writeVideo(videofile,M)
close(videofile)
Step-wise Explanation of the Code :
ERRORS :
ANIMATION :
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...
Week - 5 - Modelling Spotwelds
AIM : To model spotwelds for the given assembly of parts and run a crash test in LS-DYNA. OBJECTIVES: To create a rigidwall in LS-Dyna on which the spotweld model can impact. To apply initial velocity of 50 kmph to the model. To run the simulation of model using two different types of spotweld i.e. beam spotweld and solid…
02 Jun 2021 05:56 AM IST
Meshing of Vehicle Side Door Plastic Model | HyperMesh
AIM : To mesh the plastic component of a passenger vehicle side door as shown below with the given quality criteria. Quality Criteria – Target Element Length = 4 mm PROCEDURE : At first we will open Hypermesh and choose our User Profile as RADIOSS. Then we will import the model using Import Tab. After importing…
29 May 2021 06:45 AM IST
Meshing of plastic component of the Vehicle Floor panel | HyperMesh
AIM : To mesh the plastic component of the vehicle Floor panel model as shown below with the given quality criteria. Quality Criteria – Target Element Length = 5 mm PROCEDURE : At first we will open Hypermesh and choose our User Profile as RADIOSS. Then we will import the model using Import Tab. After importing…
29 May 2021 06:45 AM IST
Side Pole Crash Simulation Challenge | HyperMesh
OBJECTIVE : To perform side crash analysis of a vehicle against a rigid cylindrical wall or a Pole in Hypermesh. To simulate the crash behavior of the vehicle in HyperView and discuss the results. To plot the sectional forces at cross members and discuss the results. To obtain intrusion results at B-pillar, hinge pillar…
29 May 2021 06:43 AM IST
Related Courses
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.