The Jacobian Matrix in Robotics & Python - Denavit Hartenberg & Universal Robots

preview_player
Показать описание
This Video derives and reviews the Jacobian Matrix used in the field of Robotics and it shows how to program / implement the Jacobian in Python with example code. It explains the Denavit Hartenberg Parameters and shows an Universal Robot Simulation.

# Creators: „Bass Paranoya“ & „Red Rubin“ from the „University Munich“

# Sources:

internal documents for the master's degree in electrical engineering:
- „Ausarbeitung Robotik - Jacobi Matrix“ from N. Z. (Red Rubin) & N. B. (Bass Paranoya)
- lecture slices robotics module from Prof. Dr. G. S.

external (free) documents:

# Music by Bass Paranoya

# Python Code:

- „RoboLib“:

T_0_6 = fk_ur(q, dh_para) # transformation matrix of the system (forward kinematics)
point_end = T_0_6[0:3, 3] # calculate the TCP origin coordinates

[0, 1, 0, 0],
[0, 0, 1, 0],
[0, 0, 0, 1]])

for i in range(6):

if i == 0: # kinematic chain
T_0_i = T_0_i # adds velocity of previous joint to current joint
else: # using the DH parameters
T = dh(dh_para[i-1, 0], dh_para[i-1, 1], dh_para[i-1, 2], q[i-1])

z_i = T_0_i[0:3, 2] # gets the vectors p_i and z_i for the Jacobian from the last two coloums of the transformation matrices
p_i = T_0_i[0:3, 3]
r = point_end - p_i
Jacobian[3:6, i] = z_i # angular portion ## each time the loop is passed, another column of the Jacobi matrix is filled

if runden:

return Jacobian

"""
Forward Kinematics for UR type robots
:param: dh_para: DH-Transformation, table of dh parameters (alpha, a, d, theta)
:param: q: Gelenkwinkel
"""

if dh_params_count != 4:
print("Wrong number of dh parameters!")
return None

trafo_matrizes = []

for i in range(number_dh_trafos):

if len(trafo_matrizes) != 0:
for i in range(len(trafo_matrizes) - 1):
if i == 0:
T_0_6 = trafo_matrizes[i] @ trafo_matrizes[i+1]
else:
T_0_6 = T_0_6 @ trafo_matrizes [i+1]

return T_0_6

- „Testing“:

# Denavit Hartenberg Parameter:
a = [0.00000, -0.24365, -0.21325, 0.00000, 0.00000, 0.0000]
d = [0.1519, 0.00000, 0.00000, 0.11235, 0.08535, 0.0819]
alpha = [1.570796327, 0, 0, 1.570796327, -1.570796327, 0]
q_home_offset = [0, -1.570796327, 0, -1.570796327, 0, 0]
joint_direction = [1, 1, -1, 1, 1, 1]

# Singularitätsrechnung
print("\n\n\nJacobian Matrix:\n",J)

print("\n\n\nTCP velocities:\n",tcp)
Рекомендации по теме
Комментарии
Автор

Great video but I have some questions. What does dh (...) refer to in line 406 ? You wrote T = dh(....). And also q offset .Thanks in Advance :)

bradaframanadamada
Автор

thank you for your video! absolutely perfect!

marcophono
welcome to shbcf.ru