UH-03-2024
UH-03-2024
ROBOTICS
Week -03
Challenges:
- Pose (position + orientation) of the object
- Weight of the object
- Size of the object
- World/environment around the object
.
Fundamentals of Industrial Robotics (Robot Kinematics)
.
Fundamentals of Industrial Robotics (Robot Kinematics)
.
Fundamentals of Industrial Robotics (Robot Kinematics)
𝑛𝑥 𝑜𝑥 𝑎𝑥 𝑝𝑥
𝑛𝑦 𝑜𝑦 𝑎𝑦 𝑝𝑦
𝑇=
𝑛𝑧 𝑜𝑧 𝑎𝑧 𝑝𝑧
0 0 0 1
.
Fundamentals of Industrial Robotics (Robot Kinematics)
PAB = ( Bx − Ax )i + ( By − Ay ) j + ( Bz − Az )k ax
P = by
cz
Px
P
P = y Px Py
a x = , by =
Pz w w
w
.
Fundamentals of Industrial Robotics (Robot Kinematics)
.
Fundamentals of Industrial Robotics (Robot Kinematics)
.
Fundamentals of Industrial Robotics (Robot Kinematics)
.
Fundamentals of Industrial Robotics (Robot Kinematics)
Euler Angles
• Rotations relative to the current z-, y-, and z-axes.
Z Z Z
a
a a
o
o o
n n
n
X Y X Y X Y
Euler : Z-Y-Z
Homogeneous
Transformation
Matrix (Pose)
.
Fundamentals of Industrial Robotics (Robot Kinematics)
.
Fundamentals of Industrial Robotics (Robot Kinematics)
.
Fundamentals of Industrial Robotics (Robot Kinematics)
.
Fundamentals of Industrial Robotics (Robot Kinematics)
.
Fundamentals of Industrial Robotics (Robot Kinematics)
nx ox ax px nx ny nz −p n
n oy ay p y o oy oz −p o
T = y and T −1 = x
nz oz az pz ax ay az −p a
0 0 0 1 0 0 0 1
22
.
Fundamentals of Industrial Robotics (Robot Kinematics)
Question
23
.
Fundamentals of Industrial Robotics (Robot Kinematics)
Question
24
.
Fundamentals of Industrial Robotics (Robot Kinematics)
.
Fundamentals of Industrial Robotics (Robot Kinematics)
Cartesian Coordinates
𝑅
𝑇𝑝 = 𝑇𝑐𝑎𝑟𝑡 (𝑝𝑥 , 𝑝𝑦 , 𝑝𝑧 )
1 0 0 𝑝𝑥
0 1 0 𝑝𝑦
=
0 0 1 𝑝𝑧
0 0 0 1
26
.
Fundamentals of Industrial Robotics (Robot Kinematics)
Cylindrical Coordinates
C − S 0 rC
S C 0 rS
R
Tp = Tcyl (r , , l ) =
0 0 1 l
0 0 0 1
27
.
Fundamentals of Industrial Robotics (Robot Kinematics)
Spherical Coordinates
C C − S S C rS C
C S C S S rS S
R
TP = Tsph (r , , ) =
−S 0 C rC
0 0 0 1
28
. Fundamentals of Industrial Robotics (Robot Programming)
Software Packages
import numpy as np
from spatialmath import *
import matplotlib.pyplot as plt
import numpy as np
from spatialmath import *
import matplotlib.pyplot as plt
import time
Xo=SE3.Rx(0)
T1 = SE3.Rx(np.pi/2)
T2=SE3.Tx(2)
T3=SE3.Tz(2)
T=T3*T2*T1
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
title = ax.set_title('3D Test')
Xo.plot(frame='Ao', color='red')
# X.animate(frame='Ax' ,axes=ax)
Homogeneous Transformation # Y.animate(frame='Ax' ,axes=ax)
T.animate(frame='Ax' ,axes=ax)
using Python ax.set_xlim3d([-2, 2]) # Set X axis limits
ax.set_ylim3d([-2, 2]) # Set Y axis limits
ax.set_zlim3d([-2, 2]) # Set Z axis limits
plt.show()
.
Fundamentals of Industrial Robotics (Robot Programming)
T1 = SE3.Rx(np.pi/2)
T2=SE3.Tx(2)
T3=SE3.Tz(2)
T_inv=T.inv()
print(T_inv)
print(T.R)
print(T.t)
T=T1*T2*T3 T=T3*T2*T1
.
Fundamentals of Industrial Robotics (Robot Programming)
[email protected]
.
Fundamentals of Industrial Robotics (Robot Programming)
%animate Homogeneous
trotx(pi/2) %Rotation about x by 90
troty(pi/3) %Rotation about y by 60
trotz(pi/4) %Rotation about z by 45
%%%%
R1=rotx(pi/2)
trplot (R1) %Plot rotation
tranimate (R1) %animate rotation
R2=rotx(pi/4)*roty(pi/6)*rotz(pi/5)
tranimate (R2)
T1=transl(0.1,0.2,0.6) %translation about x,y,z
tranimate (T1) %animate translation
H1=trotx(pi/2)*transl(0.1,0.2,0.3) %Homogeneous rotation
about x by 90 and translation about x,y,z
tranimate (H1) %animate Homogeneous
%%%