mjxu96 / carlaviz

Visualize carla in the web browser
MIT License
264 stars 61 forks source link

time-out while waiting for the simulator #48

Closed makaveli10 closed 1 year ago

makaveli10 commented 2 years ago

CARLA 0.9.11 running remotely on ubuntu 20.04 with docker on port 2000 using below command: docker run -it --privileged --gpus all -p 2000:2000 -p 2001:2001 -p 2002:2002 -v /tmp/.X11-unix:/tmp/.X11-unix:rw carlasim/carla:0.9.11 /bin/bash which works perfectly fine and after which I run SDL_VIDEODRIVER=offscreen ./CarlaUE4.sh -nosound for headless carla server start which gives following output with a harmless warning:

4.24.3-0+++UE4+Release-4.24 518 0
Disabling core dumps.
sh: 1: xdg-user-dir: not found

Finally, I start the carlaviz docker container using: docker run -it --network="host" -e CARLAVIZ_HOST_IP=localhost -e CARLA_SERVER_HOST="remote-machine-domain" -e CARLA_SERVER_PORT=2000 mjxu96/carlaviz:0.9.11 which runs fine:

Make sure you have launched the Carla server.
Launching backend.
2022-02-14 11:48:56 [INFO]     Connecting to Carla Server on "remote-machine-domain":2000...
2022-02-14 11:48:56 [INFO]     Connected to Carla Server, Server version is: 0.9.11
Backend launched.
Launching frontend
 * Restarting nginx nginx                                                                                                                                                                                   [ OK ] 
Frontend launched. Please open your browser
2022-02-14 14:41:01 [INFO]     Waiting for a drawing client to connect. Listening to port 8089....
2022-02-14 14:41:01 [INFO]     Waiting for a frontend to connect. Listening to port 8081....

Install carla client: pip install carla-client-unofficial==0.9.11 and run python3 exapmle.py from carlaviz repo which has the below issue:

[INFO] [PAINTER] [2022-02-14 20:11:11,688] : Begin to connect to drawing server at localhost:8089
[INFO] [PAINTER] [2022-02-14 20:11:11,690] : Connected to drawing server at localhost:8089
connecting...
WARNING: Version mismatch detected: You are trying to connect to a simulator that might be incompatible with this API 
WARNING: Client API version     = 0.9.11-1-gf3282be1 
WARNING: Simulator API version  = 0.9.11 
getting world
Traceback (most recent call last):
  File "example.py", line 27, in main
    spawn_points = world.get_map().get_spawn_points()
RuntimeError: time-out of 10000ms while waiting for the simulator, make sure the simulator is ready and connected to "remote-machine-server":2000

Any idea what might be causing this issue?

mjxu96 commented 2 years ago

Not sure why backend can connect to the Carla simulator but the example script cannot. Could you check if you can see anything in the browser after Carlaviz starts?

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

mjxu96 commented 1 year ago

Please re-open the issue if you still have the problem in latest CarlaViz.