This repository hosts a customized PPO based agent for Carla. The goal of this project is to make it easier to interact with and experiment in Carla with reinforcement learning based agents -- this, by wrapping Carla in a gym like environment that can handle custom reward functions, custom debug output, etc.
Hi,
Please specify the requirement to run this code. I am getting this error continuously. I run like this:
python3 run_eval.py --model_name pretrained_agent -start_carla
2024-06-28 09:07:56.997018: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/ryzen/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/cv2/../../lib64:
2024-06-28 09:07:56.997043: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
File "run_eval.py", line 15, in
from ppo import PPO
File "/home/Carla-ppo-master/ppo.py", line 7, in
import tensorflow_probability as tfp
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow_probability/init.py", line 20, in
from tensorflow_probability import substrates
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow_probability/substrates/init.py", line 21, in
from tensorflow_probability.python.internal import all_util
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow_probability/python/init.py", line 142, in
dir(globals()[pkg_name]) # Forces loading the package from its lazy loader.
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow_probability/python/internal/lazy_loader.py", line 61, in dir
module = self._load()
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow_probability/python/internal/lazy_loader.py", line 44, in _load
module = importlib.import_module(self.name)
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow_probability/python/experimental/init.py", line 35, in
from tensorflow_probability.python.experimental import bijectors
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow_probability/python/experimental/bijectors/init.py", line 17, in
from tensorflow_probability.python.bijectors.ldj_ratio import forward_log_det_jacobian_ratio
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow_probability/python/bijectors/init.py", line 46, in
from tensorflow_probability.python.bijectors.glow import Glow
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow_probability/python/bijectors/glow.py", line 45, in
tfkl = tfk.layers
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow/python/util/lazy_loader.py", line 62, in getattr
module = self._load()
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow/python/util/lazy_loader.py", line 45, in _load
module = importlib.import_module(self.name)
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/keras/init.py", line 3, in
from keras import internal
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/keras/internal/init.py", line 3, in
from keras.internal import backend
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/keras/internal/backend/init.py", line 3, in
from keras.src.backend import _initialize_variables as initialize_variables
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/keras/src/init.py", line 21, in
from keras.src import models
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/keras/src/models/init.py", line 18, in
from keras.src.engine.functional import Functional
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/keras/src/engine/functional.py", line 25, in
from keras.src import backend
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/keras/src/backend.py", line 34, in
from keras.src.dtensor import dtensor_api as dtensor
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/keras/src/dtensor/init.py", line 22, in
from tensorflow.compat.v2.experimental import dtensor as dtensor_api
ImportError: cannot import name 'dtensor' from 'tensorflow.compat.v2.experimental' (/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow/_api/v2/compat/v2/experimental/init.py)
Hi, Please specify the requirement to run this code. I am getting this error continuously. I run like this: python3 run_eval.py --model_name pretrained_agent -start_carla
2024-06-28 09:07:56.997018: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/ryzen/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/cv2/../../lib64: 2024-06-28 09:07:56.997043: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. Traceback (most recent call last): File "run_eval.py", line 15, in
from ppo import PPO
File "/home/Carla-ppo-master/ppo.py", line 7, in
import tensorflow_probability as tfp
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow_probability/init.py", line 20, in
from tensorflow_probability import substrates
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow_probability/substrates/init.py", line 21, in
from tensorflow_probability.python.internal import all_util
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow_probability/python/init.py", line 142, in
dir(globals()[pkg_name]) # Forces loading the package from its lazy loader.
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow_probability/python/internal/lazy_loader.py", line 61, in dir
module = self._load()
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow_probability/python/internal/lazy_loader.py", line 44, in _load
module = importlib.import_module(self.name)
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow_probability/python/experimental/init.py", line 35, in
from tensorflow_probability.python.experimental import bijectors
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow_probability/python/experimental/bijectors/init.py", line 17, in
from tensorflow_probability.python.bijectors.ldj_ratio import forward_log_det_jacobian_ratio
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow_probability/python/bijectors/init.py", line 46, in
from tensorflow_probability.python.bijectors.glow import Glow
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow_probability/python/bijectors/glow.py", line 45, in
tfkl = tfk.layers
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow/python/util/lazy_loader.py", line 62, in getattr
module = self._load()
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow/python/util/lazy_loader.py", line 45, in _load
module = importlib.import_module(self.name)
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/keras/init.py", line 3, in
from keras import internal
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/keras/internal/init.py", line 3, in
from keras.internal import backend
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/keras/internal/backend/init.py", line 3, in
from keras.src.backend import _initialize_variables as initialize_variables
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/keras/src/init.py", line 21, in
from keras.src import models
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/keras/src/models/init.py", line 18, in
from keras.src.engine.functional import Functional
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/keras/src/engine/functional.py", line 25, in
from keras.src import backend
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/keras/src/backend.py", line 34, in
from keras.src.dtensor import dtensor_api as dtensor
File "/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/keras/src/dtensor/init.py", line 22, in
from tensorflow.compat.v2.experimental import dtensor as dtensor_api
ImportError: cannot import name 'dtensor' from 'tensorflow.compat.v2.experimental' (/home/Carla-ppo-master/bitsauce/lib/python3.8/site-packages/tensorflow/_api/v2/compat/v2/experimental/init.py)
How to resolve this?