@@ -298,7 +298,7 @@ def __str__(self):
298298 s = self .__class__ .__name__ + "("
299299 if self .name is not None :
300300 s += f'"{ self .name } "'
301-
301+
302302 ets = self .ets
303303 if len (ets ) > 0 :
304304 s += f", { ets } "
@@ -380,8 +380,8 @@ def __deepcopy__(self, memo):
380380 Tc = deepcopy (self .Tc )
381381 G = deepcopy (self .G )
382382 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 ]
385385
386386 cls = self .__class__
387387 result = cls (
@@ -1138,7 +1138,7 @@ def format(l, fmt, val): # noqa
11381138 s = ", " .join ([fmt .format (v ) for v in val ])
11391139 except TypeError :
11401140 # handle symbolic case
1141- s = ", " .join ([str (v ) for v in val ])
1141+ s = ", " .join ([str (v ) for v in val ])
11421142 else :
11431143 try :
11441144 s = fmt .format (val )
@@ -1159,8 +1159,6 @@ def format(l, fmt, val): # noqa
11591159
11601160 return dyn
11611161
1162-
1163-
11641162 def _params (self , name = True ): # pragma nocover
11651163 def format_param (
11661164 self , l , name , symbol = None , ignorevalue = None , indices = None
@@ -1187,11 +1185,14 @@ def format_param(
11871185 # flat = v.flatten()
11881186 # v = np.r_[[flat[k] for k in indices]]
11891187 # 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+ )
11951196 if s is not None :
11961197 l .append (s )
11971198
@@ -1381,7 +1382,6 @@ def __init__(
13811382 self ._ets [- 1 ].jindex = jindex
13821383 self ._ets ._auto_jindex = False
13831384
1384-
13851385 # @property
13861386 # def ets(self: "Link") -> "ETS":
13871387 # """
@@ -1524,4 +1524,4 @@ def A(self, q: float = 0.0) -> SE2:
15241524
15251525 # a = rtb.models.URDF.UR5()
15261526 # print(a[3])
1527- # print(repr(a[3]))
1527+ # print(repr(a[3]))
0 commit comments