Python-based autonomous and manual control system for DJI Tello drones with ArUco tag tracking and route following capabilities.
- 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.
- 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.
-
Connect to Tello WiFi network:
./connectTello.sh
-
Run the main control script:
./tello_control.py
- 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
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.
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.ptello_control.py- Main control loop and mode switchingroute_follow.py- Autonomous route execution engineroute_elements.py- Flight command primitives and tag trackingend_conditions.py- Command completion conditionstag_utils.py- ArUco marker detection and positioningremote_control.py- Keyboard input handlingconfig/tags.yaml- Tag configuration