Skip to content

Commit 4b3e82a

Browse files
committed
more lgtm fixes
1 parent 5df4691 commit 4b3e82a

File tree

15 files changed

+33
-42
lines changed

15 files changed

+33
-42
lines changed

roboticstoolbox/backends/PyPlot/PyPlot.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
try:
2121
import matplotlib
2222
import matplotlib.pyplot as plt
23-
from mpl_toolkits.mplot3d import Axes3D
23+
# from mpl_toolkits.mplot3d import Axes3D
2424
from matplotlib.widgets import Slider
2525

2626
matplotlib.rcParams["pdf.fonttype"] = 42

roboticstoolbox/blocks/arm.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
2-
from math import sin, cos, atan2, tan, sqrt, pi
2+
from math import sin, cos, pi
33

4-
import matplotlib.pyplot as plt
4+
# import matplotlib.pyplot as plt
55
import time
66
from spatialmath import base, SE3
77

roboticstoolbox/mobile/Animations.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
@Author: Peter Corke, original MATLAB code and Python version
33
@Author: Kristian Gibson, initial MATLAB port
44
"""
5-
from abc import ABC, abstractmethod
6-
import warnings
7-
from math import pi, sin, cos, tan, atan2
5+
from abc import ABC
6+
from math import pi, atan2
87
import numpy as np
9-
from scipy import integrate, linalg, interpolate
8+
# from scipy import integrate, linalg, interpolate
109
from pathlib import Path
1110
import matplotlib.pyplot as plt
1211
from matplotlib import patches, colors

roboticstoolbox/mobile/Bug2.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
@Author: Peter Corke, original MATLAB code and Python version
44
@Author: Kristian Gibson, initial MATLAB port
55
"""
6-
from numpy import disp
7-
from scipy import integrate
6+
# from numpy import disp
7+
# from scipy import integrate
88

9-
from spatialmath.pose2d import SE2
9+
# from spatialmath.pose2d import SE2
1010
from spatialmath import base
1111
from spatialmath.base.animate import *
1212
from scipy.ndimage import *
13-
from matplotlib import cm
13+
# from matplotlib import cm
1414
import matplotlib.pyplot as plt
15-
from matplotlib import animation
15+
# from matplotlib import animation
1616
from roboticstoolbox.mobile.PlannerBase import PlannerBase
1717

1818
class Bug2(PlannerBase):

roboticstoolbox/mobile/PRMPlanner.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
@Author: Peter Corke, original MATLAB code and Python version
44
@Author: Kristian Gibson, initial MATLAB port
55
"""
6-
from multiprocessing.sharedctypes import Value
7-
from numpy import disp
8-
from scipy import integrate
9-
from spatialmath.base.animate import Animate
6+
# from multiprocessing.sharedctypes import Value
7+
# from numpy import disp
8+
# from scipy import integrate
9+
# from spatialmath.base.animate import Animate
1010
from spatialmath.base.transforms2d import *
1111
from spatialmath.base.vectors import *
12-
from spatialmath.pose2d import SE2
13-
from spatialmath.base import animate
12+
# from spatialmath.pose2d import SE2
13+
# from spatialmath.base import animate
1414
from scipy.ndimage import *
1515
from matplotlib import cm, pyplot as plt
1616
from roboticstoolbox.mobile.PlannerBase import PlannerBase
1717
from pgraph import UGraph
18-
from progress.bar import FillingCirclesBar
18+
# from progress.bar import FillingCirclesBar
1919

2020

2121
class PRMPlanner(PlannerBase):

roboticstoolbox/models/DH/Baxter.py

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from math import pi
33
from roboticstoolbox import DHRobot, RevoluteDH
44
from spatialmath import SE3
5-
from spatialmath import base
65

76

87
class Baxter(DHRobot):

roboticstoolbox/models/DH/Coil.py

-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@
33
@author: Peter Corke
44
"""
55

6-
7-
from math import pi
86
import numpy as np
97
from roboticstoolbox import DHRobot, RevoluteDH
10-
from spatialmath import SE3
118

129

1310
class Coil(DHRobot):

roboticstoolbox/models/DH/Hyper.py

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
# from math import pi
88
import numpy as np
99
from roboticstoolbox import DHRobot, RevoluteDH
10-
from spatialmath import SE3
1110

1211

1312
class Hyper(DHRobot):

roboticstoolbox/models/DH/Hyper3d.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# from math import pi
77
import numpy as np
88
from roboticstoolbox import DHRobot, RevoluteDH
9-
from spatialmath import SE3
109

1110

1211
class Hyper3d(DHRobot):
@@ -52,12 +51,12 @@ def __init__(self, N=10, a=None, symbolic=False):
5251
if symbolic:
5352
import spatialmath.base.symbolic as sym
5453

55-
zero = sym.zero()
54+
# zero = sym.zero()
5655
pi = sym.pi()
5756
else:
5857
from math import pi
5958

60-
zero = 0.0
59+
# zero = 0.0
6160

6261
if a is None:
6362
a = 1 / N

roboticstoolbox/models/DH/Jaco.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env python
22

3-
from math import pi, sin, cos
3+
from math import sin, cos
44
import numpy as np
55
from roboticstoolbox import DHRobot, RevoluteDH
6-
from spatialmath import SE3
6+
# from spatialmath import SE3
77

88

99
class Jaco(DHRobot):
@@ -44,12 +44,12 @@ def __init__(self, symbolic=False):
4444
if symbolic:
4545
import spatialmath.base.symbolic as sym
4646

47-
zero = sym.zero()
47+
# zero = sym.zero()
4848
pi = sym.pi()
4949
else:
5050
from math import pi
5151

52-
zero = 0.0
52+
# zero = 0.0
5353

5454
deg = pi / 180
5555
# robot length values (metres)
@@ -63,9 +63,9 @@ def __init__(self, symbolic=False):
6363

6464
# alternate parameters
6565
aa = 30 * deg
66-
ca = cos(aa)
66+
# ca = cos(aa)
6767
sa = sin(aa)
68-
c2a = cos(2 * aa)
68+
# c2a = cos(2 * aa)
6969
s2a = sin(2 * aa)
7070
d4b = D3 + sa / s2a * D4
7171
d5b = sa / s2a * D4 + sa / s2a * D5

roboticstoolbox/models/DH/Planar2.py

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"""
66

77
from roboticstoolbox import DHRobot, RevoluteDH
8-
from math import pi
98
import numpy as np
109

1110

roboticstoolbox/models/DH/Sawyer.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import numpy as np
77
from roboticstoolbox import DHRobot, RevoluteDH
8-
from spatialmath import SE3
98

109

1110
class Sawyer(DHRobot):
@@ -42,14 +41,14 @@ def __init__(self, symbolic=False):
4241
if symbolic:
4342
import spatialmath.base.symbolic as sym
4443

45-
zero = sym.zero()
44+
# zero = sym.zero()
4645
pi = sym.pi()
4746
else:
4847
from math import pi
4948

50-
zero = 0.0
49+
# zero = 0.0
5150

52-
deg = pi / 180
51+
# deg = pi / 180
5352
mm = 1e-3
5453

5554
# kinematic parameters

roboticstoolbox/models/DH/TwoLink.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44

55
from roboticstoolbox import DHRobot, RevoluteDH
6-
from math import pi
6+
# from math import pi
77
from spatialmath import SE3
88
import numpy as np
99

roboticstoolbox/models/ETS/Planar_Y.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ class Planar_Y(ERobot):
2626

2727
def __init__(self):
2828

29-
deg = np.pi / 180
30-
mm = 1e-3
29+
# deg = np.pi / 180
30+
# mm = 1e-3
3131
tool_offset = 1
3232

3333
# trunk of the tree

roboticstoolbox/tools/trajectory.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from spatialmath.base.argcheck import (
77
isvector,
88
getvector,
9-
assertmatrix,
9+
# assertmatrix,
1010
getvector,
1111
isscalar,
1212
)

0 commit comments

Comments
 (0)