Skip to content

Commit

Permalink
Merge pull request #414 from om-hu/master
Browse files Browse the repository at this point in the history
Add Inertia Matrix Data
  • Loading branch information
jhavl authored Jul 29, 2024
2 parents 53ccefb + 3527cfb commit c7f12ef
Showing 1 changed file with 29 additions and 4 deletions.
33 changes: 29 additions & 4 deletions roboticstoolbox/models/DH/UR10.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class UR10(DHRobot):
""" # noqa

def __init__(self, symbolic=False):

if symbolic:
import spatialmath.base.symbolic as sym

Expand All @@ -59,7 +58,7 @@ def __init__(self, symbolic=False):

alpha = [pi / 2, zero, zero, pi / 2, -pi / 2, zero]

# mass data, no inertia available
# mass data
mass = [7.1, 12.7, 4.27, 2.000, 2.000, 0.365]
center_of_mass = [
[0.021, 0, 0.027],
Expand All @@ -69,11 +68,38 @@ def __init__(self, symbolic=False):
[0.0, 0.007, 0.018],
[0, 0, -0.026],
]

# inertia matrices for each link
inertia = [
np.array(
[[0.0341, 0, -0.0043], [0, 0.0353, 0.0001], [-0.0043, 0.0001, 0.0216]]
),
np.array(
[[0.0281, 0.0001, -0.0156], [0.0001, 0.7707, 0], [-0.0156, 0, 0.7694]]
),
np.array(
[[0.0101, 0.0001, 0.0092], [0.0001, 0.3093, 0], [0.0092, 0, 0.3065]]
),
np.array(
[[0.0030, -0.0000, 0], [-0.0000, 0.0022, -0.0002], [0, -0.0002, 0.0026]]
),
np.array(
[[0.0030, -0.0000, 0], [-0.0000, 0.0022, -0.0002], [0, -0.0002, 0.0026]]
),
np.array([[0, 0, 0], [0, 0.0004, 0], [0, 0, 0.0003]]),
]

links = []

for j in range(6):
link = RevoluteDH(
d=d[j], a=a[j], alpha=alpha[j], m=mass[j], r=center_of_mass[j], G=1
d=d[j],
a=a[j],
alpha=alpha[j],
m=mass[j],
r=center_of_mass[j],
G=1,
I=inertia[j],
)
links.append(link)

Expand All @@ -93,7 +119,6 @@ def __init__(self, symbolic=False):


if __name__ == "__main__": # pragma nocover

ur10 = UR10(symbolic=False)
print(ur10)
# print(ur10.dyntable())

0 comments on commit c7f12ef

Please sign in to comment.