End-to-end autonomous driving simulation using Carla, ROS, and PyTorch.
MIT License
This repository provides Docker containers for running end-to-end autonomous driving simulations. Each container is defined by a Dockerfile, and you can run multiple containers simultaneously using Docker Compose. The setup leverages Carla for simulation, ROS for robotics middleware, and Jupyter for interactive development and visualization.
The repository includes three main containers, each serving a distinct purpose in the simulation pipeline:
Follow these steps to set up and run the simulation environment:
Create a .env
file in the root directory of your repository to configure environment variables required by Docker Compose:
# .env file
UID=1000 # User ID of the current user
CARLA_GPU_DEVICES=0 # GPU devices assigned to the Carla container
CARLA_RPC_PORT=2000 # Port number for Carla clients to connect (default: 2000)
JUPYTER_GPU_DEVICES=0 # GPU device assigned to the Jupyter container
JUPYTER_PORT=8888 # Port number for the Jupyter server (default: 8888)
JUPYTER_TOKEN=letmein # Authentication token for the Jupyter server
To set the version of Carla, modify the CARLA_VER
variables in both the compose.yml
. Ensure that the CARLA_VER
value is consistent across containers. The default version is 0.9.15
.
# Example: compose.yml
args:
- CARLA_VER=0.9.15
To enhance your simulation environment with additional maps, download the desired map files from Carla's releases page. Place these files in the root directory of your repository.
Build Containers: Use Docker Compose to build all containers by running:
docker-compose build
Start Containers: Launch the containers using:
docker-compose up
This command will start the Carla simulator, Jupyter Notebook server, and ROS environment, connecting all components as configured.
Access Jupyter Notebooks: Open your web browser and go to http://localhost:8888
(or the port specified in your .env
file). Use the token specified in JUPYTER_TOKEN
to log in.
CARLA_RPC_PORT
and can be interacted with using Carla clients.compose.yml
and ensure that the correct ports are open and not blocked by firewalls.Contributions are welcome! Please open an issue or submit a pull request to contribute to this project.
This project is licensed under the MIT License. See the LICENSE
file for more details.