Skip to content

Commit b02286e

Browse files
authored
Merge pull request #44 from suddrey-qut/patch-3
Fixing crashing bug when using Twist3.R[x,y,z]
2 parents 2c767e2 + 4ce2e84 commit b02286e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spatialmath/twist.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ def Rx(cls, theta, unit='rad'):
554554
:seealso: :func:`~spatialmath.base.transforms3d.trotx`
555555
:SymPy: supported
556556
"""
557-
return cls([np.r_[0,0,0,x,0,0] for x in base.getunit(theta, unit=unit)])
557+
return cls([np.r_[0,0,0,x,0,0] for x in base.getvector(base.getunit(theta, unit=unit)_])
558558

559559
@classmethod
560560
def Ry(cls, theta, unit='rad', t=None):
@@ -585,7 +585,7 @@ def Ry(cls, theta, unit='rad', t=None):
585585
:seealso: :func:`~spatialmath.base.transforms3d.troty`
586586
:SymPy: supported
587587
"""
588-
return cls([np.r_[0,0,0,0,x,0] for x in base.getunit(theta, unit=unit)])
588+
return cls([np.r_[0,0,0,0,x,0] for x in base.getvector(base.getunit(theta, unit=unit))])
589589

590590
@classmethod
591591
def Rz(cls, theta, unit='rad', t=None):
@@ -616,7 +616,7 @@ def Rz(cls, theta, unit='rad', t=None):
616616
:seealso: :func:`~spatialmath.base.transforms3d.trotz`
617617
:SymPy: supported
618618
"""
619-
return cls([np.r_[0,0,0,0,0,x] for x in base.getunit(theta, unit=unit)])
619+
return cls([np.r_[0,0,0,0,0,x] for x in base.getvector(base.getunit(theta, unit=unit))])
620620

621621
@classmethod
622622
def Tx(cls, x):
@@ -1714,4 +1714,4 @@ def _repr_pretty_(self, p, cycle):
17141714

17151715
# import pathlib
17161716

1717-
# exec(open(pathlib.Path(__file__).parent.parent.absolute() / "tests" / "test_twist.py").read()) # pylint: disable=exec-used
1717+
# exec(open(pathlib.Path(__file__).parent.parent.absolute() / "tests" / "test_twist.py").read()) # pylint: disable=exec-used

0 commit comments

Comments
 (0)