Skip to content

Commit 5df4691

Browse files
committed
LGTM issue fixes
1 parent ad3d9d3 commit 5df4691

File tree

17 files changed

+50
-51
lines changed

17 files changed

+50
-51
lines changed

roboticstoolbox/backends/PyPlot/EllipsePlot.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55

66
import numpy as np
7-
import scipy as sp
7+
# import scipy as sp
88
from spatialmath import base
99
import matplotlib.pyplot as plt
1010

@@ -22,7 +22,7 @@ def plot(self):
2222
ax = self.ax
2323

2424
if ax is None:
25-
fig = plt.figure()
25+
plt.figure()
2626
ax = plt.axes(projection="3d")
2727
self.ax = ax
2828

@@ -109,7 +109,7 @@ def plot(self, ax=None):
109109
ax = self.ax
110110

111111
if ax is None:
112-
fig = plt.figure()
112+
plt.figure()
113113
ax = plt.axes(projection="3d")
114114
self.ax = ax
115115

@@ -196,7 +196,7 @@ def make_ellipsoid2(self):
196196
centre = self.centre
197197

198198
# points on unit circle
199-
theta = np.linspace(0.0, 2.0 * np.pi, 50)
199+
# theta = np.linspace(0.0, 2.0 * np.pi, 50)
200200
# y = np.array([np.cos(theta), np.sin(theta)])
201201
# RVC2 p 602
202202
# x = sp.linalg.sqrtm(A) @ y

roboticstoolbox/examples/neo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import spatialmath as sm
1010
import numpy as np
1111
import qpsolvers as qp
12-
import cProfile
1312

1413
# Launch the simulator Swift
1514
env = swift.Swift()

roboticstoolbox/examples/puma_swift.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import swift
77
import roboticstoolbox as rp
8-
import spatialmath as sm
98
import numpy as np
109

1110
env = swift.Swift()

roboticstoolbox/examples/tripleangledemo.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def set_three(x):
137137
lambda x: change_sequence("ZYZ"), desc="ZYZ (Euler angles)"
138138
)
139139

140-
button = swift.Button(lambda x: set("ZYX"), desc="Set to Zero")
140+
swift.Button(lambda x: set("ZYX"), desc="Set to Zero")
141141

142142
# button to reset joint angles
143143
def reset(e):
@@ -185,25 +185,25 @@ def angle(index, ring):
185185

186186
label = swift.Label(desc="Triple angle")
187187

188-
def chekked(e, el):
189-
nlabel = "s: "
188+
# def chekked(e, el):
189+
# nlabel = "s: "
190190

191-
if e[0]:
192-
nlabel += "a"
193-
r_one.value = 0
191+
# if e[0]:
192+
# nlabel += "a"
193+
# r_one.value = 0
194194

195-
if e[1]:
196-
nlabel += "b"
197-
r_two.value = 0
195+
# if e[1]:
196+
# nlabel += "b"
197+
# r_two.value = 0
198198

199-
if e[2]:
200-
nlabel += "c"
201-
r_three.value = 0
199+
# if e[2]:
200+
# nlabel += "c"
201+
# r_three.value = 0
202202

203-
if e[3]:
204-
el.value = 1
203+
# if e[3]:
204+
# el.value = 1
205205

206-
label.desc = nlabel
206+
# label.desc = nlabel
207207

208208
env.add(label)
209209
env.add(r_one)

roboticstoolbox/examples/vehicle1.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
from roboticstoolbox import Bicycle, RandomPath, VehiclePolygon, VehicleIcon
2-
from spatialmath import * # lgtm [py/polluting-import]
1+
# from roboticstoolbox import Bicycle, RandomPath, VehiclePolygon
2+
from roboticstoolbox import VehicleIcon
3+
from spatialmath import * # lgtm [py/polluting-import]
34
from math import pi
45

56
dim = 10
67

78
# v = VehiclePolygon()
8-
anim = VehicleIcon('greycar', scale=2)
9+
anim = VehicleIcon("greycar", scale=2)
910

1011
# veh = Bicycle(
1112
# animation=anim,

roboticstoolbox/mobile/CurvaturePolyPlanner.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
import scipy.integrate
33
import scipy.optimize
44
import numpy as np
5-
import matplotlib.pyplot as plt
5+
6+
# import matplotlib.pyplot as plt
67
from collections import namedtuple
78
from roboticstoolbox.mobile import *
89

roboticstoolbox/mobile/EKF.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ def _extend_map(self, P, xv, xm, z, lm_id):
917917
# estimate position of landmark in the world based on
918918
# noisy sensor reading and current vehicle pose
919919

920-
M = None
920+
# M = None
921921

922922
# estimate its position based on observation and vehicle state
923923
xf = self.sensor.g(xv, z)

roboticstoolbox/mobile/Vehicle.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
"""
66
from abc import ABC, abstractmethod
77
import warnings
8-
from math import pi, sin, cos, tan, atan2
8+
from math import pi, sin, cos, tan
99
import numpy as np
10-
from scipy import integrate, linalg, interpolate
10+
from scipy import interpolate
1111

1212
import matplotlib.pyplot as plt
13-
from matplotlib import patches
14-
import matplotlib.transforms as mtransforms
13+
# from matplotlib import patches
14+
# import matplotlib.transforms as mtransforms
1515

1616
from spatialmath import SE2, base
1717
from roboticstoolbox.mobile.drivers import VehicleDriverBase

roboticstoolbox/models/DH/AL5D.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ def __init__(self, symbolic=False):
4343
if symbolic:
4444
import spatialmath.base.symbolic as sym
4545

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

51-
zero = 0.0
51+
# zero = 0.0
5252

5353
# robot length values (metres)
5454
a = [0, 0.002, 0.14679, 0.17751]
@@ -58,7 +58,7 @@ def __init__(self, symbolic=False):
5858
offset = [pi / 2, pi, -0.0427, -0.0427 - pi / 2]
5959

6060
# mass data as measured
61-
mass = [0.187, 0.044, 0.207, 0.081]
61+
# mass = [0.187, 0.044, 0.207, 0.081]
6262

6363
# center of mass as calculated through CAD model
6464
center_of_mass = [

roboticstoolbox/models/URDF/Fetch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import numpy as np
44
from roboticstoolbox.robot.ERobot import ERobot
5-
from spatialmath import SE3
5+
# from spatialmath import SE3
66

77

88
class Fetch(ERobot):

0 commit comments

Comments
 (0)