Uploaded by Anis Fathima

Exercises Day 2

advertisement
Mechanisms and Robotics
Laboratory Exercises - Day 2
Mapping - 2:
Multiple Rotations of a frame
Problem No. 2
• Certain rotations are carried out about the axis of the fixed frame, first rotation about x-axis by
45o then about y-axis by 30o and finally about x-axis by 60o . Obtain the equivalent rotation
matrix.
Solution
Rotations are in order X-Y-X about the fixed axes; hence it is a case of fixed
angle representation.
R = Rx (60o) RY (30o) Rx (45o)
1
0
0
π‘π‘œπ‘ 30o 0 𝑠𝑖𝑛30o
R = 0 π‘π‘œπ‘ 60o −𝑠𝑖𝑛60o
0
1
0
0 𝑠𝑖𝑛60o π‘π‘œπ‘ 60o −𝑠𝑖𝑛30o 0 π‘π‘œπ‘ 30o
0.866
R = 0.433
−0.25
0.354
−0.177
0.919
0.354
−0.884
−0.306
1
0
0
0 π‘π‘œπ‘ 45o −𝑠𝑖𝑛45o
0 𝑠𝑖𝑛45o π‘π‘œπ‘ 45o
MATLAB Code:
clc
clear all
t1=input('Enter the link angle with x1=')
t2=input('Enter the link angle with y=')
t3=input('Enter the link angle with x2=')
Rx1=[1
0
0; 0
cosd(t1) -sind(t1); 0
Ry=[cosd(t2) 0
sind(t2); 0
Rx2=[1
0; 0
0
R = Rx2*Ry*Rx1
1
sind(t1) cosd(t1)]
0; -sind(t2) 0
cosd(t3) -sind(t3); 0
cosd(t2)]
sind(t3) cosd(t3)]
Homogeneous Transformation
Homogeneous Transformation Matrices
οƒ˜ πŸπ‘»πŸ
𝒙. 𝒖 𝒙. 𝒗 𝒙. π’˜ 𝒅𝒙
π’š. 𝒖 π’š. 𝒗 π’š. π’˜ π’…π’š
=
𝒛. 𝒖 𝒛. 𝒗 𝒛. π’˜ 𝒅𝒛
𝟎 𝟏
𝟎
𝟎
 The matrix is divided into four subparts and these sub-matrices are as
shown below.
𝑅 3𝑋3

𝑃 1𝑋3
 Here 𝑅
 𝐷 3𝑋1
 𝜎 1𝑋1
 𝑃 1𝑋3
𝐷 3𝑋1
𝜎 1𝑋1
3𝑋3 is rotation matrix.
is translation matrix.
is a non-zero scaling factor.
is a perspective vector.
Translation Matrices
π‘‡π‘Ÿπ‘Žπ‘›π‘ 
1
= 0
0
0
𝑑π‘₯
0
1
0
0
π‘‡π‘Ÿπ‘Žπ‘›π‘ 
1
= 0
0
0
0 𝑑π‘₯
0 0
1 0
0 1
𝑑π‘₯ , 𝑑𝑦 , 𝑑𝑧
0 0 𝑑π‘₯
1 0 𝑑𝑦
0 1 𝑑𝑧
0 0 1
π‘‡π‘Ÿπ‘Žπ‘›π‘  𝑑𝑧
π‘‡π‘Ÿπ‘Žπ‘›π‘ 
1
= 0
0
0
𝑑𝑦
0
1
0
0
0 0
0 𝑑𝑦
1 0
0 1
1
= 0
0
0
0
1
0
0
0 0
0 0
1 𝑑𝑧
0 1
Homogeneous Transformation Matrices
 When we want to describe a generalized transformation by a single matrix
that combines the effects of translation and rotation, we define a vector
by adding 1.
π‘₯
1 0
0 0
𝑦
𝑉= 𝑧
π‘…π‘œπ‘‘π‘₯ πœƒ = 0 πΆπœƒ −π‘†πœƒ 0
0 π‘†πœƒ πΆπœƒ 0
1
0 0
0 1
πΆπœƒ
π‘…π‘œπ‘‘π‘§ πœƒ = π‘†πœƒ
0
0
−π‘†πœƒ
πΆπœƒ
0
0
0
0
1
0
0
0
0
1
πΆπœƒ
π‘…π‘œπ‘‘π‘¦ πœƒ = 0
−π‘†πœƒ
0
0
1
0
0
π‘†πœƒ 0
0 0
πΆπœƒ 0
0 1
Homogeneous Transformation Matrices
1 0
π‘…π‘œπ‘‘π‘₯ πœƒ = 0 πΆπœƒ
0 π‘†πœƒ
0 0
πΆπœƒ
π‘…π‘œπ‘‘π‘¦ πœƒ = 0
−π‘†πœƒ
0
πΆπœƒ
π‘…π‘œπ‘‘π‘§ πœƒ = π‘†πœƒ
0
0
0 0
−π‘†πœƒ 0
πΆπœƒ 0
0 1
1
0
π‘‡π‘Ÿπ‘Žπ‘›π‘ π‘₯ π‘Ž =
0
0
0
1
0
0
0 π‘Ž
0 0
1 0
0 1
0 π‘†πœƒ 0
1 0 0
0 πΆπœƒ 0
0 0 1
1
0
π‘‡π‘Ÿπ‘Žπ‘›π‘ π‘¦ 𝑏 =
0
0
0
1
0
0
0 0
0 b
1 0
0 1
1
0
π‘‡π‘Ÿπ‘Žπ‘›π‘ π‘§ 𝑐 =
0
0
0
1
0
0
0 0
0 0
1 c
0 1
−π‘†πœƒ
πΆπœƒ
0
0
0
0
1
0
0
0
0
1
Post-Multiplication Vs. Pre-Multiplication
Composite Rotations
If the mobile coordinate frame M is to be
rotated by an amount Ο• about the Kth unit
vector of the fixed coordinate frame F, then
pre-multiply R by Rk(Ο•)
If the mobile coordinate frame M is to be
rotated by an amount Ο• about its own Kth unit
vector, then post-multiply R by Rk(Ο•)
Problem No. 3
• Frame A having a Point [2 4 6]T is rotated about the x-axis by an angle of 60o followed by a translation of
[7 5 7]T about the new frame. Obtain the transformation matrix T.
Solution
rotx(60)*trans(a,b,c)*[2,4,6,1]’
Solution
Rotx(60)
trans_abc
1.0000
0
0
0 0.5000 -0.8660
0 0.8660 0.5000
0
0
0
9.0000
-6.7583
14.2942
1.0000
0
0
0
1.0000
1
0
0
0
0
1
0
0
0
0
1
0
7
5
7
1
2
4
6
1
Forward kinematics-1: 2 DOF Planar
manipulator
Problem No. 4
Obtain the position and orientation of the
tool point P with respect to the base for the 2 DOF,
RP planar manipulator shown in figure. Consider
joint angle 45 degrees and link (L1) length 500 mm
and extension 200mm.
• Solution:
• [x’,y’,z’] = Rotz (q1)*Transx(L1)*Rotz(90)* Rotx(90)* Transz(d1)* [0,0,0]’
Link i
θ
1
θ1
2
d

a
Home
90
L1
90
d1
Ans:
𝑃=
𝐿1 + 𝑑2 . πΆπœƒ1
𝐿1 + 𝑑2 . π‘†πœƒ1
0
494.9747
494.9747
0
1.0000
Forward kinematics-1: 3 dof
Cylindrical manipulator
Cylindrical arm
Problem No. 5
L1 = 700 mm
L2 = 600 mm
theta1 = 45
d2 = 100 mm
d3 = 200 mm
Cylindrical arm
Problem No. 5
Solution:
Solution: [x’,y’,z’] = [Rotz(q1).Transz(L1)].[Transz(d2).Rotx(-90).transz(L2)].Transz(d3).[0,0,0]’
Link i
θ
d
1
θ1
L1
2
d2, L2
3
d3

a
Home
-90
− 𝐿2 + 𝑑3 . π‘†πœƒ1
[x’,y’,z’] =
𝐿2 + 𝑑3 . πΆπœƒ1
𝐿1 + 𝑑2
3 dof Articulated manipulator
Problem No. 6
Develop workspace points in MATLAB for articulated manipulator
whose joint angles are 45, 30 and -40, link lengths L1 = 100mm,
L2=L3=300 mm.
Link i
θ
d

1
θ1
L1
90
2
θ2
3
θ3
a
Home
L2
90
L3
90
Solution
P = [rotz(q1)*transz(L1)*rotx(90)]*[rotz(q2)*transx(L2)]*[rotz(q3)*transx(L3)*rotz(90)rotx(90)]*origin
π‘»πŸπŸŽ = [rotz(q1)*transz(L1)*rotx(90)]
π‘»πŸπŸ = [rotz(q2)*transx(L2)]
π‘»πŸ‘πŸ = [rotz(q3)*transx(L3)*rotz(90)rotx(90)]
Link i
θ
d

1
θ1
L1
90
2
θ2
3
θ3
𝐢1 𝐿2 𝐢2 + 𝐿3 𝐢23
𝑃 = 𝑆1 𝐿2 𝐢2 + 𝐿3 𝐢23
𝐿3 𝑆23 + 𝐿2 𝑆2 + 𝐿1
a
Home
L2
90
L3
90
Download