Giter Club home page Giter Club logo

tello-python's Introduction

Python 3 version of dji-sdk/Tello-Python

Summary

  • Written in Python 3 with minimum package dependency for video streaming and processing. (opencv-python and Flask)
  • Fly Tello and watch the video streaming from on-drone camera in a web browser.
  • Flight data is logged for later analysis.

Usage

  • If you want keep your system python clean, try the virtual environment.
sudo apt install python3-venv
python3 -m venv testTello
source testTello/bin/activate
  1. Connect your machine to the Tello via WIFI. (Don't worry about IP. Tello will assign one for your machine)
  2. Run the code and fly Tello autonomously (it would take off, fly around and land by its own)
python3 fly_tello.py
  • Install necessary libraries if you need image from Tello (opencv) and show it in your web browser (flask).
pip install opencv-python Flask # That is it. No other dependent libraries
  1. Run the code and visit http://127.0.0.1:9999/stream.mjpg by using your browser (keep refresh the page if you have problem)
python3 see_from_tello.py

Computer Vision

  • Tello will not setup a video streaming service for you to capture so you cannot use OpenCV directly.
    • If you worked with raspberry pi, you know its camera utility can set up a tcp server then you can use opencv to capture the h264 stream from it directly.
    • Tello is different. It does not setup a streaming server and you can not program it to do that.
  • You need to setup a video clip collector (a UDP service) then Tello will send video clips to your collector.
    • Tello is a client who sends out chunks of h264-encoded video stream to a udp server set up on your PC. It is up to you to collect those chunks and deal with it.
    • I don't know how to work with a locally buffered stream but I am familar with OpenCV.
    • In see_from_tello.py, I demonstrated a solution by setting up tcp and udp services to rebroadcast the buffered stream.
    • Tello sends the stream data my udp service then are fed to a tcp service. OpenCV can capture the tcp stream and do the real-time decoding frame by frame.
  • Tello --[h264-encoded chunks of frame]--> UDP server on my PC --[h264-encoded frame]--> TCP server on my PC --[h264-encoded stream]--> OpenCV --[image]--> Flask

tello-python's People

Contributors

xg590 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.