2
2
3
3
State lattice planner with model predictive trajectory generator
4
4
5
- author: Atsushi Sakai( Atsushi_twi)
5
+ author: Atsushi Sakai (@ Atsushi_twi)
6
6
7
7
"""
8
8
import sys
@@ -180,10 +180,10 @@ def uniform_terminal_state_sampling_test1():
180
180
nxy = 5
181
181
nh = 3
182
182
d = 20
183
- a_min = - math . radians (45.0 )
184
- a_max = math . radians (45.0 )
185
- p_min = - math . radians (45.0 )
186
- p_max = math . radians (45.0 )
183
+ a_min = - np . deg2rad (45.0 )
184
+ a_max = np . deg2rad (45.0 )
185
+ p_min = - np . deg2rad (45.0 )
186
+ p_max = np . deg2rad (45.0 )
187
187
states = calc_uniform_polar_states (nxy , nh , d , a_min , a_max , p_min , p_max )
188
188
result = generate_path (states , k0 )
189
189
@@ -207,10 +207,10 @@ def uniform_terminal_state_sampling_test2():
207
207
nxy = 6
208
208
nh = 3
209
209
d = 20
210
- a_min = - math . radians (- 10.0 )
211
- a_max = math . radians (45.0 )
212
- p_min = - math . radians (20.0 )
213
- p_max = math . radians (20.0 )
210
+ a_min = - np . deg2rad (- 10.0 )
211
+ a_max = np . deg2rad (45.0 )
212
+ p_min = - np . deg2rad (20.0 )
213
+ p_max = np . deg2rad (20.0 )
214
214
states = calc_uniform_polar_states (nxy , nh , d , a_min , a_max , p_min , p_max )
215
215
result = generate_path (states , k0 )
216
216
@@ -234,12 +234,12 @@ def biased_terminal_state_sampling_test1():
234
234
nxy = 30
235
235
nh = 2
236
236
d = 20
237
- a_min = math . radians (- 45.0 )
238
- a_max = math . radians (45.0 )
239
- p_min = - math . radians (20.0 )
240
- p_max = math . radians (20.0 )
237
+ a_min = np . deg2rad (- 45.0 )
238
+ a_max = np . deg2rad (45.0 )
239
+ p_min = - np . deg2rad (20.0 )
240
+ p_max = np . deg2rad (20.0 )
241
241
ns = 100
242
- goal_angle = math . radians (0.0 )
242
+ goal_angle = np . deg2rad (0.0 )
243
243
states = calc_biased_polar_states (
244
244
goal_angle , ns , nxy , nh , d , a_min , a_max , p_min , p_max )
245
245
result = generate_path (states , k0 )
@@ -261,12 +261,12 @@ def biased_terminal_state_sampling_test2():
261
261
nxy = 30
262
262
nh = 1
263
263
d = 20
264
- a_min = math . radians (0.0 )
265
- a_max = math . radians (45.0 )
266
- p_min = - math . radians (20.0 )
267
- p_max = math . radians (20.0 )
264
+ a_min = np . deg2rad (0.0 )
265
+ a_max = np . deg2rad (45.0 )
266
+ p_min = - np . deg2rad (20.0 )
267
+ p_max = np . deg2rad (20.0 )
268
268
ns = 100
269
- goal_angle = math . radians (30.0 )
269
+ goal_angle = np . deg2rad (30.0 )
270
270
states = calc_biased_polar_states (
271
271
goal_angle , ns , nxy , nh , d , a_min , a_max , p_min , p_max )
272
272
result = generate_path (states , k0 )
@@ -288,7 +288,7 @@ def lane_state_sampling_test1():
288
288
k0 = 0.0
289
289
290
290
l_center = 10.0
291
- l_heading = math . radians (90.0 )
291
+ l_heading = np . deg2rad (90.0 )
292
292
l_width = 3.0
293
293
v_width = 1.0
294
294
d = 10
0 commit comments