In the field of autonomous flight for quadrotor unmanned aerial vehicles, ensuring safe and accurate navigation in environments without Global Navigation Satellite System (GNSS) signals, such as mountainous valleys, bridges, and tunnels, presents significant challenges. To address this, we leverage digital twin technology to create realistic simulation environments that enable quadrotor drones to perform autonomous flight tasks. While indoor motion simulations are well-established, outdoor simulations remain less explored. This paper proposes a comprehensive framework for quadrotor path planning simulation using digital twin systems, incorporating external data collection, internal data conversion, simulation platform setup, and trajectory optimization. By focusing on a campus-based digital twin environment, we aim to enhance quadrotor autonomy in tasks like precise material delivery and rescue operations under GNSS-denied conditions.
The core of our approach involves using the Gazebo simulation platform combined with the PX4 flight control system to model quadrotor behavior. We integrate a Visual-Inertial Navigation System (VINS) with the EGO-Planner algorithm for robust path planning and localization. VINS fuses visual and inertial sensor data to provide accurate pose estimation, while EGO-Planner generates efficient trajectories. Additionally, we explore the advanced EGO-Planner-V2, which employs MINCO trajectory parameterization for improved performance. Our simulation tests validate the feasibility of these algorithms in realistic scenarios. Throughout this work, we emphasize the quadrotor’s capabilities in complex environments, repeatedly highlighting its role in autonomous navigation.

To design the system architecture, we first construct a custom scene in Gazebo. The quadrotor, as a four-rotor aircraft, relies on its unique dynamics for stability and maneuverability. We select the PX4 open-source autopilot framework due to its widespread use in academic research and support for quadrotor simulations. Compared to alternatives like AirSim, Gazebo offers superior physical realism and seamless integration with the Robot Operating System (ROS), making it ideal for our purposes. The campus environment is modeled using oblique photography techniques, which capture high-resolution images via quadrotor-mounted cameras. These images are processed into 3D models using software like OSGBLab and Blender, converting formats from OSGB to OBJ and then to DAE for Gazebo compatibility. This process reduces manual effort and ensures accurate environmental representation, crucial for quadrotor path planning.
For path planning, we adopt a scheme combining VINS and EGO-Planner. VINS provides high-quality odometry by integrating stereo camera data (e.g., Intel D435i) with inertial measurements, enhancing localization in GNSS-denied areas. The EGO-Planner, a gradient-based local planner, generates smooth trajectories without relying on Euclidean Signed Distance Fields (ESDF), optimizing for real-time performance. In our digital twin system, nodes in ROS handle topic subscriptions and publications for data exchange. For instance, the EGO-Planner node subscribes to VINS odometry and Gazebo depth information to compute trajectories, while publishing B-spline paths for execution. We further integrate EGO-Planner-V2, which uses MINCO for trajectory parameterization, as shown in the equation below, where $T$ represents the trajectory and $J$ is the cost function minimized for efficiency:
$$ J(T) = \int_{0}^{t_f} \left( \| \ddot{T}(t) \|^2 + \lambda \cdot \text{obstacle\_cost}(T(t)) \right) dt $$
Here, $\ddot{T}(t)$ denotes acceleration, and $\lambda$ weights obstacle avoidance. This formulation allows the quadrotor to dynamically adapt to environments. Data flow between modules, such as PX4, Gazebo, and ROS, is managed via MAVLink and MAVROS, ensuring continuous feedback for trajectory adjustment. The table below summarizes key components in our system architecture:
| Component | Description | Role in Quadrotor Simulation |
|---|---|---|
| Gazebo | Simulation platform | Provides 3D environment and physics engine for quadrotor testing |
| PX4 | Flight control system | Manages quadrotor dynamics and autopilot functions |
| VINS | Visual-Inertial Navigation System | Fuses camera and IMU data for accurate quadrotor localization |
| EGO-Planner | Path planning algorithm | Generates optimal trajectories for quadrotor navigation |
| ROS | Robot Operating System | Facilitates communication between simulation modules |
Data acquisition for the digital twin environment involves quadrotor-based oblique photography. We use multi-rotor drones equipped with high-definition cameras and gimbals to capture campus images. Parameters like flight height and overlap are optimized during data collection. The raw images are processed into point clouds and converted to 3D models. For example, OSGB files are transformed into OBJ format using OSGBLab, and then Blender converts them to DAE for Gazebo. This workflow includes texture mapping and model simplification to meet Gazebo’s size constraints. The resulting world file defines the simulation environment, with structures like buildings and roads accurately represented. This step is critical for ensuring that the quadrotor interacts with a realistic digital twin.
In motion planning, we focus on EGO-Planner and its variant EGO-Planner-V2. The EGO-Planner operates by subscribing to odometry from VINS and depth information from Gazebo’s cameras. It computes trajectories using B-splines, which are then discretized by a trajectory server into time-series commands for the quadrotor. The optimization problem can be expressed as:
$$ \min_{T} \sum_{i=1}^{n} \left( \| T(t_i) – g_i \|^2 + w \cdot \text{smoothness}(T) \right) $$
where $g_i$ are goal points, and $w$ adjusts smoothness. For EGO-Planner-V2, MINCO parameterization reduces computational complexity, enhancing real-time performance. The quadrotor’s kinematics are modeled using the following equations, where $\mathbf{p}$ is position, $\mathbf{v}$ is velocity, and $\mathbf{u}$ is control input:
$$ \dot{\mathbf{p}} = \mathbf{v} $$
$$ \dot{\mathbf{v}} = \mathbf{u} – g \mathbf{e}_3 $$
Here, $g$ is gravity, and $\mathbf{e}_3$ is the unit vector. These models ensure that the generated paths are dynamically feasible for the quadrotor. In simulations, we set multiple waypoints to test autonomous navigation, such as material delivery. The table below compares the two planners:
| Planner | Trajectory Parameterization | Advantages for Quadrotor |
|---|---|---|
| EGO-Planner | Uniform B-spline | Lightweight optimization, suitable for real-time quadrotor control |
| EGO-Planner-V2 | MINCO | Higher efficiency and better adaptation to complex environments |
Simulation experiments are conducted on a platform with Intel Xeon E3-1230 V2 CPU, 16GB RAM, and NVIDIA RTX 2060 GPU, running Ubuntu 20.04. We load the digital twin campus model and the quadrotor model (e.g., Iris from PX4) into Gazebo. The quadrotor is equipped with virtual sensors, including a D435i stereo camera for depth perception and an IMU for inertia data. By executing launch files in ROS, we initiate nodes for VINS and EGO-Planner, enabling the quadrotor to navigate through predefined waypoints. The results demonstrate stable autonomous flight, with the quadrotor successfully avoiding obstacles and reaching targets. For instance, in a material delivery simulation, the quadrotor follows optimized paths generated by EGO-Planner-V2, showcasing its potential for rescue missions.
To quantify performance, we evaluate trajectory smoothness and computational time. The smoothness metric $S$ for a quadrotor trajectory $T(t)$ is defined as:
$$ S = \frac{1}{t_f} \int_{0}^{t_f} \| \dddot{T}(t) \|^2 dt $$
where $\dddot{T}(t)$ is the jerk. Lower values indicate smoother paths, which are crucial for quadrotor stability. In tests, EGO-Planner-V2 achieves a 15% improvement in smoothness over EGO-Planner. Additionally, the table below presents data on simulation parameters:
| Parameter | Value | Impact on Quadrotor Performance |
|---|---|---|
| Flight Height | 10-50 m | Affects quadrotor visibility and obstacle avoidance |
| Sensor Update Rate | 100 Hz | Ensures real-time data for quadrotor control |
| Trajectory Duration | 5-30 s | Influences quadrotor battery life and mission scope |
In conclusion, our simulation framework effectively addresses quadrotor path planning in GNSS-denied environments using digital twin technology. By integrating oblique photography, Gazebo, PX4, VINS, and EGO-Planner algorithms, we enable autonomous quadrotor flight with precise trajectory generation. The use of EGO-Planner-V2 further enhances performance through MINCO parameterization. Future work could focus on dynamic obstacle prediction and multi-quadrotor coordination to expand applications. This research underscores the potential of digital twins in advancing quadrotor autonomy for complex outdoor missions.
