Skip to content

jtabor/DJI_Tello_Navigation

Repository files navigation

Tello Drone Control

Python-based autonomous and manual control system for DJI Tello drones with ArUco tag tracking and route following capabilities.

Features

  • Manual Control: Keyboard-based flight control
  • Autonomous Routes: Define flight paths with tag-relative positioning
  • ArUco Tracking: Visual tag detection and precision positioning
  • Camera Calibration: Tools for camera matrix calibration
  • Remote Processing: Image processing and control runs on PC with video streaming from the drone.

Planned Work

  • Add CLIPSeg (short-term): CLIPSeg would allow arbitrary objects to be used for navigation. (ie fly towards the fish tank, stop when the size is x.)
  • Absolute Locations for Tags (longer-term): Make a map of all the tags and their relationships to each other using vive trackers or SLAM. Then have the drone progress along the tags to get to some arbitrary coordinates.
  • High Latency Control: No Navigation, but let the user click on objects to fly towards and the drone will approach it. The user should make sure the path to the object is clear. This would be great for flying the drone from home.

Quick Start

  1. Connect to Tello WiFi network:

    ./connectTello.sh
  2. Run the main control script:

    ./tello_control.py

Manual Controls

  • WASD: Forward/backward/left/right
  • Space/C: Up/down
  • Q/E: Rotate left/right
  • T: Takeoff
  • G: Land
  • F: Emergency stop
  • J: Enable autonomous mode
  • K: Disable autonomous mode

Route Programming

Routes are defined programmatically in route_follow.py. The system supports:

  • Tag-relative positioning: Navigate to specific positions relative to ArUco markers
  • Basic movements: Translate and rotate commands
  • End conditions: Time-based, tag detection, or precision threshold triggers
  • Recovery behaviors: How the drone should try to find a tag after it is lost.
  • These will probably be moved to config files later.

See commands.md for the complete command specification including recovery behaviors.

Camera Calibration

The ArUco marker localization requires openCV camera calibration. To generate calibration matrices:

cd calibration
./collect_images.py  # Capture calibration images of opencv circle array calibration target from many angles and distances.
./camera_calibration.py  # Generate cam_matrix.p and dist_matrix.p

Project Structure

  • tello_control.py - Main control loop and mode switching
  • route_follow.py - Autonomous route execution engine
  • route_elements.py - Flight command primitives and tag tracking
  • end_conditions.py - Command completion conditions
  • tag_utils.py - ArUco marker detection and positioning
  • remote_control.py - Keyboard input handling
  • config/tags.yaml - Tag configuration

About

Python-based autonomous and manual control system for DJI Tello drones with ArUco tag tracking and route following capabilities.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors