Skip to content
JacobaliciousPublic

About

Make a DJI Tello drone follow you around, tracking your face or hand with its camera

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

🚁 PetDrone

Make a Tello drone follow you around — tracking your face or your hand with its camera, in real time.

Language Vision Drone

✨ What it does

PetDrone turns a DJI Tello into a camera that chases you. It reads the drone's live video feed on your computer, finds you in the frame, and steers the drone to keep you centred — turning, rising, and moving in or out so you stay in view as you move. Two versions are included: one that locks onto your face, and one that follows your open hand like a target it can't stop watching.

🚀 Features

  • Follow your face — Follow.py uses face detection to keep you centred and framed, closing in or backing off to hold a comfortable distance.
  • Follow your hand — Rex.py uses hand tracking; show it an open palm and it locks on and follows your hand around the room.
  • Smooth, real-time control — proportional controllers turn camera position into drone commands for yaw, height and forward/back, tuned to move smoothly instead of jerking.
  • Safety limits — every control axis is capped to a maximum speed so the drone never lurches.
  • Battery-aware startup — it checks the drone's battery on connect before doing anything.
  • Live view — the camera feed is shown on screen with the tracking target drawn on, and a key press lands the drone at any time.

🛠️ How it works

Script Tracker Library
Follow.py Face OpenCV Haar cascade
Rex.py Open hand MediaPipe Hands

Each frame, the tracker finds the target's position in the camera image. The horizontal offset becomes a turn command, the vertical offset a height command, and the target's size (how much of the frame it fills) a move-in/move-out command. A proportional gain converts each offset into a speed, clamped to a safe limit, and the result is streamed to the Tello over its Wi-Fi link.

📦 Getting started

  1. Install the dependencies:

    pip install djitellopy opencv-python mediapipe numpy
    
  2. Power on the Tello and connect your computer to the drone's Wi-Fi network.

  3. Run one of the trackers:

    python Follow.py      # follow your face
    python Rex.py         # follow your open hand
    

Give it room to fly and keep a hand near the keyboard to land it.

🧰 Built with

Python · djitellopy · OpenCV · MediaPipe · NumPy

About

Make a DJI Tello drone follow you around, tracking your face or hand with its camera

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages