remove erro on codefactor

This commit is contained in:
Atsushi Sakai
2019-02-01 21:00:49 +09:00
parent 0750255b66
commit 6534f05cb0

View File

@@ -218,7 +218,7 @@ def generate_course(length, mode, c):
for m, l in zip(mode, length):
pd = 0.0
if m is "S":
if m == "S":
d = 1.0 * c
else: # turning couse
d = np.deg2rad(3.0)
@@ -228,11 +228,11 @@ def generate_course(length, mode, c):
px.append(px[-1] + d / c * math.cos(pyaw[-1]))
py.append(py[-1] + d / c * math.sin(pyaw[-1]))
if m is "L": # left turn
if m == "L": # left turn
pyaw.append(pyaw[-1] + d)
elif m is "S": # Straight
elif m == "S": # Straight
pyaw.append(pyaw[-1])
elif m is "R": # right turn
elif m == "R": # right turn
pyaw.append(pyaw[-1] - d)
pd += d
@@ -240,11 +240,11 @@ def generate_course(length, mode, c):
px.append(px[-1] + d / c * math.cos(pyaw[-1]))
py.append(py[-1] + d / c * math.sin(pyaw[-1]))
if m is "L": # left turn
if m == "L": # left turn
pyaw.append(pyaw[-1] + d)
elif m is "S": # Straight
elif m == "S": # Straight
pyaw.append(pyaw[-1])
elif m is "R": # right turn
elif m == "R": # right turn
pyaw.append(pyaw[-1] - d)
pd += d