alan yin
← Work

Vision-Guided Autonomous Drone

Time
June 2026 – present
Context
Personal project
Role
Mechanical, electrical, software
Relevant skills
Python · ArduPilot · OpenCV · Soldering · 3D printing · CAD (SolidWorks)
The quadcopter from above: four three-blade propellers on a carbon frame, with the Raspberry Pi and wiring mounted over the flight-controller stack.
The quadcopter from the side, showing the camera on its front mount and the flight-controller stack.

The finished first version, from above and from the side.

Motivation

The project is inspired by the idea of applying autonomous drones in warehouse inventory management for inaccessible places.

About

A custom built 7-inch quadcopter with an onboard camera and Raspberry Pi companion computer. Through its onboard camera, the drone is capable of pose estimation and navigation using AprilTags while also performing text detection in its surroundings. The drone is capable of understanding its position relative to AprilTags and uses this awareness to autonomously navigate its environment so that it reaches a preset distance and orientation away from the AprilTag center to hold.

Contributions

  • Custom CAD-modeled 7-inch quadcopter frame on top of pre-existing popular FPV designs. I modified it to carry the Raspberry Pi, camera, and GPS.
  • Designed and CAD-modeled a custom mount for the Raspberry Pi, camera, and GPS. 3D-printed with PETG filament and attached to the final build.
  • Soldered and wired all the necessary electronics. This included the flight controller, ESC, GPS, radio receiver, UART connection between the Pi and the flight controller, and a custom power distribution system using a 6S LiPo battery.
  • Wrote the software using Python and the OpenCV library for tag detection and pose estimation, text detection, and communication with the flight controller.

Function

The onboard camera continuously captures images of the environment in real time. The Raspberry Pi pre-processes and optimizes this camera feed before running the AprilTag detection algorithm, which returns the drone’s relative position and orientation away from the center of the tag. This is then used to send commands to the flight controller which adjusts the motor behavior in order to maintain the desired fixed distance and orientation away from the center of the tag. A parallel loop runs continuous text detection and stores any text found for later processing.

If the tag is lost, the drone will hold the tag’s last known position until the tag is found again. If after 10 seconds the tag is still not found, the drone will return to a preset home position and hover. Throughout the entire flight process, the pilot is capable of manually overriding the autonomous control system and using manual flight control instead.

Camera Feed

A frame from the drone's camera: an AprilTag on a wall outlined in green, with a status panel in the corner listing the state, flight mode, link status, distance of 1.44 m, sideways and vertical offsets, skew angle, and the commands being sent to the flight controller.
A frame from the onboard camera feed. The detected tag is outlined in green, while the panel in the corner shows the drone’s distance and offset from the tag, as well as the commands being sent to the flight controller.

CAD Model

Exploded CAD view of the quadcopter: four motors and three-blade propellers on a carbon frame, the flight-controller stack on standoffs, the Raspberry Pi and active cooler above it, the camera on a front mount, and the GPS module on a raised mast.
Exploded view of the final drone assembly
Assembled CAD view of the same quadcopter from above and to the side, showing the Raspberry Pi with its cooler mounted over the flight-controller stack.
The same model once assembled.
The assembly sequence in CAD.

Specifications

AirframeCustom 7-inch quadcopter, ~816 g, 6S
Flight controllerSpeedyBee F405 V3 running ArduPilot
Companion computerRaspberry Pi 4
CameraRaspberry Pi Camera Module 3
SoftwarePython, OpenCV, AprilTag
CADSolidWorks

Results And Future Work

The first version of the project is complete and flying. The drone is capable of seeing the AprilTag and holding position relative to the tag while simultaneously performing text detection. However, there are possible improvements to make. Particularly, the vibrations of the drone motors and flight cause a jello-like effect in the camera feed which makes the camera feed difficult to process for tag and text detection. A gimbal camera or other vibration reduction methods can be explored to improve future designs instead of the first design which uses the Pi camera module 3 and rubber grommets.