0% found this document useful (0 votes)
24 views

UH-03-2024

Uploaded by

Mohamed Khaled
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

UH-03-2024

Uploaded by

Mohamed Khaled
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

INDUSTRIAL

ROBOTICS

Dr. Eng.\Hossam H. Ammar


Assistant Professor of Mechatronics and
robotics control (PhD , AFHEA)
. Industrial Robotics

Week -03

Fundamentals of Industrial Robotics (3D representation)

Fundamentals of Industrial Robotics (Robot Programming)


.
Fundamentals of Industrial Robotics (Robot Kinematics)

Problem: pick the ball using robot arm


- To study the behaviour and performance of robots

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)

Homogeneous Transformation Matrix (Pose)


.
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( ,  , ) = Rot (a,  ) Rot (o,  ), Rot ( a, ) =


C C C − S S −C C S − S C C S 0
 S C C + C S − S C S + C C S S 0 

 − S C S S C 0
 
 0 0 0 1
.
Fundamentals of Industrial Robotics (Robot Kinematics)

RPY : Roll -Pitch -Yaw

RPY(a , o , n ) = Rot ( a, a ) Rot (o, o ) Rot ( n, n ) =


Ca Co Ca So Sn − Sa Cn Ca SoCn + Sa Sn 0
 S C Sa So Sn + Ca Cn Sa SoCn − Ca Sn 0 
 a o
 − So Co Sn CoCn 0
 
 0 0 0 1
.
Fundamentals of Industrial Robotics (Robot Kinematics)

Euler : Z-Y-Z

Euler( ,  , ) = Rot (a,  ) Rot (o,  ), Rot ( a, ) =


C C C − S S −C C S − S C C S 0
 S C C + C S − S C S + C C S S 0 

 − S C S S C 0
 
 0 0 0 1
.
Fundamentals of Industrial Robotics (Robot Kinematics)
.
Fundamentals of Industrial Robotics (Robot Kinematics)

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)

Inverse of Transformation Matrices


• The inverse of a transformation (or a frame) matrix is the following:

 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 

• 1. Transpose the rotation portion of the matrix.


• 2. Take the negative of the dot-product of the P and n, P and o, and P and a
vectors.
• The scale factors remain the same.

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

• Three linear motions.

𝑅
𝑇𝑝 = 𝑇𝑐𝑎𝑟𝑡 (𝑝𝑥 , 𝑝𝑦 , 𝑝𝑧 )
1 0 0 𝑝𝑥
0 1 0 𝑝𝑦
=
0 0 1 𝑝𝑧
0 0 0 1

26
.
Fundamentals of Industrial Robotics (Robot Kinematics)

Cylindrical Coordinates

• Two linear and one revolute joints


𝑅
𝑇𝑝 = 𝑇𝑐𝑦𝑙 (𝑟, 𝛼, 𝑙) = 𝑇𝑟𝑎𝑛𝑠(0,0, 𝑙)𝑅𝑜𝑡(𝑧, 𝛼)𝑇𝑟𝑎𝑛𝑠(𝑟, 0,0)

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

• Two revolute and one linear joints


R
TP = Tsph (r ,  ,  ) = Rot ( z,  ) Rot ( y,  )Trans(0,0, r )

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

pip install spatialmath-python


.
Fundamentals of Industrial Robotics (Robot Programming)

import numpy as np
from spatialmath import *
import matplotlib.pyplot as plt

# Translation long X =2 # Rotation about x by 90 degrees


Tx=SE3.Tx(2) R1 = SE3.Rx(np.pi/2)
# Translation long Y =3 # Rotation about y by 60 degrees
Ty=SE3.Ty(3) R2 = SE3.Ry(np.pi/3)
# Translation long Z =1 # Rotation about z by 45 degrees
Tz=SE3.Tz(1) R3 = SE3.Rz(np.pi/4)

# Plot and Visualize


Tx.plot(frame='Tx')
plt.show()
.
Fundamentals of Industrial Robotics (Robot Programming)

Eular=SE3.Eul(10, 20, 30, unit="deg")


print(Eular)
# Plot and Visualize
Eular.plot(frame='EUL')
plt.show()

T_RPY=SE3.RPY(10, 20, 30, unit="deg",


order='xyz')
print(T_RPY)
# Plot and Visualize
T_RPY.plot(frame='RPY')
plt.show()
.
Fundamentals of Industrial Robotics (Robot Programming)

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)

Q. Solve and Animate using


Python
.

[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
%%%

Add Robotics toolbox (Peter Corke) !

You might also like