Challenge

Week 3.2 - 2R Robotic Arm Challenge

Report on 2R Robotic Arm

Aim:

  • To write a program in Matlab to simulate the forward kinematics of a 2R Robotic Arm.
  • To create an animation file of the plot.

Software used: MATLAB.

Code:

Explanation:

  • l1 and l2 define the lengths of the two robotic arm segments.
  • Theta 1 and Theta 2 are the joint angles.
  • ct is frames.
  • For Loop is used for different values of joint angles.
  • x0,y0 are robot arm is at the origin.
  • x1,y1 are the first position of the link.
  • x2,y2 are the second position of the link.
  • plot the graph of links using plot() command.
  • axis() command used to limit the axeses.
  • speed of the robotic arm is controlled using pause command.
  • frame is captured using getframe(gcf) command.
  • movie(M) command is used to play the movie.
  • video file named Forward_Kinematics.avi is created.

Result:

You tube link for an animation - https://youtu.be/hV59rqGAAaE?si=YqZnc7jMFvPwnfRY .

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.