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

@@ -21,7 +21,7 @@ R = np.eye(2)
# 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
@@ -51,7 +51,7 @@ def update(state, a, delta):
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):

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):

View File

@@ -45,8 +45,8 @@ WHEEL_WIDTH = 0.2 # [m]
TREAD = 0.7 # [m]
WB = 2.5 # [m]
MAX_STEER = math.radians(45.0) # maximum steering angle [rad]
MAX_DSTEER = math.radians(30.0) # maximum steering speed [rad/s]
MAX_STEER = np.deg2rad(45.0) # maximum steering angle [rad]
MAX_DSTEER = np.deg2rad(30.0) # maximum steering speed [rad/s]
MAX_SPEED = 55.0 / 3.6 # maximum speed [m/s]
MIN_SPEED = -20.0 / 3.6 # minimum speed [m/s]
MAX_ACCEL = 1.0 # maximum accel [m/ss]