alexband/Udacity-373

2

1 parent ce2ec7a commit b083511b76374762d3872d5398e69ff91263f8a9 huanghuang committed Mar 25, 2012
Showing with 245 additions and 5 deletions.
1. +1 −1 5-14.py
2. +6 −4 5-5.py
3. +238 −0 hw5-2.py
 @@ -147,7 +147,7 @@ def run(param1, param2, param3): myrobot = robot() myrobot.set(0.0, 1.0, 0.0) speed = 1.0 # motion distance is equal to speed (we assume time = 1) - N = 100 + N = 200 myrobot.set_steering_drift(10.0 / 180.0 * pi) # 10 degree bias, this will be added in by the move function, you do not need to add it below! cte = myrobot.y I = 0
10 5-5.py
 @@ -44,10 +44,12 @@ def smooth(path, weight_data = 0.5, weight_smooth = 0.1): # Make a deep copy of path into newpath - newpath = [[0 for col in range(len(path[0]))] for row in range(len(path))] - for i in range(len(path)): - for j in range(len(path[0])): - newpath[i][j] = path[i][j] + #newpath = [[0 for col in range(len(path[0]))] for row in range(len(path))] + #for i in range(len(path)): + # for j in range(len(path[0])): + # newpath[i][j] = path[i][j] + from copy import deepcopy + newpath = deepcopy(path) #### ENTER CODE BELOW THIS LINE ###
238 hw5-2.py