Week 2- 2R Robotic Arm Challenge
Aim :-
Write a program in Matlab to simulate the forward kinematics of a 2R Robotic Arm
Intoduction :-
In Automobile and aviation industries all the process like welding and painting are automatic, these all the processes are now a day automaticaly done by robots. So at the design stage of robot designer need to know the wokspace (rangeupto which robot arm can be reach) of the robot for perticular operation, so by software like MATLAB designers can easily know the range of robot by inserting different size of robotic arm and different angles of robotic arm with refference surface.
In robotic field kinematic of the robot is a very important part, by which we can program and simulate how a robot is going to move. By simulation we can figure out the workspace of the robot (possible location at which a robot can reach) for design.
Governing equation -
We will take simple robotic arm with two links for our programming. As per below image

Where L1 and L2 are length of of two links with 1m & 0.5m respectvely, which makes θ1 and θ2 angles with the horizontal axis res[ectively.
- Equation for calculate co-ordinates of link starting and ending point -
- Co-ordinates for link 1
Starting point = [x0,y0] = [0, 0]
Ending point = [x1, y1] = [L1cosθ1, L1sinθ1]
- Co-ordinates for link 2
Starting poin = [x1 y1] = [L1cosθ1, L1sinθ1]
Ending point = [x2 y2] = [L1+L2cosθ2, L1+L2sinθ2]
- PROGRAM -
- Errors occurse during program -

Forget to give input of theta1 and theta2 to overcome provided theta1 and theta2 input

Typo error in row 21 i.e l1 type instead of L1. Unrecognise error occurs.

Typo error y11 instead of y1.

ct not define before exicuting operation

error to create movie due to typo error in movie word uppercase M used instead of lowercase m.
Outputs of equations -

From above figure you see that the outputs value of given equation displayed in workspace.
Results -

From above fig. we can see that movement of robotic arm and its reachable area at different angle video lonk provided below refer for details.
Link for video file of results on google drive -
https://drive.google.com/file/d/106YchCUNXQNAEDLNd_HamlsstLMgkgzu/view?usp=sharing