ROS 2 · PX4 · Jetson Orin Nano · OAK-D W · C++/Python · VIO/SLAM · TensorRT

I built this platform around a Holybro X500, Pixhawk 6C, NVIDIA Jetson Orin Nano, and OAK-D W stereo camera. PX4 handles low-level flight control while the Jetson runs sensing, localization, mapping, perception, and the vehicle interface.

30+ min flight endurance · ~25 Hz visual odometry · 0% MAVLink receive loss · <90 ms worst-case TF lag

System Architecture

The onboard software is split into ROS 2 components for sensing, localization, mapping, vehicle communication, and health monitoring. Keeping those pieces separate made it possible to debug or restart one subsystem without taking down the rest of the stack.

The Pixhawk runs PX4. The Jetson serves as the companion computer and communicates with the flight controller over MAVLink. The OAK-D W supplies stereo depth, RGB video, IMU data, visual-inertial odometry, and a separate FPV stream.

Hardware Integration

I selected and integrated the flight controller, companion computer, stereo camera, RC receiver, telemetry link, propulsion system, and power hardware around the X500 frame. Custom Jetson and camera mounts were designed in Fusion 360 and 3D printed for the final assembly.

The completed aircraft was flight-tested before adding higher-level autonomy and achieved more than 30 minutes of flight endurance.

Visual-Inertial Odometry

For local motion estimation without relying on GPS, I configured a custom DepthAI pipeline that combines the OAK-D W stereo cameras and IMU. The same pipeline also provides depth, RGB data, and a hardware-encoded FPV output.

Before sending VIO to the flight controller, I verified its coordinate convention with deliberate forward, left, upward, and yaw movements. The tests confirmed the expected ROS body frame and also showed that the DepthAI velocity output stayed at zero during real motion. I therefore treat the VIO pose as valid while leaving unavailable velocity fields unset rather than feeding bad measurements downstream.

The stable VIO output runs at approximately 25 Hz.

PX4 External Vision

I wrote the ROS 2/MAVSDK interface that converts the VIO estimate into the frame and message format expected by PX4, then sends each new sample to the Pixhawk as MAVLink external-vision odometry.

That integration exposed a separate transport problem. The original Jetson-to-Pixhawk UART link ran at 57,600 baud and became saturated by the odometry stream. On PX4 I was seeing packet loss and round-trip latency in the hundreds of milliseconds even though the VIO source itself was healthy.

After moving the TELEM3 link to 921,600 baud, PX4 received the external odometry at roughly 25 Hz with 0% receive loss, and MAVLink ping latency dropped to only a few milliseconds.

EKF2 Fusion

PX4’s EKF2 estimator can use this external VIO alongside the flight controller’s onboard inertial sensors. The transport, frame conversion, and physical-axis checks are validated; I am currently finishing camera lever-arm calibration and EKF2 fusion testing before using the estimate for autonomous position control.

SLAM and Mapping

I use RTAB-Map for mapping while keeping smooth local VIO separate from map-level corrections. During testing, RTAB-Map exposed a timing problem: the transform coming from the VIO pipeline could lag the corresponding odometry by as much as 2.45 seconds.

I replaced that transform path with a small ROS 2 bridge that republishes the VIO pose using the odometry timestamp. Worst-case TF lag dropped from 2.45 s to under 90 ms, and the system completed a clean 44-node SLAM run without the earlier extrapolation failures.

FPV and Perception

The OAK-D W produces a dedicated 1920×1440, 30 fps H.264 FPV stream with its onboard encoder, so the Jetson does not have to re-encode video just to send it to the ground station.

I am also integrating TensorRT perception output into QGroundControl so detections can be shown directly on the live FPV view alongside normal vehicle telemetry.

Current focus: completing EKF2 external-vision fusion and validating GPS-independent position control in controlled flight tests.

← All projects