replace math.radians to np.deg2rad

This commit is contained in:
Atsushi Sakai
2018-10-23 21:49:08 +09:00
parent 15e044d015
commit a164faa7f2
30 changed files with 107 additions and 106 deletions

View File

@@ -24,7 +24,7 @@ R = np.eye(1)
# parameters
dt = 0.1 # time tick[s]
L = 0.5 # Wheel base of the vehicle [m]
max_steer = math.radians(45.0) # maximum steering angle[rad]
max_steer = np.deg2rad(45.0) # maximum steering angle[rad]
show_animation = True
# show_animation = False
@@ -61,7 +61,7 @@ def PIDControl(target, current):
def pi_2_pi(angle):
return (angle + math.pi) % (2*math.pi) - math.pi
return (angle + math.pi) % (2 * math.pi) - math.pi
def solve_DARE(A, B, Q, R):