Run Iris quadcopter simulation with ArduPilot SITL + Webots
This repository contains:
- Webots simulation files in the
Webots/folder (worlds, controllers, protos) - Containerized ArduPilot SITL setup for easy deployment
- Helper scripts to run the simulation with minimal configuration
We strongly recommend using the containerized version to avoid installation overhead and compatibility issues. While you can install Webots and ArduPilot manually if preferred, the containerized approach ensures a consistent environment.
The drone configuration uses the same Iris quadcopter from ArduPilot's default examples, so it should work without parameter modifications.
Important
Navigation scripts will be graded using the container version. Please ensure your code works with this setup.
Create a control script to navigate the drone and complete the objectives described in the task booklet (Phase 2: Drone Airport Navigation).
- World:
Webots/worlds/iris_Task_2.wbt - New task: Navigate the environment following the yellow guiding line and use AprilTags on landing pads to identify airports and landing status.
- The solution must be implemented in Python at
Task/flight.py. Evaluators will change theAirports = []variable in your script when testing.
Solutions must be implemented in Python. Compiled languages (e.g., C++) may be allowed only with prior approval from the technical committee — request approval before proceeding.
- Create your script at
./Task/flight.py - Include all dependencies in
requirements.txt - Run with:
python3 Task/flight.py
- Complete the setup (see Quick Start below)
- Start the simulation and ArduPilot (using
./start.shor manually) - Open Webots and press ▶ (Play)
- Run your solution script
- Linux (Ubuntu 22.04/24.04, Fedora, Debian 12+ recommended)
- Webots R2025a installed and working (installation guide)
- Podman (recommended) or Docker
Note: For Windows installation instructions, see WINDOWS_INSTALLATION.md
Run the interactive setup script that handles everything:
git clone https://github.com/IESL-RoboGames/IESL-RoboGames-Uni-Phase1.git
cd IESL-RoboGames-Uni-Phase1
sudo ./setup.shThe script will:
- Detect your Linux distro and package manager
- Let you choose between Podman (recommended) or Docker
- Install all dependencies step-by-step with your confirmation
- Create the
.envconfiguration file
After setup completes, skip to Step 4: Start the Simulation.
Ubuntu/Debian:
sudo apt update && sudo apt install -y podman podman-composeFedora:
sudo dnf install -y podman podman-composeArch:
sudo pacman -S podman podman-composeVerify installation:
podman --version && podman-compose --versiongit clone https://github.com/IESL-RoboGames/IESL-RoboGames-Uni-Phase1.git
cd IESL-RoboGames-Uni-Phase1
# Copy environment template and adjust paths if needed
cp .env.example .envOpen the .env file and update values if required (paths may vary depending on how Webots is installed).
For Snap installation:
WEBOTS_HOME=/snap/webots/current/usr/share/webots
WEBOTS_TMP_PATH=~/snap/webots/common/tmp/webotsFor standard installation:
WEBOTS_HOME=/usr/local/webots
WEBOTS_TMP_PATH=/tmp/webotsNote: Check your display value with echo $DISPLAY and update if different.
export DISPLAY=:0 # add your value by executing `echo $DISPLAY`python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt./start.shThis script automatically:
- Detects and uses Podman or Docker
- Starts the simulation containers
- Opens the MAVProxy GUI in your browser (via noVNC)
-
Open Webots and load the world:
webots Webots/worlds/iris_Task_2.wbt
Press ▶ (Play) to start
-
Run the flight script (in a new terminal): Run your solution (if you are using python, ensure it is implemented at ./Task/flight.py).
python3 Task/flight.py
./stop.shIf you prefer Docker over Podman:
-
Install Docker: Official Docker Installation
-
Add yourself to the docker group:
sudo usermod -aG docker $USER && newgrp docker
-
Use Docker Compose:
docker compose up -d --build # Start docker compose down # Stop
Verify SITL is running:
python -c "from pymavlink import mavutil; m = mavutil.mavlink_connection('tcp:localhost:5760'); m.wait_heartbeat(); print('✅ SITL connected!')"| Component | Description |
|---|---|
| Host | Runs Webots simulator |
| webots-controller | Bridges Webots ↔ ArduPilot |
| ardupilot-sitl | ArduPilot SITL simulation |
| Port | Service |
|---|---|
| 6080 | noVNC web interface (MAVProxy GUI) |
| 5599 | Camera stream |
| 5760 | MAVLink primary |
| 5762-5763 | MAVLink secondary/tertiary |
| 14550-14551 | MAVLink UDP (GCS) |
from pymavlink import mavutil
master = mavutil.mavlink_connection('tcp:localhost:5760')
master.wait_heartbeat()
print("Connected to ArduPilot SITL")from dronekit import connect
vehicle = connect('tcp:localhost:5760', wait_ready=True)
print(f"Connected: {vehicle.version}")Click to expand
podman-compose logs -f # All services
podman-compose logs -f ardupilot-sitl # Specific servicepodman-compose restart webots-controller
podman-compose restart ardupilot-sitlpodman-compose up -d ardupilot-sitl # SITL only
podman-compose up -d webots-controller # Controller onlypodman-compose build --no-cacheQuick fixes:
- Connection refused? → Wait for SITL to fully initialize (~30 seconds)
- Webots not finding controller? → Check
.envpaths match your installation
