Installation and Configuration Instructions

This section provides detailed instructions on how to install and configure the necessary tools for running CARLA, SUMO, and their co-simulation.

System Requirements

Before starting the installation, ensure your system meets the following requirements:

  • Operating System: Ubuntu 20.04 or later is recommended.

  • CPU: Multi-core processor (Intel i5 or better).

  • RAM: At least 16 GB of RAM.

  • Graphics: NVIDIA GPU with CUDA support (for CARLA).

  • Disk Space: At least 50 GB of free disk space.

Installing CARLA

  1. Download CARLA:

    Visit the CARLA official website. Download the latest release compatible with your operating system.

  2. Extract CARLA:

    Extract the downloaded file to a desired directory.

    Example:

    tar -xvf CARLA_0.9.13.tar.gz -C ~/carla
    
  3. Install Dependencies:

    CARLA requires several dependencies, which can be installed with the following command:

    sudo apt-get update
    sudo apt-get install clang-8 lld-8 python3-pip python3-dev
    pip3 install --user pygame numpy
    
  4. Running CARLA:

    Navigate to the CARLA directory and run the simulator:

    cd ~/carla
    ./CarlaUE4.sh
    

Installing SUMO

  1. Add SUMO PPA:

    Add the SUMO PPA to your package manager and update:

    sudo add-apt-repository ppa:sumo/stable
    sudo apt-get update
    
  2. Install SUMO:

    Install SUMO and its dependencies:

    sudo apt-get install sumo sumo-tools sumo-doc
    
  3. Verify Installation:

    Check if SUMO is correctly installed by running:

    sumo --version
    

    This should display the installed version of SUMO.

Setting Up Co-Simulation

  1. Clone Co-Simulation Repository:

    Clone the repository that contains the co-simulation setup:

    git clone https://github.com/example/sumo-carla-co-simulation.git
    cd sumo-carla-co-simulation
    
  2. Install Python Dependencies:

    Install the required Python packages:

    pip3 install -r requirements.txt
    
  3. Configure Environment:

    Ensure that the paths to CARLA and SUMO are correctly set in the environment variables. You can add the following to your ~/.bashrc file:

    export CARLA_ROOT=~/carla
    export SUMO_HOME=/usr/share/sumo
    export PYTHONPATH=$PYTHONPATH:~/carla/PythonAPI/carla
    
  4. Run Co-Simulation:

    Navigate to the co-simulation directory and run the script to start the co-simulation:

    python3 run_co_simulation.py