Skip to content

Commit a0cbab5

Browse files
committed
ets cleanup
1 parent 5db20bd commit a0cbab5

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

roboticstoolbox/robot/ETS.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@
1111
from spatialmath import SE3, SE2
1212
from spatialmath.base import getvector, getunit, trotx, troty, trotz, \
1313
issymbol, tr2jac, transl2, trot2, removesmall, trinv, verifymatrix, iseye
14-
14+
15+
1516
class SuperETS(UserList, ABC):
1617

1718
# T is a NumPy array (4,4) or None
1819
# ets_tuple = namedtuple('ETS3', 'eta axis_func axis joint T jindex flip')
1920

2021
def __init__(
21-
self, axis=None, eta=None, axis_func=None,
22+
self, axis=None, eta=None, axis_func=None,
2223
unit='rad', j=None, flip=False):
2324

2425
super().__init__() # init UserList superclass
@@ -92,7 +93,9 @@ def __init__(
9293
raise ValueError('bad axis specified')
9394

9495
# Save all the params in a named tuple
95-
e = SimpleNamespace(eta=eta, axis_func=axis_func, axis=axis, joint=joint, T=T, jindex=j, flip=flip)
96+
e = SimpleNamespace(
97+
eta=eta, axis_func=axis_func,
98+
axis=axis, joint=joint, T=T, jindex=j, flip=flip)
9699

97100
# And make it the only value of this instance
98101
self.data = [e]
@@ -1370,7 +1373,8 @@ def r(cls, eta=None, unit='rad', **kwargs):
13701373
13711374
:seealso: :func:`ETS`, :func:`isrevolute`
13721375
"""
1373-
return cls(axis='R', eta=eta,
1376+
return cls(
1377+
axis='R', eta=eta,
13741378
axis_func=lambda theta: trot2(theta), unit=unit, **kwargs)
13751379

13761380
@classmethod
@@ -1395,7 +1399,8 @@ def tx(cls, eta=None, **kwargs):
13951399
13961400
:seealso: :func:`ETS`, :func:`isprismatic`
13971401
"""
1398-
return cls(axis='tx', eta=eta,
1402+
return cls(
1403+
axis='tx', eta=eta,
13991404
axis_func=lambda x: transl2(x, 0), **kwargs)
14001405

14011406
@classmethod
@@ -1420,7 +1425,8 @@ def ty(cls, eta=None, **kwargs):
14201425
14211426
:seealso: :func:`ETS`
14221427
"""
1423-
return cls(axis='ty', eta=eta,
1428+
return cls(
1429+
axis='ty', eta=eta,
14241430
axis_func=lambda y: transl2(0, y), **kwargs)
14251431

14261432

@@ -1491,7 +1497,6 @@ def ty(cls, eta=None, **kwargs):
14911497
# print(e.inv().eval(q))
14921498
# print(e.eval(q) * e.inv().eval(q))
14931499

1494-
14951500
e = ETS.rz() * ETS.tx(-1) * ETS.tx(1) * ETS.rz()
14961501
print(e)
1497-
print(e.compile())
1502+
print(e.compile())

0 commit comments

Comments
 (0)