Object Detection and Avoidance in Urban Environments for Autonomous Aerial Vehicles Using Pixhawk HIL Simulation
Moses E. Okoye, Kaan Ural, Yunus Govdeli · 2025
This paper presents the development of an object detection and avoidance (ODA) system for an uncrewed aerial vehicle (UAV) operating in urban environments, utilizing an open-source Pixhawk flight controller integrated with the RflySim 3D simulation environment. The system is designed to detect obstacles and execute reactive avoidance maneuvers within minimal distances and response times, ensuring safe navigation in cluttered environments. Software-in-the-Loop (SIL) and Hardware-in-the-Loop (HIL) simulations are employed to test and validate the control and avoidance algorithms. MATLAB/Simulink is used for control system design and PX4 firmware modification, while CopterSim enables real-time evaluation under various flight scenarios. QGroundControl provides hardware calibration and mission planning capabilities, and Unreal Engine generates high-fidelity virtual environments to replicate realistic obstacle conditions. The ODA algorithms are implemented in Python. Initial simulation results demonstrate successful obstacle detection and avoidance from multiple approach angles. Further validation through flight tests with onboard cameras is planned. By integrating these tools, the study aims to advance UAV autonomy and operational safety in densely populated urban environments through reliable and efficient obstacle avoidance.