This project contains a multi-container Carla project template for educational purposes.
- Ubuntu 20.04 environment (Ubuntu on WSL may work, not recommended)
- Docker (first install Docker and then follow Docker post-installation steps)
- Docker Compose (install docker-compose)
- Python 3.8 (comes by default in Ubuntu 20.04)
- Install and upgrade
pip
to the latest version - Install
carla
package usingpip install carla==0.9.13
Once your environment set up, start Carla and Carlaviz server from the project directory using
docker-compose --profile carlaviz up -d
Then visit the address localhost:8080
in your browser to see a web-based visualization of the Carla simulation, which uses the default map. You can find an example client script in the project directory and run it using
python client/run.py
and close servers once done using
docker-compose down
The carlaviz
container does not support change of maps at runtime (See the related issue). Follow the steps to change the map in your simulation.
docker-compose up -d
python utils/config.py --map <CARLA_MAPNAME>
docker-compose --profile carlaviz up -d
python client/run.py
where <CARLA_MAPNAME>
denotes a Carla map name Town01
, ..., Town07
, Town10
.
Don't forget to visit localhost:8080
to see the visualization.