@@ -298,7 +298,7 @@ def __str__(self):
298
298
s = self .__class__ .__name__ + "("
299
299
if self .name is not None :
300
300
s += f'"{ self .name } "'
301
-
301
+
302
302
ets = self .ets
303
303
if len (ets ) > 0 :
304
304
s += f", { ets } "
@@ -380,8 +380,8 @@ def __deepcopy__(self, memo):
380
380
Tc = deepcopy (self .Tc )
381
381
G = deepcopy (self .G )
382
382
qlim = deepcopy (self .qlim )
383
- geometry = [shape . copy ( ) for shape in self ._geometry ]
384
- collision = [shape . copy ( ) for shape in self ._collision ]
383
+ geometry = [deepcopy ( shape ) for shape in self ._geometry ]
384
+ collision = [deepcopy ( shape ) for shape in self ._collision ]
385
385
386
386
cls = self .__class__
387
387
result = cls (
@@ -1138,7 +1138,7 @@ def format(l, fmt, val): # noqa
1138
1138
s = ", " .join ([fmt .format (v ) for v in val ])
1139
1139
except TypeError :
1140
1140
# handle symbolic case
1141
- s = ", " .join ([str (v ) for v in val ])
1141
+ s = ", " .join ([str (v ) for v in val ])
1142
1142
else :
1143
1143
try :
1144
1144
s = fmt .format (val )
@@ -1159,8 +1159,6 @@ def format(l, fmt, val): # noqa
1159
1159
1160
1160
return dyn
1161
1161
1162
-
1163
-
1164
1162
def _params (self , name = True ): # pragma nocover
1165
1163
def format_param (
1166
1164
self , l , name , symbol = None , ignorevalue = None , indices = None
@@ -1187,11 +1185,14 @@ def format_param(
1187
1185
# flat = v.flatten()
1188
1186
# v = np.r_[[flat[k] for k in indices]]
1189
1187
# s = f"{name}=[" + ", ".join([f"{x:.3g}" for x in v]) + "]"
1190
- if indices is not None :
1191
- v = v .ravel ()[indices ]
1192
- s = f"{ name } =" + np .array2string (v , separator = ', ' ,
1193
- suppress_small = True ,
1194
- formatter = {'float' : lambda x : f"{ x :.3g} " })
1188
+ if indices is not None :
1189
+ v = v .ravel ()[indices ]
1190
+ s = f"{ name } =" + np .array2string (
1191
+ v ,
1192
+ separator = ", " ,
1193
+ suppress_small = True ,
1194
+ formatter = {"float" : lambda x : f"{ x :.3g} " },
1195
+ )
1195
1196
if s is not None :
1196
1197
l .append (s )
1197
1198
@@ -1381,7 +1382,6 @@ def __init__(
1381
1382
self ._ets [- 1 ].jindex = jindex
1382
1383
self ._ets ._auto_jindex = False
1383
1384
1384
-
1385
1385
# @property
1386
1386
# def ets(self: "Link") -> "ETS":
1387
1387
# """
@@ -1524,4 +1524,4 @@ def A(self, q: float = 0.0) -> SE2:
1524
1524
1525
1525
# a = rtb.models.URDF.UR5()
1526
1526
# print(a[3])
1527
- # print(repr(a[3]))
1527
+ # print(repr(a[3]))
0 commit comments