gemcollector / RL-ViGen

This is the repo of "RL-ViGen: A Reinforcement Learning Benchmark for Visual Generalization"
MIT License
82 stars 9 forks source link

Question about carla env #8

Open csufangyu opened 5 months ago

csufangyu commented 5 months ago

I'm trying to run carla_env, I ran bash scripts/carlatrain.sh directly and encountered the problem: pygame 2.1.2 (SDL 2.0.16, Python 3.8.18) Hello from the pygame community. https://www.pygame.org/contribute.html workspace: /raid/fangyu_data/RL-ViGen/exp_local/2024.01.29/164236_action_repeat=2,feature_dim=50,lr=1e-4,nstep=1,num_train_frames=1001000,save_snapshot=True,save_video=False,seed=3,task=carla,use_tb=False,use_wandb=False,wandb_group= Error executing job with overrides: ['task=carla', 'seed=3', 'action_repeat=2', 'use_wandb=False', 'use_tb=False', 'num_train_frames=1001000', 'save_snapshot=True', 'save_video=False', 'lr=1e-4', 'feature_dim=50', 'nstep=1', 'wandb_group='] Traceback (most recent call last): File "carlatrain.py", line 262, in main workspace = W(cfg) File "/raid/fangyu_data/RL-ViGen/carlatrain.py", line 51, in __init__ self.setup() File "/raid/fangyu_data/RL-ViGen/carlatrain.py", line 71, in setup self.train_env = carla_make(action_repeat=self.cfg.action_repeat) File "/raid/fangyu_data/RL-ViGen/wrappers/carla_wrapper.py", line 109, in carla_make env = make_env_10(action_repeat) File "/raid/fangyu_data/RL-ViGen/./wrappers/carlaenv/utils.py", line 34, in make_env_10 env = CarlaEnv10(cfg_dict) File "/raid/fangyu_data/RL-ViGen/./wrappers/carlaenv/carla_env_10.py", line 263, in __init__ self.world = self.client.load_world(cfg_dict['map']) # change map here RuntimeError: time-out of 500000ms while waiting for the simulator, make sure the simulator is ready and connected to localhost:2018 I followed carla_README.md and wrote the code:

from carlaenv.utils import make_env_10
action_repeat = 2
env = make_env_10(action_repeat)

I have encountered the same problem. Can you please help me to solve it? Thank you

gemcollector commented 5 months ago

Hi there, Sorry for the late reply due to the paper submission lol. Have you tackled this issue now? I think it may be caused by port conflict. Could you change to another port number for both port and traffic port?

csufangyu commented 5 months ago

Thanks your reply! I changed the both port and traffic port number, but it is not usefull.

gemcollector commented 5 months ago

There are some potential reasons:

  1. Do you start the Carla engine correctly? You should use the same in the config file.
  2. I suppose you may not install some dependencies. Here is a list I installed in my docker container to run the code:
    
    sudo apt-get install xdg-user-dirs

sudo apt-get install libpng16-16

sudo apt-get install libjpeg-turbo8

sudo apt install libtiff5

sudo apt-get install libxerces-c3.2


You can also check the official docs from CARLA: https://carla.org/2020/09/25/release-0.9.10/ to find out whether someone else met the same issue.