Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 39d4537

Browse filesBrowse files
committed
argument should be unit, singular, not units
1 parent 4bf3a8a commit 39d4537
Copy full SHA for 39d4537

File tree

Expand file treeCollapse file tree

1 file changed

+8
-8
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-8
lines changed

‎spatialmath/twist.py

Copy file name to clipboardExpand all lines: spatialmath/twist.py
+8-8Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ def theta(self):
948948
"""
949949
return base.norm(self.w)
950950

951-
def exp(self, theta=None, units='rad'):
951+
def exp(self, theta=None, unit='rad'):
952952
"""
953953
Exponentiate a 3D twist
954954
@@ -981,13 +981,13 @@ def exp(self, theta=None, units='rad'):
981981
982982
:seealso: :func:`spatialmath.base.trexp`
983983
"""
984-
if units != 'rad' and self.isprismatic:
984+
if unit != 'rad' and self.isprismatic:
985985
print('Twist3.exp: using degree mode for a prismatic twist')
986986

987987
if theta is None:
988988
theta = 1
989989
else:
990-
theta = base.getunit(theta, units)
990+
theta = base.getunit(theta, unit)
991991

992992
if base.isscalar(theta):
993993
# theta is a scalar
@@ -1421,14 +1421,14 @@ def se2(self):
14211421
else:
14221422
return [base.skewa(x.S) for x in self]
14231423

1424-
def exp(self, theta=None, units='rad'):
1424+
def exp(self, theta=None, unit='rad'):
14251425
r"""
14261426
Exponentiate a 2D twist
14271427
14281428
:param theta: rotation magnitude, defaults to None
14291429
:type theta: float, optional
1430-
:param units: rotational units, defaults to 'rad'
1431-
:type units: str, optional
1430+
:param unit: rotational units, defaults to 'rad'
1431+
:type unit: str, optional
14321432
:return: SE(2) matrix
14331433
:rtype: SE2 instance
14341434
@@ -1455,13 +1455,13 @@ def exp(self, theta=None, units='rad'):
14551455
:seealso: :func:`spatialmath.base.trexp2`
14561456
"""
14571457

1458-
if units != 'rad' and self.isprismatic:
1458+
if unit != 'rad' and self.isprismatic:
14591459
print('Twist3.exp: using degree mode for a prismatic twist')
14601460

14611461
if theta is None:
14621462
theta = 1
14631463
else:
1464-
theta = base.getunit(theta, units)
1464+
theta = base.getunit(theta, unit)
14651465

14661466
if base.isscalar(theta):
14671467
return SE2(base.trexp2(self.S * theta))

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.