OE22004
ROBOTICS AND PROGRAMMING
ASSIGNMENT
Name : Praveen Kumar R
Department : AI&DS “B”
Reg. no. - 2127220502069
Forward and Inverse Kinematics
Question: Consider a 2-joint planar robotic arm, with the following specifications:
• Link 1 has length L1 = 3 units.
• Link 2 has length L2 = 2 units.
• The joint angles are θ1 and θ2.
Objectives
1. Forward Kinematics: Determine the end-effector’s (x,y) position given θ1 and θ2.
2. Inverse Kinematics: Determine the angles θ1 and θ2 that will place the end-effector
at a specific target position, say (xd,yd)=(4,2)
Solution
1. Forward Kinematics (FK)
Given joint angles θ1 and θ2, we can calculate the end-effector position (x, y) using
trigonometric equations based on the link lengths and joint angles.
The formulas for x and y are:
x = L1cos (θ1) + L2 cos (θ1 + θ2)
y = L1 sin (θ1) + L2 sin (θ1 + θ2)
Suppose we have the following joint angles:
π
• θ1 = 60∘ = radians
3
π
• θ2 = 45∘ = radians
4
Substitute these values into the equations for x and y:
π π π
x = 3 ⋅ cos (3 ) + 2 ⋅ cos (3 + 4 )
x = (3 ⋅ 0.5) + (2 ⋅ −0.2588)
x = 1.5 − 0.5176
x ≈ 0.9824
π π π
y = 3 ⋅ sin (3 ) + 2 ⋅ sin (3 + 4 )
y = 3 ⋅ 0.866 + 2 ⋅ 0.9659
y = 2.598 + 1.9318
y ≈ 4.5298
Therefore, the end-effector’s position (x,y) is approximately (0.9824, 4.5298)
2.Inverse Kinematics
For a desired end-effector position (xd, yd), we need to find the joint angles θ1 and θ2 that
allow the end-effector to reach this position.
For the target position (xd, yd) = (4,2), we proceed as follows.
Step 1: Calculate θ2
Using the cosine law, we can express cos(θ2) as follows:
Substitute the values
cos(θ2) = 42 + 22 – 32 – 22
2⋅3⋅2
= 16 + 4 – 9 – 4
12
≈ 0.583
θ2 = 𝒄𝒐𝒔−𝟏 (𝟎. 𝟓𝟖𝟑) ≈ 𝟓𝟒deg
Step 2: Calculate θ1
With θ2 found, we can calculate θ1 using:
1. Calculate 1st part
2
𝑡𝑎𝑛−1 = 𝑡𝑎𝑛−1 (0.5) ≈ 27𝑑𝑒𝑔
4
2. Calculate 2nd part
2 ⋅ sin(0.944)
𝑡𝑎𝑛−1 (3 + 2 ⋅ cos(0.944))
2 ⋅ 0.809
𝑡𝑎𝑛−1 (3 + 2 ⋅ 0.583)
1.618
𝑡𝑎𝑛−1 (4.166) ≈ 𝟐𝟏deg
θ1 = 𝟐𝟕𝑑𝑒𝑔 − 𝟐𝟏𝑑𝑒𝑔 ≈ 𝟔𝑑𝑒𝑔
Final Answer
To achieve an end-effector position of approximately (xd,yd)=(4,2):
• θ1 should be approximately 6∘
• θ2 should be approximately 54∘