← ALL PROJECTS
SPACE LAB · FA23–SU24 · DRONE AUTONOMY · PYTHON / OPENCV

Undergraduate Drone Autonomy Research

SDSU SPACE Lab, under Professor Ahmad Bani Younes. Fall 2023 – Summer 2024.

AUTONOMOUS NAVIGATIONPYTHONCOMPUTER VISION (OPENCV)POSE ESTIMATIONROBOTICS & UAV SYSTEMSCONTROLS

Problem

A DJI Tello EDU has a single forward-facing monocular camera and two downward lidars for height. It has no external positioning of any kind. The problem was getting that platform to navigate relative to a visual fiducial — to find a QR code in the camera stream, work out where it is relative to the drone, close to a commanded distance from it, and then execute the instruction encoded in the code itself.

This is where I fell in love with Dynamics and Control.

SPACE Lab drone autonomy
FIG. 1 — SDSU SPACE LAB

Approach

Everything ran in Python against the Tello SDK, with OpenCV doing the vision. The work built up in three steps, each one flight-tested indoors before the next was added.

COMMANDDrive the airframe from Python over the Tello SDK — takeoff, translation, yaw, land.
DETECTFind and decode the QR fiducial in the monocular camera stream with OpenCV.
POSESolve the fiducial’s apparent shape and size for the position vector from the drone to the code, then close on a commanded standoff distance before executing.

Timeline

MONTHMILESTONE
Nov. 2023Dr. ABY accepted me into his lab and tasked me with self-learning Python.
Dec. 2023Completed Python basics and used it to send commands to a DJI Tello EDU drone.
Jan. 2024Developed initial QR code detection and navigation using OpenCV. The drone was able to read commands from the QR code.
Feb. 2024Developed algorithm to detect QR code shape and size to estimate the position vector of the drone to the QR code.
Mar. 2024Conducted indoor flight tests and refined navigation algorithms.
Apr. 2024No progress due to classes.
May 2024No progress due to classes.
Jun. 2024Began learning how to use ORB-SLAM3 software for object mapping. Necessary because the drone had monocular forward vision and 2 downward facing lidars to detect its distance to the floor.
Jul. 2024Attempted implementing ORB-SLAM3 on the drone; however, the drone’s Python package and ORB-SLAM3’s Python bindings relied on incompatible Python versions.
Aug. 2024Left the project to focus on junior year course load.

My Contribution

UNDERGRADUATE RESEARCHER

I was the undergraduate researcher on this work. I taught myself Python for it, wrote the drone command layer, the OpenCV detection, and the relative pose estimation, and ran the indoor flight tests.

I left the project in Summer 2024 to focus on a difficult junior year, but the experience I gained here was invaluable and solidified my passion for aerospace engineering. It is important to note that Dr. Ahmad Bani Younes was on sabbatical in my junior year, which contributed to my decision to leave the project early.

Result

The drone flew under Python command, detected and decoded QR fiducials from its monocular stream, estimated its relative position to a code from that code’s apparent geometry, and closed to a set standoff distance before running the instruction it had read. Short demonstrations and flight tests are below.

Basic maneuvering with Python · December 2023

Learning OpenCV and putting it on the drone · February 2024

QR detection, standoff, and command execution · March 2024

What did not work: ORB-SLAM3

In mid-2024 I started on ORB-SLAM3, wanting a map to navigate against rather than a single fiducial — the Tello only has monocular forward vision and two downward lidars, so there was no other route to one. The integration failed on tooling, not on theory: the Tello’s Python package and ORB-SLAM3’s Python bindings required incompatible Python versions, and I left the project before resolving it.

I never got SLAM running on this platform, so I do not claim it as working experience. What I took from the attempt was the build and dependency work, and a clear sense of where the integration cost sits in a vision pipeline.

Code

All sharable code can be found in the GitHub repository linked below.

GITHUB REPOSITORYscipk/Undergraduate-Drone-AutonomyVIEW REPOSITORY →