Week 3.2 - 2R Robotic Arm Challenge
AIM : To simulate the forward kinematics of a 2R Robotic Arm
THEORY :
Kinematics is the analysis of motion without considering the forces. Here, we need only geometric properties such as length and degree of freedom of the manipulator bodies.
Forward kinematics refers to use of kinematics equation of a robot to compute the position of end effector from specified values for the joint parameters.
If we know the geometry of the robot and all its joint points, we can do the math and figure out the position and orientation of any point on the robot. i.e, if we can able to figure out how the robot is going to move then we can figure out its workspace (workspace refers to possible location that the robot can reach).
These robots have various complex industrial application
- Welding in automobile industry.
- Material handling.
- Assembly operations.
- Machine loading and unloading.
- Spray painting of automobile bodies.
CODE :
CODE OUTPUT :
CODE EXPLANATION:
Clear all : to clear the workspace before proceeding with new variables
close all : to close all figure windows opened
clc : to clear command window
l1, l2, theta1, theta2 : defining the variables for length of the two arms and angle made by them with the horizontal
ct : defining the counter to increment the code afte execution of the loop
for loop : for loop used for indexing the values of THETA as per changes in values of i
x0,y0,x1,y1 = defining the connecting points with formulas for the plot
plot = for plotting the lines joing the links of the arm used for the video
axis = to define the points on the plot with limits on the x and y axis
getframe = to develop frames from each plot execution
video file = to save the name of the video file in AVI format
open,write and close video = to open a video file, write the video in the same and close it.
References :
https://medium.com/@neerajdixit_55283/forward-kinematics-of-a-2r-robotic-arm-bd9502d70fbc