Skip to content

Commit 538bf8d

Browse files
committed
minor changes
1 parent 1dc8816 commit 538bf8d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

scripts/stdcov.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def safety_constraint(u, A, b):
291291
conv = False
292292

293293
eta = num / denom
294-
eval_data[episode, s-1] = eta
294+
eval_data[episode, s-1] = eta[0]
295295

296296

297297

scripts/test_2d_model.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
vmax = 1.5
2525
SAFETY_DIST = 2.0
2626
EPISODES = 100
27-
NUM_OBSTACLES = 0
27+
NUM_OBSTACLES = 4
2828
NUM_STEPS = 100
2929
NUM_CHANNELS = 3
3030
GAMMA = 0.2
31-
USE_CBF = False
31+
USE_CBF = True
3232

3333
resolution = 2 * ROBOT_RANGE / GRID_STEPS
3434

@@ -120,9 +120,9 @@ def safety_constraint(u, A, b):
120120
Zmax = np.max(Z)
121121
Z = Z / Zmax
122122

123-
fig, [ax, ax2] = plt.subplots(1, 2, figsize=(12,6))
124-
plot_occgrid(Xg, Yg, Z, ax=ax)
125-
plot_occgrid(Xg, Yg, Z, ax=ax2)
123+
# fig, [ax, ax2] = plt.subplots(1, 2, figsize=(12,6))
124+
# plot_occgrid(Xg, Yg, Z, ax=ax)
125+
# plot_occgrid(Xg, Yg, Z, ax=ax2)
126126

127127

128128

@@ -310,8 +310,8 @@ def safety_constraint(u, A, b):
310310

311311
path = Path().resolve()
312312
res_path = path / "results"
313-
np.save(res_path/"eta12_conv.npy", eval_data)
314-
np.save(res_path/"collisions12_conv.npy", collision_counter)
313+
np.save(res_path/"eta12.npy", eval_data)
314+
np.save(res_path/"collisions12.npy", collision_counter)
315315

316316
'''
317317
for i in range(ROBOTS_NUM):

0 commit comments

Comments
 (0)