Skip to content

Commit fdf3cf5

Browse files
committed
Merge branch 'future' of github.com:petercorke/robotics-toolbox-python into future
2 parents e7b6fa8 + 4f0d3ff commit fdf3cf5

File tree

2 files changed

+31
-4
lines changed

2 files changed

+31
-4
lines changed

roboticstoolbox/models/DH/UR10.py

+29-4
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class UR10(DHRobot):
3939
""" # noqa
4040

4141
def __init__(self, symbolic=False):
42-
4342
if symbolic:
4443
import spatialmath.base.symbolic as sym
4544

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

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

62-
# mass data, no inertia available
61+
# mass data
6362
mass = [7.1, 12.7, 4.27, 2.000, 2.000, 0.365]
6463
center_of_mass = [
6564
[0.021, 0, 0.027],
@@ -69,11 +68,38 @@ def __init__(self, symbolic=False):
6968
[0.0, 0.007, 0.018],
7069
[0, 0, -0.026],
7170
]
71+
72+
# inertia matrices for each link
73+
inertia = [
74+
np.array(
75+
[[0.0341, 0, -0.0043], [0, 0.0353, 0.0001], [-0.0043, 0.0001, 0.0216]]
76+
),
77+
np.array(
78+
[[0.0281, 0.0001, -0.0156], [0.0001, 0.7707, 0], [-0.0156, 0, 0.7694]]
79+
),
80+
np.array(
81+
[[0.0101, 0.0001, 0.0092], [0.0001, 0.3093, 0], [0.0092, 0, 0.3065]]
82+
),
83+
np.array(
84+
[[0.0030, -0.0000, 0], [-0.0000, 0.0022, -0.0002], [0, -0.0002, 0.0026]]
85+
),
86+
np.array(
87+
[[0.0030, -0.0000, 0], [-0.0000, 0.0022, -0.0002], [0, -0.0002, 0.0026]]
88+
),
89+
np.array([[0, 0, 0], [0, 0.0004, 0], [0, 0, 0.0003]]),
90+
]
91+
7292
links = []
7393

7494
for j in range(6):
7595
link = RevoluteDH(
76-
d=d[j], a=a[j], alpha=alpha[j], m=mass[j], r=center_of_mass[j], G=1
96+
d=d[j],
97+
a=a[j],
98+
alpha=alpha[j],
99+
m=mass[j],
100+
r=center_of_mass[j],
101+
G=1,
102+
I=inertia[j],
77103
)
78104
links.append(link)
79105

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

94120

95121
if __name__ == "__main__": # pragma nocover
96-
97122
ur10 = UR10(symbolic=False)
98123
print(ur10)
99124
# print(ur10.dyntable())

roboticstoolbox/tools/urdf/urdf.py

+2
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,8 @@ def filename(self, value):
302302

303303
if value.startswith("package://"):
304304
value = value.replace("package://", "")
305+
elif value.startswith("file://"):
306+
value = value.replace("file://", "")
305307

306308
if _base_path is None:
307309
value = rtb_path_to_datafile("xacro", value)

0 commit comments

Comments
 (0)