This is a collection of python modules that interact with the Ryze Tello drone.

Overview

Tello-Python

Introduction

This is a collection of python-based sample code that interact with the Ryze Tello drone.

Project Description

This toolkit contains three sample programs based on tello sdk and python2.7,including Single_Tello_Test, Tello_Video, and Tello_Video (With_Pose_Recognition). There is also a program file named tello_state.py.

  • Single_Tello_Test

In Single_Tello_Test,You can design a series of command combinations by writing a txt script to let tello execute a series of actions you have designed. This program can also be used as a command set test tool for tello.

  • Tello_Video

In Tello_Video,You can receive the video stream data from tello, decode the video through the h264 decoding library, and display it on a GUI interface based on Tkinter and PIL. In addition, it also supports a control panel that can operate tello. This sample code provides an example of receiving and processing and getting the correct video data. The source code of the h264 decoding library is also provided in the package, which can be used for your reference.

  • Tello_Video(With_Pose_Recognition)

Tello_Video_With_Pose_Recognition is an application version modified from Tello_Video.It uses the decoded video data,and everytime extract a single frame image for pose recognition operation , and binds the specific posture and aircraft control commands to realize the pose control of Tello.This code is mainly used as an application case for utilizing the decoded video data of tello for image processing.

  • Tello_state.py

Tello_state.py can read the various status data of tello, and can be used as a tool to debug and view the status of tello.

Environmental configuration

The sample codes above are based on python2.7.There is no need to install additional third-party libraries for running Single_Tello_Test and tello_state.py.For Tello_Video and Tello_Video (With_Pose_Recognition), you need to install a series of third-party libraries. Therefore, in these two folders, a one-click installation script (based on windows32/64, linux and macos) is provided, which can facilitate you with installing all relevant dependencies.

Specific to the content and description of each package, you can refer to the readme file in the related folder.

Contact Information

If you have any questions about this sample code and the installation, please feel free to contact me. You can communicate with me by sending e-mail to [email protected]. And recently we have committed a new FAQ file under the 'Tello-Python'.If you have any questions,you can firstly refer to it .

About Multi-Tello-Formation

Please refer to github repository https://github.com/TelloSDK/Multi-Tello-Formation. This is a python program that enable the function of multi-tello swarms.

Comments
  • Run timeout

    Run timeout

    Hi, I get this error response: error Run timeout each time I try run each of the commands (using Single_Tello_Test/tello_test.py script):

    go 80 0 0 20 m1 or jump 80 0 0 20 90 m1 m2

    this is my commands file:

    command
    mon
    delay 1
    takeoff
    delay 5
    go 80 0 0 20 m1
    delay 5
    land
    

    and this is how the log looks like:

    
    id: 0
    command: command
    response: ok
    start time: 2022-08-28 19:48:22.754000
    end_time: 2022-08-28 19:48:22.782000
    duration: 0.028
    
    id: 1
    command: mon
    response: ok
    start time: 2022-08-28 19:48:22.782000
    end_time: 2022-08-28 19:48:22.829000
    duration: 0.047
    
    id: 2
    command: takeoff
    response: ok
    start time: 2022-08-28 19:48:23.836000
    end_time: 2022-08-28 19:48:27.725000
    duration: 3.889
    
    id: 3
    command: go 80 0 0 20 m1
    response: error Run timeout
    start time: 2022-08-28 19:48:32.738000
    end_time: 2022-08-28 19:48:47.921000
    duration: 15.183
    
    id: 4
    command: land
    response: ok
    start time: 2022-08-28 19:48:52.745000
    end_time: 2022-08-28 19:48:54.407000
    duration: 1.662
    
    

    I tried to increase and decrease the delays, didn't correct the behavior.

    The delay command as much as I understand should be set according to the duration of the command execution mentioned in the log, am I right ?

    I.e the delay should be >= of the duration of the command executed before the delay command am I right ? e.g:

    duration of go 80 0 0 20 m1 command is duration: 15.183 so the commands should look like:

    mon
    delay 1
    takeoff
    delay 5
    go 80 0 0 20 m1
    delay 20
    land
    

    as the last delay command delay 20 where 20 >= 15.183, is that correct ?

    I've already updated FW and calibrated IMU without any trouble.

    opened by ilyak93 6
  • TypeError: __init__() should return None, not 'NoneType'

    TypeError: __init__() should return None, not 'NoneType'

    I'm Getting the following error while running main.py

    Traceback (most recent call last): File "main.py", line 14, in main() File "main.py", line 7, in main drone = tello.Tello('', 8889)
    File "/Users/vsvsvarma/Desktop/Tello-Python/Tello_Video/tello.py", line 25, in init self.decoder = libh264decoder.H264Decoder() TypeError: init() should return None, not 'NoneType' Exception AttributeError: "Tello instance has no attribute 'socket'" in <bound method Tello.del of <tello.Tello instance at 0x1237d0d88>> ignored

    opened by saiivarma 6
  • Tello_state

    Tello_state

    I don't know why with me it did but, my tello just broke because of your script. tello_state.py has ripped it. If I start my tello now it immediately turns off again. Help would be nice.

    opened by GitStudying 3
  • Where is the video protocol documented?

    Where is the video protocol documented?

    https://github.com/dji-sdk/Tello-Python/blob/5b0b8193c4b701c612b73b8c1e59a11046d4506a/Tello_Video/tello.py#L104

    Where is this behavior documented (where a packet length not of 1460 is used to partition a frame)? I'm having trouble finding any official sources which talk about the protocol.

    opened by wtesler 3
  • Can't get Single_Tello_Test working with a Tello EDU

    Can't get Single_Tello_Test working with a Tello EDU

    Hi, I'm unable to get the Single_Tello_Test working with my Tello EDU drone. This works fine with my older original Tello.

    Here's the transcript:

    clyde@fastr:~/projects/Tello-Python/Single_Tello_Test (master)$ python2 tello_test.py command.txt sending command: command to 192.168.10.1 from ('192.168.10.1', 8889): ok Done!!! sent command: command to 192.168.10.1 sending command: takeoff to 192.168.10.1 from ('192.168.10.1', 8889): error Done!!! sent command: takeoff to 192.168.10.1 delay 5.0 sending command: land to 192.168.10.1 from ('192.168.10.1', 8889): error Done!!! sent command: land to 192.168.10.1

    id: 0 command: command response: ok start time: 2018-12-10 15:04:13.334845 end_time: 2018-12-10 15:04:13.382918 duration: 0.048073

    id: 1 command: takeoff response: error start time: 2018-12-10 15:04:13.383024 end_time: 2018-12-10 15:04:13.433856 duration: 0.050832

    id: 2 command: land response: error start time: 2018-12-10 15:04:18.439188 end_time: 2018-12-10 15:04:18.482665 duration: 0.043477

    Thanks.

    opened by clydemcqueen 3
  • install.bat file keeps crashing on win-64

    install.bat file keeps crashing on win-64

    as mentioned earlier, install.bat and install_manual.bat closes the cmd prompt after admin rights. I have manually tried installing all dependencies, but I need h264decoder to be built. Any suggestions?

    opened by kesaroid 2
  • Hello World Test

    Hello World Test

    Hello!

    I would like to perform the simplest Hello World test from the very beginning using Python programming language. It appears that I have to run Python on a desktop/notebook but I have a few elementary questions since the documentation didn't illustrate the steps (at least for my understanding):

    1. Do I connect my desktop/notebook to the drone using the right USB cable to the drone and then run the corresponding Python program?
    2. I do not have 192.168.10.x in my LAN. My subnet is completely different. What are the steps and limitations in changing the drone's IP address?
    3. Is the tello package (that I need to import for my custom Python efforts) the single tello.py file in this repository?

    I am sure that these questions have answered many, many times but sadly owing to my inability to find these answers anywhere I had to resort to raising them here. My apologies.

    Thanks for your guidance in helping me get the minimal Hello World up and running. I simply need some detailed instructions on establishing a development environment (any platform will do - Windows, Linux/Ubuntu, Raspberry Pi OS, etc.). Appreciate your patience in reading this plea for help.

    Kind regards.

    opened by baqwas 1
  • How can I get frame for YOLOv2

    How can I get frame for YOLOv2

    How can I read frame from tello udp.When I used djıtellopy 1.5 ı get very low fps.Please help me.And ı get this error; [h264 @ 0000025498d6df80] error while decoding MB 17 34, bytestream -12 [h264 @ 0000025498dbbc40] error while decoding MB 42 8, bytestream -9 [h264 @ 00000254992168c0] error while decoding MB 3 25, bytestream -8 [h264 @ 0000025498d6d840] error while decoding MB 47 43, bytestream -8

    opened by ozanpkr 1
  • cv::dnn::ReadProtoFromTextFile

    cv::dnn::ReadProtoFromTextFile

    Hi, I got this error to run .\Tello_Video_With_Pose_Recognition\main.py after running the .\Tello_Video_With_Pose_Recognition\tello_pose.py

    cv2.error: OpenCV(3.4.2) C:\projects\opencv-python\opencv\modules\dnn\src\caffe\caffe_io.cpp:1121: error: (-2:Unspecified error) FAILED: fs.is_open(). Can't open "model/pose/mpi/pose_iter_160000.caffemodel" in function 'cv::dnn::ReadProtoFromTextFile'

    Can you help me?

    opened by imanh947 1
  • How to get video with separate AP

    How to get video with separate AP

    Hello,

    I am trying to use this SDK with a Tello EDU connected to a separate AP, but the video socket bound to port 1111 never seems to get any data.

    The receive socket bound to 8889 is able to get responses, and I can send commands without issue.

    This is my code:

    import time
    from tello import Tello
    
    drone = Tello('', 8889, tello_ip='192.168.2.108')
    
    drone.send_command('battery?')
    time.sleep(0.5)
    print(drone.get_response()) # 72
    
    frame = None
    while frame is None:
        frame = drone.read()
        print(frame) # None
        time.sleep(0.5)
        
    
    print(frame)
    
    

    drone.read() always returns None when connected to the external AP, but it works fine and returns data when the Tello is acting as its own hotspot.

    ~~Should video feed to work with a separate AP? Is it a limitation of the SDK, or a configuration error on my end?~~

    Edit: My question is in the FAQ:

    Q8:Can Tello EDU transmit video streams externally in station mode (send ap 'ssid' 'password' command for Tello EDU)?
    
    A8:This feature is currently not supported.
    
    opened by alecGraves 1
  • snapshot not work

    snapshot not work

    Exception in Tkinter callback Traceback (most recent call last): File "C:\Python27\lib\lib-tk\Tkinter.py", line 1541, in call return self.func(*args) File "D:\Desenvolvimento\tello\Tello-Python-master\Tello_Video\tello_control_ui.py", line 245, in takeSnapshot cv2.imwrite(p, cv2.cvtColor(self.frame, cv2.COLOR_RGB2BGR)) error: OpenCV(3.4.3) C:\projects\opencv-python\opencv\modules\imgproc\src\color.cpp:181: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'

    opened by mariofraga 1
  • Can I use existing WiFi network as opposed to Tello's own WiFi?

    Can I use existing WiFi network as opposed to Tello's own WiFi?

    Hi, I would like to have Tello connect to an existing WiFi network in my building as opposed to connecting to the network that the drone generates. Is that possible to set up? I'm flying over long distances indoors, and the signal strength falls quickly, even if I use one extender.

    opened by rogeriobonatti 5
  • video latency

    video latency

    Hello, this project seems good, but when I run the code, there is serious video latency, the image will blur for 2 seconds and restore and blur again with the error below image can anyone helps?

    opened by mtncgj123 2
  • Tello EDU not returning ok/error for

    Tello EDU not returning ok/error for "emergency" command

    The Tello SDK documentation mentions that the Tello EDU returns an "ok/error" response for the "emergency" command. https://dl-cdn.ryzerobotics.com/downloads/Tello/Tello%20SDK%202.0%20User%20Guide.pdf

    However, I see that my EDU drone doesn't return an "ok" response even though it emergency lands appropriately.

    Is this a known issue?

    opened by anoop4 5
  • 【Tello_Video_With_Pose_Recognition】AttributeError: 'module' object has no attribute 'dnn'

    【Tello_Video_With_Pose_Recognition】AttributeError: 'module' object has no attribute 'dnn'

    I can't download the file "pose_iter_160000.caffemodel", so I found the file on the Internet and copied it to the document. But when I ran the project, it couldn't work.

    sent: command sent: streamon Traceback (most recent call last): File "F:/pycode/Tello-Python/Tello_Video_With_Pose_Recognition/main.py", line 14, in main() File "F:/pycode/Tello-Python/Tello_Video_With_Pose_Recognition/main.py", line 8, in main vplayer = TelloUI(drone,"./img/") File "F:\pycode\Tello-Python\Tello_Video_With_Pose_Recognition\tello_control_ui.py", line 43, in init self.my_tello_pose = Tello_Pose() File "F:\pycode\Tello-Python\Tello_Video_With_Pose_Recognition\tello_pose.py", line 29, in init self.net = cv2.dnn.readNetFromCaffe(self.protoFile, self.weightsFile) AttributeError: 'module' object has no attribute 'dnn' 微信图片_20220301134051

    opened by Gardenia-Ho 2
Owner
DJI-SDK
DJI-SDK
hardware design of the 250mm drone

hardware design of the 250mm drone

ZJU FAST Lab 645 Dec 25, 2022
Cascade Drone Swarm Physical Demonstration Project

Cascade Drone Swarm Physical Demonstration Project Table of Contents About The Project Built With Getting Started Prerequisites Installation About The

null 3 Aug 24, 2022
Python library to interact with the GCE Electronics IPX800 device

A python library to control a GCE-Electronics IPX800 V4 device through its API.

Marc-Aurèle Brothier 2 Oct 20, 2021
DNP3 Stalker is a project to analyze and interact with DNP3 devices

DNP3 Stalker Purpose DNP3 Stalker is a project to analyze and interact with DNP3

Cutaway Security, LLC. 2 Feb 10, 2022
A Python program that makes it easy to manage modules on a CircuitPython device!

CircuitPython-Bundle-Manager-v2 A Python program that makes it easy to manage modules on a CircuitPython device! The CircuitPython Bundle Manager v2 i

Ckyiu 1 Dec 18, 2021
PlatformIO development platform for GSM modules

PlatformIO development platform for GSM modules Supported Modules Quectel M66 OpenCPU Arduino - TODO other - in progress... Supported Boards Comet M66

Georgi Angelov 5 Aug 6, 2022
Scapy: the Python-based interactive packet manipulation program & library. Supports Python 2 & Python 3.

Scapy Scapy is a powerful Python-based interactive packet manipulation program and library. It is able to forge or decode packets of a wide number of

SecDev 8.3k Jan 8, 2023
Hook and simulate global mouse events in pure Python

mouse Take full control of your mouse with this small Python library. Hook global events, register hotkeys, simulate mouse movement and clicks, and mu

BoppreH 722 Dec 31, 2022
A module for cross-platform control of the mouse and keyboard in python that is simple to install and use.

PyUserInput PyUserInput is a group project so we've moved the project over to a group organization: https://github.com/PyUserInput/PyUserInput . That

Paul Barton 1k Dec 27, 2022
A Python class for controlling the Pimoroni RGB Keypad for Raspberry Pi Pico

rgbkeypad A Python class for controlling the Pimoroni RGB Keypad for the Raspberry Pi Pico. Compatible with MicroPython and CircuitPython. keypad = RG

Martin O'Hanlon 43 Nov 11, 2022
The ABR Control library is a python package for the control and path planning of robotic arms in real or simulated environments.

The ABR Control library is a python package for the control and path planning of robotic arms in real or simulated environments. ABR Control provides API's for the Mujoco, CoppeliaSim (formerly known as VREP), and Pygame simulation environments, and arm configuration files for one, two, and three-joint models, as well as the UR5 and Kinova Jaco 2 arms. Users can also easily extend the package to run with custom arm configurations. ABR Control auto-generates efficient C code for generating the control signals, or uses Mujoco's internal functions to carry out the calculations.

Applied Brain Research 277 Jan 5, 2023
Python Keylogger for Linux

A keylogger is a program that records your keystrokes, this program saves them in a .txt file on your local computer and, after 30 seconds (or as long as you want), it will close the .txt file and send you an email with everything that has been recorded. once the program is run, this cycle will last infinitely if you don't stop it.

Darío Mazzitelli 4 Jul 31, 2021
A Python script to monitor the latest block on an LCD.

PiHole-Monitoring A Python script to monitor the latest block on a lcd display. The first number represents the dns queries from the last 24h, the sec

Maxi 4 Dec 5, 2022
Simple Python script to decode and verify an European Health Certificate QR-code

A simple Python script to decode and verify an European Health Certificate QR-code.

Mathias Panzenböck 61 Oct 5, 2022
Python code written to utilize the Korlan usb2can hardware to send and receive data over the can-bus on a 2008 Nissan 350z

nissan_ecu_hacking Python code written to utilize the Korlan usb2can hardware to send and receive data over the can-bus on a 2008 Nissan 350z My goal

Liam Goss 11 Sep 24, 2022
Python script: Enphase Envoy mqtt json for Home Assistant

A Python script that takes a real time stream from Enphase Envoy and publishes to a mqtt broker. This can then be used within Home Assistant or for other applications. The data updates at least once per second with negligible load on the Envoy.

null 29 Dec 27, 2022
A python module for interacting with rolimon's, a roblox value site.

rpi - rolimon's python interaction rpi is an open source python-based rolimon's api wrapper. It provides an end-to-end pipeline in which each componen

Acier 11 Nov 8, 2022
Python module for controlling Broadlink RM2/3 (Pro) remote controls, A1 sensor platforms and SP2/3 smartplugs

Python module for controlling Broadlink RM2/3 (Pro) remote controls, A1 sensor platforms and SP2/3 smartplugs

Matthew Garrett 1.2k Jan 4, 2023
Inykcal is a software written in python for selected E-Paper displays.

Inykcal is a software written in python for selected E-Paper displays. It converts these displays into useful information dashboards. It's open-source, free for personal use, fully modular and user-friendly. Despite all this, Inkycal can run well even on the Raspberry Pi Zero W. Oh, and it's open for third-party modules! Hooray!

Ace 727 Jan 2, 2023