CARLA Simulator version 0.9.12 prepared for headless operation
748
Nothing fancy here, just the docker image (tag 0.9.13) from carlasim using a different script to start the simulation headlessly, and extra packages (sudo, vim...) installed.
You must have docker and nvidia-docker2 installed. Tested ONLY on Ubuntu 20.04.3 LTS, kernel 5.8.18, and NVIDIA Driver Version: 470.63.01.
You can change --gpus 0 to --gpus all or ---gpus <some_number> if you have more than one GPU.
docker run --rm -it --name carla-container -u carla -p 2000-2002:2000-2002 --gpus 0 ricardodeazambuja/carlasim:0.9.13_headless ./launch_headless.sh
Press ENTER to kill the simulator (it takes some seconds until it dies...).
docker cp carla-container:/home/carla/PythonAPI .
conda create --name carla-simulator --clone base
conda activate carla-simulator
pip install --upgrade pip
cd PythonAPI/examples/
pip install -r requirements.txt
cd ../carla/dist/ #it's inside PythonAPI/carla/dist
pip install carla-0.9.13-cp37-cp37m-manylinux_2_27_x86_64.whl
If pip complains and you are sure the Python version is correct, one possible solution is to upgrade pip itself:
python -m pip install --upgrade pip
python generate_traffic.py
It should print spawned 30 vehicles and 10 walkers, press Ctrl+C to exit.
Open a new terminal (don't forget to run conda activate carla-simulator) the and type:
python synchronous_mode.py
It should open a pygame display with a random vehicle moving through the town (with the focus on the pygame display, press ESC to exit).
Content type
Image
Digest
sha256:4c9f76b1a…
Size
6.6 GB
Last updated
about 3 years ago
docker pull ricardodeazambuja/carlasim:0.9.13_headless