Simulation of a Robotic Arm using MATLAB
Aim: To simulate the workspace of a 2-D Robotic Arm using MATLAB
Methodology: A 2-D Robotic Arm consisting of two links and an end manipulator is considered. The motion of the links are such that the link at the fixed end is initially given a small angular displacement and the second link completes its angular motion in discretized steps from a range of 0 to 90 degrees. Similarly every small angular displament of the first link is followed by a complete angular sweep of the second link and this is continued till the first link covers a total angle of 90 degree
Procedure:
- The length of the two links are specified
- The angular range covered by the links and the number of steps are also specified
- The position of the end points of the two links are calculated using trigonometric relations
- A For loop is initiated where the angle is specified and corresponding position of the end points of the two links are calculated
- The results are animated
If L1 & L2 are the lengths of the links and `theta_1` & `theta_2` are their anglular positions at any distance then the positions of the endpoints of the links can be given by:
x1 = L1*cos(`theta_1`); y1 = L1*sin(`theta_1`)
x2 = x1 + L2*cos(`theta_2`); y2 = y1 + L2*sin(`theta_2`)
MATLAB program:
Results:
The animation of the Robotic arm is shown in the Video below: