Skip to content

Commit 68ac9b8

Browse files
committed
small modification on DL
1 parent 3ea1c61 commit 68ac9b8

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

demo/traffic_signal/traffic_signal_scenario.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@
6363
# # -----------------------------------------
6464

6565
# ----------- verify old version ----------
66-
# traces = scenario.verify(30, 1)
67-
# # fig = go.Figure()
68-
# # fig = reachtube_tree(traces, fig, 0,1,[0,1],'lines', 'trace')
69-
# # fig.show()
70-
# # fig = go.Figure()
71-
# # fig = reachtube_tree(traces, fig, 0,2,[0,1],'lines', 'trace')
72-
# # fig.show()
66+
traces = scenario.verify(50, 0.1)
67+
fig = go.Figure()
68+
fig = reachtube_tree(traces, None, fig, 0,1,[0,1],'lines', 'trace')
69+
fig.show()
70+
fig = go.Figure()
71+
fig = reachtube_tree(traces, None, fig, 0,2,[0,1],'lines', 'trace')
72+
fig.show()
7373

7474
# fig = go.Figure()
7575
# fig = reachtube_tree_3d(traces, fig, 0,'time', 1,'x',2,'y')

demo/traffic_signal/vehicle_controller.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __init__(self, x, y, theta, v, agent_mode: VehicleMode):
2525

2626
def decisionLogic(ego: State, other: State):
2727
output = copy.deepcopy(ego)
28-
if ego.agent_mode == VehicleMode.Normal and other.signal_mode == TLMode.RED:
28+
if ego.agent_mode == VehicleMode.Normal and other.signal_mode == TLMode.RED and other.dist<20:
2929
output.agent_mode = VehicleMode.Brake
3030
if ego.agent_mode == VehicleMode.Brake and other.signal_mode != TLMode.RED:
3131
output.agent_mode = VehicleMode.Accel

0 commit comments

Comments
 (0)