Skip to content

Commit f6e5a04

Browse files
committed
fix swift import
1 parent 82eb512 commit f6e5a04

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

roboticstoolbox/robot/Robot.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ def revolutejoints(self):
466466
.. note:: Fixed joints, that maintain a constant link relative pose,
467467
are not included. ``len(self.structure) == self.n``.
468468
469-
:seealso: :func:`Link.isrevolute`, :func:`prismaticjoints`
469+
:seealso: :func:`Link.isrevolute`, :func:`prismaticjoints`
470470
"""
471471
return [link.isrevolute for link in self if link.isjoint]
472472

@@ -1051,7 +1051,7 @@ def qlim(self):
10511051
:rtype: ndarray(2,n)
10521052
:exception ValueError: unset limits for a prismatic joint
10531053
1054-
Limits are extracted from the link objects. If joints limits are
1054+
Limits are extracted from the link objects. If joints limits are
10551055
not set for:
10561056
10571057
- a revolute joint [-𝜋. 𝜋] is returned
@@ -1200,19 +1200,21 @@ def _get_graphical_backend(self, backend=None):
12001200

12011201
# find the right backend, modules are imported here on an as needs
12021202
# basis
1203-
if backend == 'swift' or default == 'swift': # pragma nocover
1203+
if backend == 'swift' or default == 'swift': # pragma nocover
12041204
# swift was requested, is it installed?
12051205
if isinstance(self, rtb.DHRobot):
12061206
raise NotImplementedError(
12071207
'Plotting in Swift is not implemented for DHRobots yet')
12081208
try:
12091209
# yes, use it
1210-
from roboticstoolbox.backends.Swift import Swift
1210+
from roboticstoolbox.backends.swift import Swift
12111211
env = Swift()
12121212
return env
12131213
except ModuleNotFoundError:
12141214
if backend == 'swift':
1215-
print('Swift is not installed, install it using pip or conda')
1215+
print(
1216+
'Swift is not installed, '
1217+
'install it using pip or conda')
12161218
backend = 'pyplot'
12171219

12181220
elif backend == 'vpython' or default == 'vpython': # pragma nocover
@@ -1227,7 +1229,9 @@ def _get_graphical_backend(self, backend=None):
12271229
return env
12281230
except ModuleNotFoundError:
12291231
if backend == 'vpython':
1230-
print('VPython is not installed, install it using pip or conda')
1232+
print(
1233+
'VPython is not installed, '
1234+
'install it using pip or conda')
12311235
backend = 'pyplot'
12321236

12331237
if backend is None:
@@ -1347,7 +1351,7 @@ def plot(
13471351

13481352
if movie is not None:
13491353
loop = False
1350-
1354+
13511355
while True:
13521356
for qk in q:
13531357
self.q = qk

0 commit comments

Comments
 (0)