Skip to content

Commit 06acc25

Browse files
committed
Library for all system
1 parent ce50368 commit 06acc25

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

agent/agent_interfaces_connector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
if platform == "linux" or platform == "linux2":
88
lib_file = "agent/libagent_lib.so"
99
elif platform == "darwin":
10-
lib_file = "agent/libagent.dylib"
10+
lib_file = "agent/libagent_lib.dylib"
1111
elif platform == "win32":
1212
lib_file = "agent/agent_lib.dll"
1313

agent/libagent_lib.dylib

53.3 KB
Binary file not shown.

agent/libagent_lib_x86.dylib

52.8 KB
Binary file not shown.

pydrivingsim/trafficlight.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
# License : MIT
44

55
import pygame
6-
from random import randint, random
6+
import random
7+
8+
# red then green no stop
9+
#random.seed(10)
10+
# stop with red
11+
random.seed(1)
712

813
from pydrivingsim import VirtualObject, World
914

@@ -58,8 +63,8 @@ def set_time_phases(self, time_phases: tuple):
5863

5964
def reset( self ):
6065
#Initial condition of the vehicle
61-
self.state = randint(0, 2)
62-
self.time_past_switch = random()*self.time_phases[self.state]
66+
self.state = random.randint(0, 2)
67+
self.time_past_switch = random.random()*self.time_phases[self.state]
6368

6469
def object_freq_compute(self):
6570
self.time_past_switch += self.__metadata["dt"]

0 commit comments

Comments
 (0)