Hi,
My System specifications:
OS: Ubuntu 18.04,
Memory: 15.7 GiB,
Processor: AMD庐 Ryzen 7 3800x 8-core processor 脳 16,
GPU 4 GiB.
I have followed this link https://carla.readthedocs.io/en/latest/build_linux/#get-assets to build CARLA Simulator in my Ubuntu 18.04 System.
while executing this commandpython3 spawn_npc.py
I got this error
destroying 0 vehicles
done.
Traceback (most recent call last):
File "spawn_npc.py", line 104, in main
world = client.get_world()
RuntimeError: time-out of 10000ms while waiting for the simulator, make sure the simulator is ready and connected to 127.0.0.1:2000
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "spawn_npc.py", line 291, in <module>
main()
File "spawn_npc.py", line 277, in main
client.apply_batch([carla.command.DestroyActor(x) for x in vehicles_list])
RuntimeError: rpc::timeout: Timeout of 10000ms while connecting to 127.0.0.1:2000

Please help me to solve this problem
Thanks in Advance
Malathi
Did you launch the carla server? You need to run CarlaUE4.sh in your Dist folder to launch it.
Thanks for your reply @gsujansai
I tried to use CARLA Simulator Linux build version as instructed in this link https://carla.readthedocs.io/en/latest/build_linux/#get-assets.
CarlaUE4.sh file not available in this CARLA Simulator folder
Hi @Malathi15,
do you really need to build the simulator from scratch? Could you just use the most recent binary release?
Same problem +1
The same problem on version 0.9.9.4 built from source.
I have to build from the source, because I am using MacOS and with some minor tweaking I've managed to build Carla and PythonAPI and the Carla is running, but Python examples cannot connect to the server and fail with the time-out.
I can start Unreal Editor with make launch (or make launch-only), then launch Carla from the editor. I can see, that the UE4Editor process is listening on ports 2000 and 2001. The versions of the server and client can be read and match:
import carla
client = carla.Client(host='127.0.0.1', port=2000)
server_version = client.get_server_version()
client_version = client.get_client_version()
I also see TCP chatter between the client and the server in Wireshark, so the server is definitely running and responding.
However, executing an example (e.g., spawn_npc.py) or trying to load a city with client.load_world('Town03') results in a time-out:
client.load_world('Town03')
RuntimeError: time-out of 10000ms while waiting for the simulator,
make sure the simulator is ready and connected to 127.0.0.1:2000
Hi, Try playing the unreal engine and run the python scripts
Hi @agourishetty93 , this is what I am doing: I am launching Carla by clicking "Play" in UE Editor, the server seems to be starting. Is that what you mean?
Without launching Carla nothing is listening on ports 2000-2001 and client.get_server_version() fails with time-out.
I have the same issue, but in windows... But I couldn't find port number 2000 or 2001 in netstat though.
Hi @Malathi15, Were you able to resolve this issue. I am also facing the same issue. Where can you find the CarlaUE4.sh file ?
I found the CarlaUE4.sh file in release version but i have no idea what to do with it
Thanks in advance
I tried using @agourishetty93's solution. It worked and scripts seems to be running fine
Most helpful comment
Same problem +1