1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-18 03:30:19 +01:00

updated CARLA to allow using actions of size 3 + automatic downloading of the CARLA imitation dataset

This commit is contained in:
itaicaspi-intel
2018-09-16 12:07:11 +03:00
parent d3c8a5d7c1
commit cf892463e2
4 changed files with 106 additions and 32 deletions

View File

@@ -27,6 +27,7 @@ from multiprocessing import Manager
from subprocess import Popen
from typing import List, Tuple
import atexit
import numpy as np
killed_processes = []
@@ -571,3 +572,14 @@ class ProgressBar(object):
def close(self):
print("")
def start_shell_command_and_wait(command):
p = Popen(command, shell=True, preexec_fn=os.setsid)
def cleanup():
os.killpg(os.getpgid(p.pid), 15)
atexit.register(cleanup)
p.wait()
atexit.unregister(cleanup)