Week 2- 2R Robotic Arm Challenge
AIM:
Simulating Forward Kinematics of a 2R Robotic Arm using MATLAB program.
EXPLANATION OF THE PROGRAM:
1. Lengths of both the links are taken as input. Length of link-1 (L1) is taken as 1.5m and length of link-2 (L2) is
taken as 1m.
2. Angles traced by both the links, for link-1 and for link-2 is taken as input. The angles traced are varied over a
range to simulate the
movement of the robotic arm.
3. Base position of link-1 (20, yo)is considered as origin (0,0).
4. Then two for loops are used to iterate over the range of angles traced by both the links. For each particular angle
of link-1, link-2 is
moved over its entire range, to obtain different positions of end effector at that angle of link-1.
5. For a particular value of %, and f2, the end position of link-1 is calculated by these equations.
21 = 20 + L1 • cos(01)
y1 = y0 + L1 • sin(01)
The end position of link-1 is also the start position of link two. The end position for link-2 is calculated by these
equations.
22 = 21 + L2 • cos(02)
y2 = y1 + L2 • sin(02)
6. Then for each particular position of lin-1 and link-2, a plot is made which is then captured frame by frame to
make a movie.
7. A video file of 'avi' format is made to save the movie.
8. The movie is then written into the videofile and the final animation is thus created.
https://youtu.be/Pomx16baeLI
OUTPUT:
The output is obtained in form of an animated video clip. This animation can be viewed by visiting the link