# UAV Testing Competition Dataset Unmanned Aerial Vehicles (UAVs) equipped with onboard cameras and various sensors have already demonstrated the possibility of autonomous flights in real environments, leading to great interest in various application scenarios: crop monitoring, surveillance, medical and food delivery. Over the years, support for UAV developers has increased with open-access projects for software and hardware, such as the autopilot support provided by [PX4](https://github.com/PX4/PX4-Autopilot) and [Ardupilot](https://github.com/ArduPilot/ardupilot). However, despite the necessity of systematically testing such complex and automated systems to ensure their safe operation in real-world environments, there has been relatively limited investment in this direction so far. The UAV Testing Competition organized jointly by the [International Conference on Software Testing, Verification and Validation (ICST)](https://conf.researchr.org/home/icst-2026) and [Search-Based and Fuzz Testing (SBFT) workshop](https://search-based-and-fuzz-testing.github.io/sbft26/) is an initiative designed to inspire and encourage the Software Testing Community to direct their attention toward UAVs as a rapidly emerging and crucial domain. The joint call is meant to help interested authors/participants reduce travel costs by selecting the most convenient and close venue. ## Files | File | Description | |------|-------------| | `UAV.db` | SQLite database — all flight data | | [`UAV_notebook.ipynb`](https://huggingface.co/datasets/it4lia/UAV_dataset/blob/main/UAV_notebook.ipynb) | Exploration notebook — visualizations, metrics, ML export, and tools to add new missions | | [`Dataset_gen.ipynb`](https://huggingface.co/datasets/it4lia/UAV_dataset/blob/main/dataset_gen.ipynb) | Python pipeline — scans flight folders and populates the database | | `requirements.txt` | Pinned library versions for reproducible environment setup | Place all files in the same directory before running the notebook. --- ## What's in the database? The database currently holds flights from PX4 simulations. Each flight contains two types of data: **Dynamic data** — sensor time-series recorded during the flight, stored as ULog topics: - `vehicle_local_position` — position in NED frame: x, y, z (meters) and velocity (m/s) - `vehicle_attitude` — orientation as quaternion (w, x, y, z); dimensionless - `sensor_combined` — raw IMU measurements: accelerometer (m/s²), gyroscope (rad/s) - `vehicle_status` — flight mode and arming state **Static data** — simulation conditions set before the flight: - Wind parameters: mean velocity (m/s), direction (unit vector), gusts and variance (m/s) - Obstacle positions (meters) and dimensions — height, length, width (meters) — up to N obstacles per flight - PX4 flight controller parameters: navigation acceptance radius (meters), takeoff altitude (meters), etc. ### Database schema ``` missions └── flights one row per simulation flight ├── flight_context static conditions (wind, obstacles, PX4 params) └── topics ULog topics recorded during the flight ├── topic_fields field names and data types └── topic_data time-series values (long format) ``` `topic_data` uses **long format** — each row is one `(topic_id, row_index, field_name, value)` tuple. The notebook's `get_topic()` helper pivots this into a wide DataFrame automatically. --- ## Quickstart ### Requirements Install dependencies using the provided `requirements.txt` to ensure version compatibility: ```bash pip install -r requirements.txt ``` ### Open the notebook ```bash jupyter notebook UAV_notebook.ipynb ``` The notebook connects to `UAV.db` directly — no additional setup needed. ### Query the database directly ```python import sqlite3 import pandas as pd con = sqlite3.connect("UAV.db") # All flights with duration flights = pd.read_sql( "SELECT iter_number, duration_s FROM flights ORDER BY iter_number", con ) # Position time-series for flight iteration #2 (long → wide) pos_raw = pd.read_sql(""" SELECT td.row_index, td.field_name, td.value FROM topic_data td JOIN topics t ON t.id = td.topic_id JOIN flights f ON f.id = t.flight_id WHERE f.iter_number = 2 AND t.name = 'vehicle_local_position' ORDER BY td.row_index """, con) pos = pos_raw.pivot(index="row_index", columns="field_name", values="value") # Simulation conditions for every flight (wide format) context = pd.read_sql(""" SELECT f.iter_number, c.key, c.value FROM flights f JOIN flight_context c ON c.flight_id = f.id """, con) context_wide = context.pivot_table( index="iter_number", columns="key", values="value" ).reset_index() ``` --- ## ML export Use `build_ml_dataset()` (or run Section 7 of the notebook) to export a flat Parquet file ready for training. Every row is one timestep. Static features are repeated on all rows belonging to the same flight. | Group | Example columns | Note | |-------|-----------------|------| | Time | `timestamp` | Microseconds; resampled to a uniform grid | | Position | `vehicle_local_position__x/y/z` | NED frame (meters) — use `-z` for altitude | | Attitude | `vehicle_attitude__q[0..3]` | Quaternion, scalar-first (w, x, y, z); dimensionless | | Wind | `wind_velocity_mean`, `wind_dir_x/y/z` | Static per flight; velocity in m/s, direction as unit vector | | Obstacles | `obs0_x/y/z/h/l/w`, `obs1_...` | Static per flight; position and dimensions in meters | | PX4 params | `px4_NAV_ACC_RAD`, `px4_MIS_TAKEOFF_ALT` | Static per flight; distances in meters | | Flight ID | `iter_number`, `iter_name` | Use to group or split by flight | --- ## Notebook Inside the notebook you will find everything that can be useful for data science such as statistics, queries, and how the database is structured. There is also code showing how the database is constructed. --- ## Adding new flights Section 8 of the notebook walks through the full import process. In short: 1. Organize your flights under a root folder (one subfolder per iteration, each containing a `.ulg` file and optionally a `.yaml` config) 2. Set `NEW_ROOT_DIR` in the notebook 3. Run the discovery cell to preview what will be imported 4. Run the pipeline cell to write to `UAV.db` You can also call the pipeline directly from Python: ```python from Dataset_gen import run_pipeline run_pipeline( root_dir = "./my_flights", db_path = "UAV.db", ml_topics = ["vehicle_local_position", "vehicle_attitude"], resample_us = 100_000, # 10 Hz downsample_factor = 10, skip_existing = True, ) ``` --- ## Notes - **NED frame**: `z` points downward — use `-z` to get altitude above ground (meters) - **Quaternion convention**: `q[0]` = scalar part (w), `q[1..3]` = vector part (x, y, z) - `topic_data` stores values in long format; use `pivot()` or the `get_topic()` helper to work with it ## Full dataset The full dataset can be found at the website here : https://zenodo.org/records/18727376 ## References If you use this tool in your research, please cite the following papers: - **Sajad Khatiri**, Sebastiano Panichella, and Paolo Tonella, "Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist," *In 2024 International Conference on Software Engineering (ICSE)*. [Link](https://dl.acm.org/doi/10.1145/3639478.3640031). ````{code-block} bibtex @inproceedings{icse2024Aerialist, title={Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist}, author={Khatiri, Sajad and Panichella, Sebastiano and Tonella, Paolo}, booktitle={International Conference on Software Engineering (ICSE)}, year={2024}, } ```` - **SBFT Tool competition report** ````{code-block} bibtex @inproceedings{SBFT-UAV2026, author = {Ramazan Erdem Uysal and Ali Javadi and Prakash Aryan and Aren Babikian and Dmytro Humeniuk and Sajad Mazraehkhatiri and Sebastiano Panichella}, title = {{SBFT} Tool Competition 2026 – UAV Testing Track}, booktitle = {International Workshop on Search-Based and Fuzz Testing, SBFT@ICSE 2026}, year = {2026} } ```` - **ICST Tool competition report** ````{code-block} bibtex @inproceedings{ICST-UAV2026, author = {Ramazan Erdem Uysal and Ali Javadi and Prakash Aryan and Aren Babikian and Dmytro Humeniuk and Sajad Mazraehkhatiri and Sebastiano Panichella}, title = {{ICST} Tool Competition 2026 – UAV Testing Track}, booktitle = {International Conference on Software Testing, Verification and Validation (ICST)}, year = {2026} } ```` - **Sajad Khatiri**, Sebastiano Panichella, and Paolo Tonella, "Simulation-based Test Case Generation for Unmanned Aerial Vehicles in the Neighborhood of Real Flights," *In 2023 IEEE 16th International Conference on Software Testing, Verification and Validation (ICST)*. [Link](https://ieeexplore.ieee.org/document/10132225). ````{code-block} bibtex @inproceedings{khatiri2023simulation, title={Simulation-based test case generation for unmanned aerial vehicles in the neighborhood of real flights}, author={Khatiri, Sajad and Panichella, Sebastiano and Tonella, Paolo}, booktitle={2023 16th IEEE International Conference on Software Testing, Verification and Validation (ICST)}, year={2023}, } ```` ## License The software we developed is distributed under the Apache 2.0 license. See the [LICENSE](./LICENSE) file. ## Contacts Please refer to the [FAQ page](https://github.com/skhatiri/UAV-Testing-Competition/wiki/Home) in the Wiki. You may also refer to (and contribute to) the [Discussions Page](https://github.com/skhatiri/UAV-Testing-Competition/discussions), where you may find user-submitted questions and corresponding answers. You can also contact us directly using email: - Ramazan Erdem Uysal, University of Bern, ramazan.uysal@unibe.ch - Ali Javadi, University of Bern, ali.javadi@unibe.ch, - Prakash Aryan, University of Bern, prakash.aryan@unibe.ch - Loubet--Bonino Grégory, University of Bern, gregory.loubet-bonino@unibe.ch - Aren Babikian, University of Toronto, aren.babikian@utoronto.ca - Dmytro Humeniuk, Polytechnique Montréal, dmytro.humeniuk@polymtl.ca, - Sajad Mazraehkhatiri, University of Bern, sajad.mazraehkhatiri@unibe.ch - Sebastiano Panichella, AI4I - The Italian Institute of Artificial Intelligence for Industry, sebastiano.panichella@ai4i.it