Menu

Executive Programs

Workshops

Projects

Blogs

Careers

Placements

Student Reviews


For Business


More

Academic Training

Informative Articles

Find Jobs

We are Hiring!


All Courses

Choose a category

Mechanical

Electrical

Civil

Computer Science

Electronics

Offline Program

All Courses

All Courses

logo

CHOOSE A CATEGORY

Mechanical

Electrical

Civil

Computer Science

Electronics

Offline Program

Top Job Leading Courses

Automotive

CFD

FEA

Design

MBD

Med Tech

Courses by Software

Design

Solver

Automation

Vehicle Dynamics

CFD Solver

Preprocessor

Courses by Semester

First Year

Second Year

Third Year

Fourth Year

Courses by Domain

Automotive

CFD

Design

FEA

Tool-focused Courses

Design

Solver

Automation

Preprocessor

CFD Solver

Vehicle Dynamics

Machine learning

Machine Learning and AI

POPULAR COURSES

coursePost Graduate Program in Hybrid Electric Vehicle Design and Analysis
coursePost Graduate Program in Computational Fluid Dynamics
coursePost Graduate Program in CAD
coursePost Graduate Program in CAE
coursePost Graduate Program in Manufacturing Design
coursePost Graduate Program in Computational Design and Pre-processing
coursePost Graduate Program in Complete Passenger Car Design & Product Development
Executive Programs
Workshops
For Business

Success Stories

Placements

Student Reviews

More

Projects

Blogs

Academic Training

Find Jobs

Informative Articles

We're Hiring!

phone+91 9342691281Log in
  1. Home/
  2. Shlok Dixit/
  3. Week 2- 2R Robotic Arm Challenge

Week 2- 2R Robotic Arm Challenge

AIM: TO SIMULATE THE 'FORWARD KINEMATICS' OF A 2R ROBOTIC ARM USING MATLAB   OBJECTIVE: Write a program to simulate forward kinematics of a 2R Robotic Arm Animating and creating a movie from the plots obtained from the program   THEORY: A manipulator/end effector movement determines the workspace where the robotic…

  • MATLAB
  • Shlok Dixit

    updated on 16 May 2022

AIM: TO SIMULATE THE 'FORWARD KINEMATICS' OF A 2R ROBOTIC ARM USING MATLAB

 

OBJECTIVE:

Write a program to simulate forward kinematics of a 2R Robotic Arm

Animating and creating a movie from the plots obtained from the program

 

THEORY: A manipulator/end effector movement determines the workspace where the robotic arm can be applicable. Our motive is to animate the movement of robotic arm with the subsequent relative motion between the two-comprising links.

 

Input:

(x0, y0) = starting point of link1

(x1, y1) = end point of link1 / starting point of link 2 (x2, y2) = end point of link 2

l1 = length of link attached to the base

l2 = length of link between the first link and the end effector theta1 = angle made by link 1 with x-axis

theta2 = angle made by link 2 with x-axis

 

 

clear all close all clc

 

% Inputs

% Length of robotic arms l1 = 1;

l2 = 0.5;

% Set of angles for the movement of robotic arms theta1 = linspace(0,90,10);

theta2 = linspace(0,90,10);

 

ct=1;                   

 

THETA1 = theta1(i);

for j = 1:length(theta2) THETA2 = theta2(j);

 % Coordinates of start point of first arm x0 = 0;

y0 = 0;

% Coordinates of end point of 1st arm / start point of 2nd arm x1 = l1*cosd(THETA1);

y1 = l1*sind(THETA1);

 % Coordinates of end point of 2nd arm x2 = x1 + l2*cosd(THETA2);

y2 = y1 + l2*sind(THETA2);

% Plotting

% Coordinates of arms assigned over a set of theta1 and theta2

plot([x0 x1],[y0 y1],[x1 x2],[y1 y2],'linewidth',3,'marker','*');

end

 

end

% The limits of x-axis and y-axis axis([-0.1 1.5 0 1.5]);

% To cease the animation from jumping between subsequent figures pause(0.03) 

% Collecting frames of figures to comprise a movie/animation M(ct) = getframe(gcf);

ct=ct+1;

 

% To make a movie of the collected frames movie(M)

 

% Saving the movies in '.avi' format

videofile = VideoWriter('forward_kinematics.avi','Uncompressed AVI'); open(videofile)

 

% Writing the movie in the videofile created writeVideo(videofile,M)

close(videofile)

 

 

 

 

EXPLANATION OF PROGRAM:

Initially we define the length of the robotic arms, i.e. l1 and

Set of values for theta1 and theta2 are assigned in and array with linspace command. Use of for command for iterating the values of the desired variable.

Again using for command for providing movement to the second robotic arm. Defining the coordinates of both the robotic arms.

Plotting all the coordinate values and writing commands for changing the appearance of the contours. All figures are assigned to a variable M, one at a time using ct followed by termination of for loop.

Lastly, movie command is used to combine all the figures saved in the M file to make an animation/movie and thereafter saving it in .avi format.

 

CONCLUSION: A practical scenario regarding the functioning of the robotic arm and its workspace h simulating the forward kinematics with a program in MATLAB.

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.

Please  login to add a comment

Other comments...

No comments yet!
Be the first to add a comment

Read more Projects by Shlok Dixit (16)

Week 3 - External flow simulation over an Ahmed body.

Objective:

Hello this is Shlok here in this we are going to discuss about the Ahmed bodyCimulation in CFD Ansys Fluent So beofre going furthur lets get a few details about Ahmed Body Ahmed body is a simplified vehicle body used for capturing basic yet charecteristic features seen in objects used in the automobile industry. It is…

calendar

01 Aug 2023 12:27 PM IST

  • CFD
  • HTML
Read more

Week 3.5 - Deriving 4th order approximation of a 2nd order derivative using Taylor Table method

Objective:

AIM:                To derive the fourth order approximations of a second order derivative using central differencing scheme, skewed right sided difference and skewed left sided difference with the help of taylor table method and to compare the analytical…

calendar

18 Jul 2023 09:03 AM IST

  • HTML
Read more

Week 2 - Flow over a Cylinder.

Objective:

Aim: To Simulate the flow over a cylinder and explain the phenomenon of Karman vortex street Objective: 1.To Calculate the coefficient of drag and lift over a cylinder by setting the Reynolds number to 10,100,1000,10000 & 100000. (Run with steady solver) 2.Simulate the flow with the steady and unsteady case…

calendar

11 Jul 2023 05:55 PM IST

  • BIM
  • CAE
  • CFD
  • CSS
  • DEM
  • FEA
  • GIS
  • HEV
  • MBD
Read more

Project 1 : CFD Meshing for Tesla Cyber Truck

Objective:

Objective : To Identifying & cleanup all the topological errors in the given Tesla Cyber Truck Car model. To create a surface mesh. To Create a wind tunnel around Tesla Cyber Truck Car . To create a volumetric mesh to perform an external flow CFD analysis simulation.   Introduction : ANSA :…

calendar

26 Feb 2023 04:02 PM IST

  • ANSA
  • CAE
  • CFD
  • RADIOSS
Read more

Schedule a counselling session

Please enter your name
Please enter a valid email
Please enter a valid number

Related Courses

coursecard

Simulation and Design of Power Converters for EV using MATLAB and Simulink

4.9

22 Hours of Content

coursecard

Introduction to Hybrid Electric Vehicle using MATLAB and Simulink

4.8

23 Hours of Content

coursecardcoursetype

Mechanical Engineering Essentials Program

4.7

21 Hours of Content

coursecard

Vehicle Dynamics using MATLAB

4.8

37 Hours of Content

coursecard

Introduction to CFD using MATLAB and OpenFOAM

4.8

13 Hours of Content

Schedule a counselling session

Please enter your name
Please enter a valid email
Please enter a valid number

logo

Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.

https://d27yxarlh48w6q.cloudfront.net/web/v1/images/facebook.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/insta.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/twitter.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/youtube.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/linkedin.svg

Our Company

News & EventsBlogCareersGrievance RedressalSkill-Lync ReviewsTermsPrivacy PolicyBecome an Affiliate
map
EpowerX Learning Technologies Pvt Ltd.
4th Floor, BLOCK-B, Velachery - Tambaram Main Rd, Ram Nagar South, Madipakkam, Chennai, Tamil Nadu 600042.
mail
info@skill-lync.com
mail
ITgrievance@skill-lync.com

Top Individual Courses

Computational Combustion Using Python and CanteraIntroduction to Physical Modeling using SimscapeIntroduction to Structural Analysis using ANSYS WorkbenchIntroduction to Structural Analysis using ANSYS Workbench

Top PG Programs

Post Graduate Program in Hybrid Electric Vehicle Design and AnalysisPost Graduate Program in Computational Fluid DynamicsPost Graduate Program in CADPost Graduate Program in Electric Vehicle Design & Development

Skill-Lync Plus

Executive Program in Electric Vehicle Embedded SoftwareExecutive Program in Electric Vehicle DesignExecutive Program in Cybersecurity

Trending Blogs

Heat Transfer Principles in Energy-Efficient Refrigerators and Air Conditioners Advanced Modeling and Result Visualization in Simscape Exploring Simulink and Library Browser in Simscape Advanced Simulink Tools and Libraries in SimscapeExploring Simulink Basics in Simscape

© 2025 Skill-Lync Inc. All Rights Reserved.

              Do You Want To Showcase Your Technical Skills?
              Sign-Up for our projects.