scieee AI-readable full text Open interactive document viewer

SUMO-UAV-Py: A SUMO Plugin For UAV-Based Road Traffic Sensing

Tsioutis, Charalambos; Makridis, Christos; Timotheou, Stelios

Abstract

In recent years, Unmanned Aerial Vehicles (UAVs) have emerged as effective tools for traffic monitoring and control by offering high-resolution, aerial observations of vehicular movement. Although UAV simulation is well established, tools to capture microscopic traffic measurements from UAV-based observations remain limited. This paper introduces SUMO-UAV-Py, an open-source SUMO plugin that integratesUAV-based sensing into microscopic traffic simulations in Python. SUMO-UAV-Py captures detailed vehicle observations by dynamically employing multiple UAVs to observe traffic measurements based on their position and field-of-view (FoV). Performance evaluations on a mid-sized network demonstrate that SUMO-UAV-Py maintains simulation performance comparable to standard post-processing methods, confirming its suitability for large-scale traffic monitoring research.

Full text

SUMO User Conference 2025 Conference paper https://doi.org/10.52825/scp.v6i.2610 © Authors. This work is licensed under a Creative Commons Attribution 3.0 DE License Published: 15 Jul. 2025 SUMO-UAV-Py: A SUMO Plugin for UAV-Based Road Traffic Sensing Charalambos Tsioutis1,* , Christos Makridis1,2 , and Stelios Timotheou1,2 1KIOS Center of Excellence, University of Cyprus, Cyprus 2Department of Electrical and Computer Engineering, University of Cyprus, Cyprus *Correspondence: Charalambos Tsioutis Abstract. In recent years, Unmanned Aerial Vehicles (UAVs) have emerged as effective tools for traffic monitoring and control by offering high-resolution, aerial observations of vehicular movement. Although UAV simulation is well established, tools to capture microscopic traffic measurements from UAV-based observations remain limited. This paper introduces SUMO-UAV-Py, an open-source SUMO plugin that integrates UAV-based sensing into microscopic traffic simulations in Python. SUMO-UAV-Py captures detailed vehicle observations by dynamically employing multiple UAVs to observe traffic measurements based on their position and field-of-view (FoV). Performance evaluations on a mid-sized network demonstrate that SUMO-UAV-Py maintains simulation performance comparable to standard post-processing methods, confirming its suitability for large-scale traffic monitoring research. Keywords: UAV-Based Sensing, Open-Source Tools, Traffic Monitoring 1. Introduction Traffic simulation is an essential tool for analyzing and improving modern transportation systems. As urban environments grow more complex, the need for accurate and scalable traffic monitoring solutions has become increasingly evident. Among emerging sensing technologies, Unmanned Aerial Vehicles (UAVs) have gained significant attention for their ability to monitor road networks from an aerial perspective using onboard cameras. UAV-based sensing has been widely explored for a variety of transportationrelated applications, including traffic monitoring, control, and data collection [1], [2], [3]. However, despite their potential, conducting real-world UAV experiments can be challenging due to operational constrains and regulatory restrictions, making simulationbased approaches an attractive alternative for the development and validation of UAVbased traffic sensing. UAV-based microscopic simulation can provide fine-grained traffic data that many existing studies currently lack. For instance, some works on UAV-based traffic state estimation rely solely on macroscopic measurements (e.g., average density and speed) [4], [5], thus missing the opportunity to capture individual vehicle interactions. Such 65 Tsioutis et al. |SUMO Conf Proc 6 (2025) ”SUMO User Conference 2025” efforts could benefit from a UAV-based microscopic framework, which enables higherresolution data collection for more accurate validation in traffic monitoring approaches. Despite the growing body of work on UAV-based traffic estimation, few traffic simulators frameworks explicitly focus on integrating UAV sensing at a microscopic level within large-scale transportation simulations. SUMO (Simulation of Urban MObility)[6] is a well-established, open-source traffic simulator designed for microscopic modeling of complex road networks. Its open-source nature is potentially suitable for UAV research, as it enables customizable data extraction and manipulation through tools like the TraCI interface. To effectively enable UAV operations, in SUMO, we present a new open-source plugin, SUMO-UAV-Py, that extends SUMO’s capabilities to incorporate UAV-based sensing. The plugin’s goal is to simulate the aerial vantage point and data collection processes of UAV traffic monitoring in an efficient and flexible manner. While SUMOUAV-Py does not explicitly focus on high-fidelity UAV flight physics, its modular architecture allows the integration of external modules or extended libraries to accommodate advanced aerodynamic and environmental models. The plugin enables multiple UAVs to be freely positioned above the road network, collecting detailed vehicle-level information and thus allowing researchers to evaluate the performance of UAV-based algorithms before deploying them in real-world scenarios. Our contributions in this paper include the development of SUMO-UAV-Py, an open-source and lightweight plugin for SUMO that enables UAV-based microscopic traffic observations. SUMO-UAV-Py offers a flexible, modular framework that supports dynamic UAV positioning while capturing detailed vehicle-level information during simulations, providing a robust platform for aerial traffic monitoring. The remainder of this paper is organized as follows. Section 2 reviews existing software and simulation frameworks that combine UAVs and traffic networks, highlighting the gap addressed by our proposed plugin. Section 3 details the architecture and design principles of SUMO-UAV-Py, while Section 4 presents the plugin’s user options and features. Section 5 presents an experimental use case and performance results. Finally, Section 6 concludes the paper and outlines future work directions. 2. Related Work A variety of simulation platforms and co-simulation strategies have been proposed to study UAVs in either autonomous navigation or broader traffic management contexts. High-fidelity environments like AirSim [7] leverage the Unreal Engine to simulate realistic visual and physical conditions for autonomous vehicles, while other environments couple SUMO and AirSim to explore lane-based Unmanned Traffic Management (UTM) concepts [8]. Similarly, UTSim [9] targets UAV air traffic control and communication aspects, and commercial traffic simulators such as PTV Vissim have been adapted for 3D UAV visualization [10]. In the context of open-source UAV simulation, UavSim [11] provides a lightweight platform for comparing multi-UAV path planning algorithms, and [12] introduces a modular UAV simulation framework that provides kinematic and energy models of multiple UAVs. Another study [13], explores UAV swarm navigation in urban environments, using sensing for velocity and position estimation within the swarm while [14] introduces a co-simulation framework for UAV physics and wireless communication modeling. In contrast, the work in [15] aims to simulate a swarm of drones for traffic monitoring in the context of a Smart City developed in Unity game engine. 66 Tsioutis et al. |SUMO Conf Proc 6 (2025) ”SUMO User Conference 2025” While these tools and frameworks provide robust solutions for UAV flight dynamics, swarm coordination, or communication modeling, they generally do not prioritize or fully implement UAV-based ground traffic sensing at a vehicle-level scale. In contrast, SUMO-UAV-Py aims to fill this gap by integrating a lightweight, open-source extension for a microscopic UAV-based traffic observation. In addition to the UAV simulation frameworks discussed above, several established microscopic traffic simulators are widely used for modeling urban traffic. Commercial products such as Aimsun provide detailed microscopic simulation and analysis, including support for pedestrians, bicycles, and vehicles exhibiting non-lane-based behavior [16]. Also, VISSIM offers a multimodal traffic simulation environment with a user-friendly interface and high-quality 3D visualization [17]. Among the open-source options, MITSIMLab is a microscopic traffic simulation model that assesses the effects of different traffic management system designs on operational performance [18], and MATSim supports large-scale, agent-based simulations [19]. SUMO is an open-source microscopic traffic simulator under active development that is highly configurable and provides direct data access via the TraCI interface, making it particularly well-suited for integrating our UAV-based sensing plugin and achieving detailed, real-time microscopic traffic observations. Through direct access to SUMO’s internal states via TraCI, SUMO-UAV-Py aims to support real-time vehicle-level data collection, while allowing users to modify UAV trajectories dynamically. Moreover, its modular design facilitates coupling with external simulators or advanced UAV models, ensuring flexibility for researchers who require refined aerodynamics, path planning, or environmental conditions. 3. Plugin Architecture SUMO-UAV-Py is a Python-based plugin designed to integrate SUMO’s traffic simulation with UAV-based sensing. It accepts user-defined drone parameters, launches SUMO with the specified network configuration, and generates detailed aerial observations of vehicular traffic at each simulation step. In this section, we examine SUMOUAV-Py’s implementation, including its communication framework, the implemented UAV motion model, and our visualization technique. 3.1 Implementation Overview Figure 1. High-level overview of SUMO-UAV-Py: initial parameters from configuration files are used to initialize SUMO and SUMO-UAV-Py, which communicates with SUMO-UAV-Py, to allow the communication between the two entities. The output of SUMO-UAV-Py is stored as a file containing Microscopic UAV Observations. 67 Tsioutis et al. |SUMO Conf Proc 6 (2025) ”SUMO User Conference 2025” Figure 1 presents a high-level diagram of SUMO-UAV-Py’s architecture. Two configuration files serve as the initial inputs: the SUMO configuration file, which provides the network topology and simulation parameters, and the SUMO-UAV-Py configuration file, which specifies all UAV-related settings, including the total number of UAVs, their speed, rotation speed, and field-of-view (FoV) angles. SUMO supplies network and traffic data to SUMO-UAV-Py, while SUMO-UAV-Py sends updated UAV positions and orientations back to SUMO. The plugin then records all drone-based observations in an output file. The UMO-UAV-Py configuration file includes a list of 5D waypoints for each UAV,  S  given by t, x, y, z, ϕ . Here, t is the simulation time in which the UAV starts its movement to a position (x, y z), with a yaw orientation ϕ. The output file contains attributes that mimic real-world UAV sensor data for each simulation step, as detailed in Table 1. Table 1. Output File Attributes. Attribute Name Type Description Step Number Current simulation step number. Seconds Number Simulation time in seconds. UAV ID String Unique identifier of each UAV. UAV Pos (x, y, z, ϕ)4D coordinates of each UAV. VehicleID String IDs of the detected vehicle. Veh Pos (x, y)2D coordinates of each detected vehicle. Veh Speed Number Speed of each detected vehicle. 3.2 Communication The core of SUMO-UAV-Py’s implementation relies on a TCP-based communication loop between SUMO, TraCI, and the SUMO-UAV-Py Python script, as illustrated in Figure 2. At each simulation step, SUMO-UAV-Py computes the UAV’s new position, sends it to SUMO via TraCI, and retrieves the list of vehicles that fall within the UAV’s calculated FoV. This connection enables continuous monitoring of both UAV motion and network-wide vehicle states. To optimize performance, SUMO-UAV-Py uses TraCI’s object variable subscription to specify a set of variables (e.g., position, speed) that should be automatically returned in each step, avoiding the overhead of individually querying every vehicle. 3.3 Motion Model To define each UAV’s trajectory, SUMO-UAV-Py reads an initial 5D waypoint t0, x0, y0, z0, ϕ0and the next 5D waypoint t, x, y, z, ϕ. At simulation time t, the UAV rotates from ϕ0to align with the direction of (x, y, z), then moves from (x0, y0, z0) toward (x, y, z). Upon arrival, the UAV performs a final rotation to match the yaw angle ϕ. This sequence of moves ”rotate-move-rotate” provides a basic yet flexible approach for most UAV path scenarios. In SUMO-UAV-Py the transitions between waypoints follow a lightweight linear approach model. Given two 3D points x1, y1, z1and x2, y2, z2, the travel distance is computed as the Euclidean distance d=p(x2−x1)2+ (y2−y1)2+ (z2−z1)2.(1) 68 Tsioutis et al. |SUMO Conf Proc 6 (2025) ”SUMO User Conference 2025” Figure 2. Sequence diagram of TCP communication among SUMO and SUMO-UAV-Py, using TraCI. The number of steps required to reach the next waypoint, with a simulation step length ∆tand horizontal speed v, is calculated using Nmove =d v∆t.(2) Similarly, to calculate the number of rotation steps needed to cover a yaw-angle difference ∆ϕwith yaw rate ωwe use Nrotate =∆ϕ ω∆t.(3) For more complex flight paths the plugin is integrated with a discrete movement option that overrides the built-in dynamics, in which users manually supply 5D waypoints (t, x, y, z, ϕ), enabling seamless coupling with external trajectory planners. Furthermore, SUMO-UAV-Py is able to determine the vehicles observable to each deployed UAV by calculating their camera FoV. The camera is fixed at a 90-degree angle relative to the ground, yielding a rectangular projection whose width and height scale linearly with altitude h. As illustrated in Fig. 3, for camera angles α(horizontal) and β(vertical), the half-view tangent geometry gives FoVx= 2 htan α 2, FoVy= 2 htan β 2,(4) which are used to compute the FoV rectangle. The computed dimensions F oVxand F oVydefine a rectangle centered at the UAV’s current position (xu, yu), oriented according to the UAV’s yaw angle ϕ. To evaluate which vehicles are visible during each simulation step, SUMO-UAV-Py computes the global coordinates of the rectangle’s corners after applying a planar rotation around the UAV center. To compute the rotated position of a FoV corner, the point (x, y), defined in the local axis-aligned FoV frame, is first translated so that the UAV center (xu, yu)is moved 69 Tsioutis et al. |SUMO Conf Proc 6 (2025) ”SUMO User Conference 2025” Figure 3. Rectangular FoV representation for a 90◦camera angle at height h. to the origin. A rotation by the yaw angle ϕis then applied using a 2D rotation matrix. After the rotation, the point is translated back to its position relative to the UAV in the SUMO coordinate frame. This results in the following transformation: x′ y′!=R(ϕ)"x y−xu yu#+xu yu,(5) where R(ϕ)is the 2D rotation matrix defined as: R(ϕ) = cos ϕ−sin ϕ sin ϕcos ϕ.(6) Here, (x, y)are the local coordinates of a FoV corner, and (x′, y′)are the corresponding coordinates in the global SUMO frame. This procedure is applied to all four corners of the FoV rectangle to compute its rotated projection on the plane. Vehicles whose positions fall within this transformed rectangle are marked as visible and recorded, based on data retrieved via TraCI subscriptions at each simulation step. 3.4 Visualization When SUMO runs in graphical mode, SUMO-UAV-Py visually represents each UAV and its FoV by drawing polygons and points-of-interest (POIs). The rectangular FoV polygon moves and rotates with the UAV’s position (x, y, z)and yaw angle ϕ. Also, it changes size relative to the UAV’s altitude. The UAV position is marked with a POI icon. Figure 4 shows an example screenshot of these polygons and POIs in SUMO’s GUI. 70 Tsioutis et al. |SUMO Conf Proc 6 (2025) ”SUMO User Conference 2025” Figure 4. Example screenshot of SUMO-UAV-Py’s polygonand POI-based visualization in SUMO’s GUI. 4. User Options and Features The plugin offers a wide range of user-oriented features that maximize flexibility and ease of configuration. In addition to the ability to bypass UAV graphics for performanceoriented experiments, users can tailor multiple aspects of the simulation to fit specific research scenarios. These options can be selected via the configuration file. 4.1 UAV Model Parameters The UAV dynamics generated by SUMO-UAV-Py are described by a lightweight linear motion model as stated in Section 3.3. However in respect to realistic modeling of speed, FoV characteristics and battery life approximations SUMO-UAV-Py comes with two preset options of well-known commercial UAV models: Mavic 2e [20] and Mini 3 pro [21]. For further customization, the plugin offers a Manual option, which allows users to specify custom values for maximum speed, yaw rate, and FoV dimensions. The optional battery mode can be enabled, to assign a finite flight duration to each UAV. When battery levels drop to five minutes remaining, a warning is issued, and if depleted, the UAV ceases operation. This feature is essential for simulating realistic mission constraints. 4.2 UAV Observation Mode SUMO-UAV-Py supports three observation modes: •Hovering: The UAV rotates and moves toward the next waypoint, moving with a uniform speed. When it reaches the desired waypoint, it hovers until its time to move to the next waypoint. Hovering mode collects data continuously regardless of being stationary or in motion. •Sampling: The UAV follows the same motion pattern as in Hovering mode, but records data only when stationary, thus capturing isolated sampling points. •Spinning: Upon reaching a waypoint, the UAV rotates in place to maximize its FoV by covering a full or partial rotation. This mode is particularly useful when a wide-angle observation is desired as illustrated in figure 5. 4.3 Real-time interactions In parallel with the TraCI loop, SUMO-UAV-Py implements a separate threaded mechanism to handle real-time interactions to modify the existing UAV flight paths or add new 71 Tsioutis et al. |SUMO Conf Proc 6 (2025) ”SUMO User Conference 2025” Figure 5. FoV coverage visualization in the 2D plane in the Spinning UAV Observation Mode for different simulation steps. ones. This thread allows users to submit new waypoints in real-time (either through a local interface or an optional remote connection). Such interactions immediately update the drone’s trajectory without pausing the simulation, allowing the users of SUMO-UAVPy to implement their own open-loop or closed-loop logic, to dynamically adjust UAV positions as the simulation proceeds. The local interface for real-time modifications its shown in figure 6. Figure 6. SUMO-UAV-Py interface for real-time UAV updates. 4.4 GUI Dialog SUMO-UAV-Py provides a GUI dialog that includes all user-defined parameters in a single interface. This interface allows users to configure the total number of UAVs, select flight modes, set battery options, and specify the network and SUMO configuration file among others. Figure 7 shows the dialog window, illustrating how various simulation and UAV settings are easily accessible in one place. 72 Tsioutis et al. |SUMO Conf Proc 6 (2025) ”SUMO User Conference 2025” Figure 7. GUI dialog for SUMO-UAV-Py configuration and user options selection. 5. Performance Evaluation To evaluate SUMO-UAV-Py’s computational overhead, we conducted a benchmark using a real-world traffic scenario from the city of Bologna [22] (A.Costa scenario from iTetris). The scenario includes 8,600 vehicles, 179 edges, 112 nodes, 267 lanes and a total lane length of 33.52 km. All simulations covered three hours of virtual time and were executed on a machine with a 12th Gen Intel®CoreTM i9-12900K processor and 32 GB of RAM. We compared two approaches for capturing vehicle-level measurements of traffic: •SUMO-UAV-Py Logging (No GUI): SUMO-UAV-Py records all vehicles within each UAV’s FoV in real time. The number of UAVs was varied from 0 to 32 across different runs. •Post-Analysis Parsing: SUMO was run in an identical setup, generating floating car data (fcd-output) file instead of the SUMO-UAV-Py implementation. A Python script using the library xml.etree.ElementTree then parsed the file to identify the same vehicles that would have been observed by the UAV(s). Each scenario was executed five times for each UAV count (0 to 32) under identical conditions. We recorded the total simulation time, including post-processing in the second approach, and then computed average run times and standard errors. Figure 8 shows the results, where the “Plugin” line corresponds to aerial measurements logged by SUMO-UAV-Py and the “Post-Analysis” line represents offline parsing method. Importantly, the UAV=0 case reflects the base simulation performance of SUMO without any UAV logging. In this case, SUMO-UAV-Py simply initializes but performs no additional computations. This allows us to measure the plugin’s overhead relative to SUMO’s base performance. In the figure, a horizontal line indicates this base SUMO timing as a reference. For the case of zero UAVs, SUMO-UAV-Py runs faster than the post-analysis approach, because the latter requires additional processing to write and export the floating car data file. As the number of UAVs increases, the run times for both methods remain comparable, and there are instances in which SUMO-UAV-Py outperforms the post-analysis script. This result is partly due to SUMO-UAV-Py logging only those vehicles within each UAV’s FoV, while the post-analysis method processes the entire network file. Overall, the extra computational cost of SUMO-UAV-Py’s real-time data 73