Why put a flight controller in a game engine?
Gazebo is the usual simulator for ArduPilot and ROS. Open 3D Engine (O3DE) offers a different set of strengths:
- Rendering quality. O3DE's Atom renderer produces realistic camera imagery, which is useful for vision and perception work.
- Native ROS 2 support. O3DE's ROS 2 Gems provide sensors and robot controllers you can attach to objects in the editor.
- An open integration problem. There's no ready-made ArduPilot connector for O3DE, so linking the two means designing the integration from scratch.
The goal of the project: a drone in a 3D scene, flown by ArduPilot, streaming a live camera feed, and able to fly missions planned in a ground control station.
The stack
| Layer | Tool | Role |
|---|---|---|
| Middleware | Ubuntu 22.04, ROS 2 Humble | Communication between components |
| Simulator | O3DE with ROS 2 Gems | 3D world, physics, sensors and camera |
| Autopilot | ArduPilot SITL (ArduCopter) | State estimation, flight control, missions |
| Bridge | Custom ROS 2 node | The custom-built component, and the one that connects everything else |
| Ground control | QGroundControl | Mission planning and live map view |
SITL (software-in-the-loop) is the key piece. It's the same ArduCopter firmware that runs on a real flight controller, compiled to run on a PC with a simulator standing in for the real sensors and motors.
Every layer except one is off the shelf. The custom bridge node is what turns these separate tools into a working flight simulator.
How it fits together
The system runs as one closed loop. The simulator reports the drone's state, the autopilot decides what the motors should do, and the bridge turns that decision back into motion in the simulated world.
Every arrow in that loop passes through the bridge. Remove it and the simulator and autopilot have no way to reach each other. The bridge is also deliberately focused: it never sees the mission. Waypoints go straight from QGroundControl to ArduPilot, and all navigation decisions stay inside proven flight firmware. The bridge only translates data between the two systems.
The simulated world
In O3DE, a robot is built in the editor from entities and components and saved as a reusable prefab. The scene contains a ground plane, an environment with lighting and sky, and the drone itself.
The drone is a physics body carrying a set of ROS 2 sensors, including an inertial sensor, positioning and a forward-facing camera that streams live video into ROS 2. A detailed quadcopter model gives it a realistic look, while physics uses a simple shape to keep the simulation fast and stable.
The bridge node: the key to all of it
O3DE and ArduPilot were never designed to work together. No connector exists between them, and nothing in either project expects the other. The custom ROS 2 bridge node is what makes this project possible. Without it there's a game engine and a flight controller running side by side with no way to reach each other. With it, they behave as one flight simulator.
The bridge is the interpreter between the two systems, and it does that job continuously, many times per second:
- Reporting state. It turns the simulator's view of the drone into the sensor data ArduPilot expects, so the autopilot believes it's flying a real aircraft.
- Reconciling coordinate frames. Robotics software and flight controllers use different conventions for which way is up, north and forward. The bridge translates every value consistently.
- Executing commands. It turns ArduPilot's motor outputs into motion the simulator applies to the drone, which closes the loop.
- Keeping time and consistency. Both sides need to see the same vehicle at the same moment. The bridge keeps them in step.
Every capability the project shows depends on this one component: stable hover, autonomous navigation, GPS waypoints and complete missions. The rest of the stack is off the shelf. The bridge is the engineering that makes those tools fly together.
The autopilot handles control and the simulator handles motion. The bridge gives each job one clear owner and keeps the two systems in agreement, so they never compete.
Flying the mission
Missions are planned in QGroundControl over satellite imagery of Chennai and flown fully autonomously. The test mission is a loop: take off, fly to two waypoints in turn, then return to launch.