still have error

This commit is contained in:
Shunichi09 2019-02-06 23:55:19 +09:00
parent da8419a55b
commit ff3e6f292f
1 changed files with 6 additions and 4 deletions

View File

@ -140,11 +140,10 @@ def main():
WHEEL_BASE = 2.2 WHEEL_BASE = 2.2
tau = 0.01 tau = 0.01
V = 7.0 # initialize V = 5.0 # initialize
alpha = 0.001
R = 1.0 / 2 * math.sin(alpha) delta_r = 0.
delta_r = math.atan2(WHEEL_BASE, R)
A12 = (V / WHEEL_BASE) / (math.cos(delta_r)**2) A12 = (V / WHEEL_BASE) / (math.cos(delta_r)**2)
A22 = (1. - 1. / tau) A22 = (1. - 1. / tau)
@ -208,6 +207,9 @@ def main():
alpha = math.atan2(relative_ref[1], relative_ref[0]) alpha = math.atan2(relative_ref[1], relative_ref[0])
R = np.linalg.norm(relative_ref) / 2 * math.sin(alpha) R = np.linalg.norm(relative_ref) / 2 * math.sin(alpha)
print(R)
input()
V = 7.0 V = 7.0
delta_r = math.atan2(WHEEL_BASE, R) delta_r = math.atan2(WHEEL_BASE, R)