Skip to content

Commit

Permalink
Issue #3: Adds functionality to remove distant actors
Browse files Browse the repository at this point in the history
- Updates the event_4 function to remove actors over after spawning several.
  • Loading branch information
exoticDFT committed May 3, 2019
1 parent b47b187 commit cfaac4d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Event4.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,14 @@ def event_4(args):
# Use provided seed or system time if none is provided
random.seed(a=args.seed)

spawned_agents = []

for i in sp_indices:
vehicle = spawn_vehicle(world, blueprints, spawn_points[i], True)
spawned_agents.append(vehicle)
spawn_vehicle(world, blueprints, spawn_points[i], True)
time.sleep(4.0)

while time.time() < time.time() + 60*3:
remove_distant_actors(world, verbose=True)
time.sleep(5.0)

finally:
pass

Expand Down

0 comments on commit cfaac4d

Please sign in to comment.