mirror of
https://github.com/gryf/coach.git
synced 2025-12-17 19:20:19 +01:00
allow missing carla environment and missing matplotlib package
This commit is contained in:
@@ -15,7 +15,12 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
import scipy.ndimage
|
import scipy.ndimage
|
||||||
import matplotlib.pyplot as plt
|
try:
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
except:
|
||||||
|
from logger import failed_imports
|
||||||
|
failed_imports.append("matplotlib")
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
from configurations import Preset
|
from configurations import Preset
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|||||||
@@ -18,7 +18,11 @@ from agents.policy_optimization_agent import *
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
from logger import *
|
from logger import *
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
import matplotlib.pyplot as plt
|
try:
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
except:
|
||||||
|
from logger import failed_imports
|
||||||
|
failed_imports.append("matplotlib")
|
||||||
|
|
||||||
from utils import *
|
from utils import *
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import sys
|
|||||||
from os import path, environ
|
from os import path, environ
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
if 'CARLA_ROOT' in environ:
|
||||||
sys.path.append(path.join(environ.get('CARLA_ROOT'), 'PythonClient'))
|
sys.path.append(path.join(environ.get('CARLA_ROOT'), 'PythonClient'))
|
||||||
from carla.client import CarlaClient
|
from carla.client import CarlaClient
|
||||||
from carla.settings import CarlaSettings
|
from carla.settings import CarlaSettings
|
||||||
@@ -227,4 +228,3 @@ class CarlaEnvironmentWrapper(EnvironmentWrapper):
|
|||||||
self.observation = observation
|
self.observation = observation
|
||||||
|
|
||||||
return observation
|
return observation
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user