dji-sdk / tello-python Goto Github PK
View Code? Open in Web Editor NEWThis is a collection of python modules that interact with the Ryze Tello drone.
License: Other
This is a collection of python modules that interact with the Ryze Tello drone.
License: Other
could I add my custom model such as object detection model(for example yolo)?
must these models be developed with caffe?
The limitation is mentioned 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.
Can this feature be added to the Firmware / SDK? It would make the EDU edition much more useful for may lab.
Currently, this limitation removes all benefits of having the EDU edition because I need live video from all drones in the swarm.
Any thoughts to migrate the Tello-Python code to Python 3.X
I managed to migrate the H264 that it can be used with Python 3.X on my Raspberry PI.
The rest is straightforward. So if someone could help to build the H264 dll or pyc from my fork could be helpful.
See my gist. udp video stream can be encoded by opencv:
https://gist.github.com/f41ardu/b75da46dae383e5c835295600deef604
I am trying to use the tello drones in a school environment and can not get video working. We are using python 3.7 in the anaconda. Could this be part of the problem? Is there an update for later versions on python?
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'
Can Tello be developed with ROS?
Thank you!
Feel free to test https://github.com/f41ardu/Tello-Python/tree/master/PY3_Tello_Videop
On an Raspberry PI 3+ I still got multiple video errors but video is working on python 3.5. I assume it may work on 3.x, x >= 5 as well. Please let me know if it is working an I'll request a merge into dji-sdk/Tello-Phyton.
Python 2.7 will soon be deprecated. Have you considered moving the project to python3?
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.
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?
Hi,
I have my Tello drone sitting idle on my desk and it shuts down after about 4 minutes.
This happens consistently.
Does anyone know if this is a common issue? Is it due to overheating of the downward-facing sensors that are close to the table surface?
Hi! I'm trying to set speed by using command, e.g., send_command('speed 10'), and even though I receive back 'ok', the drone doesn't move (when I use other commands like send_command('up 20') I receive back 'ok' and actually it works). How can I solve this problem?
Moreover, the speed I set along which direction it works? There is the possibility to set only vertical velocity? (Without using go x y z speed command I mean)
Thank you
What kind of operation should be performed on libh264decoder under mac environment?
Show libh264decoder model does not exist in pycharm environment
I tried to copy the libh264decoder folder and libh264decoder.so to site-packages, but I still get an error?
Is not able to include the package h264 even if is it in the correct folder, do you have any suggestion?
File "D:\Tello\Tello-Python-master\Tello-Python-master\Tello_Video\tello.py", line 5, in <module> import libh264decoder ImportError: DLL load failed: The specified module could not be found.
Hi all,
I was trying out both Tello_Video & Tello_Video_With_Pose_Recognition packages in my Mac Os catalina
At first, I installed Tello_Video with the one click install and it not work. still getting the error:
CMake Error at /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package):
Could not find a package configuration file provided by "boost_python"
(requested version 1.71.0) with any of the following names:
boost_pythonConfig.cmake
boost_python-config.cmake
Add the installation prefix of "boost_python" to CMAKE_PREFIX_PATH or set
"boost_python_DIR" to a directory containing one of the above files. If
"boost_python" provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
/usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
/usr/local/Cellar/cmake/3.15.4/share/cmake/Modules/FindBoost.cmake:443 (find_package)
CMakeLists.txt:12 (find_package)
-- Configuring incomplete, errors occurred!
See also "/Tello_Video/h264decoder/build/CMakeFiles/CMakeOutput.log".
Any help will be greatly appreciated.
I'am use opencv and imutils library's for capture video(imutils - filevideostream), but get delay on stream. How to fix this?
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1550, in call
return self.func(*args)
File "/home/sxt17/Desktop/Tello-Python/Tello_Video/tello_control_ui.py", line 245, in takeSnapshot
cv2.imwrite(p, cv2.cvtColor(self.frame, cv2.COLOR_RGB2BGR))
error: OpenCV(4.1.1) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'
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.
Hi, the I am using this sdk for my newly bought tello. The video feed is fine, the take off and landing command works, and the rotate cw and ccw command works "Response: ok". However, when I send the any other commands (forward, backward, left, right etc) the command always return a "Response: Out of Range", and consequently my Tello can only take off, rotate on the spot, and land....
But it shouldn't be a connection issue, as it can recognize the rotate, take off and landing perfectly.
And the drone works perfectly well on my tello app in all aspects (if this info helps)
A example of the command from the tello.py file that does not work is this
def move_backward(self, distance):
"""Moves backward for a distance.
See comments for Tello.move().
Args:
distance (int): Distance to move.
Returns:
str: Response from Tello, 'OK' or 'FALSE'.
"""
return self.move('back', distance)
I didnt change the code, so it is as it originally was.
Anyone has any idea whats the issue :( its been bugging me. Any help will be appreciated!
python main.py [indeo3 @ 0x1360440] Invalid picture dimensions: 0 x 0! Traceback (most recent call last): File "main.py", line 14, in <module> main() File "main.py", line 7, in main drone = tello.Tello('', 8889) File "/home/martin/Schreibtisch/Tello-Python-master/Tello_Video_With_Pose_Recognition/tello.py", line 25, in __init__ self.decoder = libh264decoder.H264Decoder() RuntimeError: cannot open context Exception AttributeError: "Tello instance has no attribute 'socket'" in <bound method Tello.__del__ of <tello.Tello instance at 0x7f02518d68c0>> ignored
Any idea?
Thanks
I have followed the following steps:
Mac
Make sure you have the latest Xcode command line tools installed. If not, you might need to update your OS X and XCode to the latest version in order to compile the h264 decoder module
Go to the "install\Mac" folder folder in command line, run
chmod a+x ./mac_install.sh
./mac_install.sh
However, my installation said:
Configuring incomplete, errors occurred!
See also ''User/hkpc/downloads/Tello-Python-master/Tello_Video/h264decoder/build/CMakeFiles/CMakeOutput.log''.
make: *** No targets specified and no makefile found. Stop.
cp: libh264decoder.so: No such file or directory
Compilation and Installation Done!
Can I know what am I missing and how to fix this?
What version of the framework are you using?
I use the version 01.04.35.01 and the video does not work by the computer, only by the mobile app
Is their a python 3 SDK that can be downloaded for the Tello Drone?
Hi there, I have installed the project successfully using the ./install.sh
script.
files in Tello_Video:
LICENSE.md __pycache__ h264decoder install main.py tello.pyc tello_control_ui.pyc
README.md get-pip.py img libh264decoder.so tello.py tello_control_ui.py venv
python main.py
sent: command
sent: streamon
when I run main.py
the control window opens fine but no video feed appears.
I have installed all the libraries allowed UDP 11111 port on the firewall, connected to wifi successfully and run the code in terminal on python2.7 but there is no responce....
Hi, I'm working on a project where I want to use a python script, run from a computer, to command my drone to fly around and take pictures. But the image I got from the video mode is 960*720.
How do I switch to camera mode to get 5 million pixel images?
runned in raspberrypi , python2.7 , environments descriped in ./linux_install.sh were installed.
Getting the following error.
1.error while decoding MB 22 11, bytestream -12
2.non-existing pps 0 referenced
i think there something wrong with ffmpeg and libh264decoder. so how to fix it ?
appreciate for your help
Does it work for all dji tello drones or just for the tello EDU drone?
Thank you.
Getting the following error. I copied libh264decoder to site-packages in python folder but still the import module error
in <module> import libh264decoder ImportError: DLL load failed: The specified module could not be found.
Originally posted by @sriranjanr in #8 (comment)
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
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?
Hi all,
I was trying out both Tello_Video & Tello_Video_With_Pose_Recognition packages in my Linux - ubuntu 16.04 LTS
At first, I installed Tello_Video with the one click install and it has successfully run, however, when i tries to install and run Tello_VIdeo_With_Pose_Recognition, it shows the following errors, and now it no longer runs again.
I have checked and I moved the 'libh264decoder.so' file into my python's site-packages file & /usr/lib/ , the above move was suggested by the internet. But still getting the error:
spark@spark:~/Downloads/Tello-Python-master/Tello_Video_With_Pose_Recognition$ python main.py
Traceback (most recent call last):
File "main.py", line 1, in
import tello
File "/home/spark/Downloads/Tello-Python-master/Tello_Video_With_Pose_Recognition/tello.py", line 5, in
import libh264decoder
ImportError: libavcodec.so.57: cannot open shared object file: No such file or directory
spark@spark:~/Downloads/Tello-Python-master/Tello_Video_With_Pose_Recognition$ cd ..
spark@spark:~/Downloads/Tello-Python-master$ cd Tello_Video
spark@spark:~/Downloads/Tello-Python-master/Tello_Video$ python main.py
Traceback (most recent call last):
File "main.py", line 1, in
import tello
File "/home/spark/Downloads/Tello-Python-master/Tello_Video/tello.py", line 5, in
import libh264decoder
ImportError: libavcodec.so.57: cannot open shared object file: No such file or directory
spark@spark:~/Downloads/Tello-Python-master/Tello_Video$ `
Any help will be greatly appreciated.
hi all could someone please help me? i use ubuntu 16.04
i open 11111
i copy Tello_Video to my file
install linux_install.sh
use the step from demend to compile h264decoder
(at this time libh264decoder.so show up in main.py file)
I type "python main.py" and it can run and can use keyboard to control
but there is no video GUI show up!! neither the snapshot
(snapshot will show opencv error but there is no error durring senting command in terminal)
(I confirm that there is no wrong with opencv because I install ROS and it will install opencv
and other things I need)
Please tell me how to solve it.....is there something step I forgot?
Tello-Python/Tello_Video/tello.py
Line 104 in 5b0b819
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.
so I am having trouble with using airsim with tellopy. I am am getting an error
Traceback (most recent call last):
File "", line 1, in
runfile('C:/Users/fahre/Desktop/dronecontrol.py', wdir='C:/Users/fahre/Desktop')
File "C:\ProgramData\Anaconda2\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
execfile(filename, namespace)
File "C:\ProgramData\Anaconda2\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 95, in execfile
exec(compile(scripttext, filename, 'exec'), glob, loc)
File "C:/Users/fahre/Desktop/dronecontrol.py", line 73, in
tellodrone = tellopy.Tello()
File "C:\ProgramData\Anaconda2\lib\site-packages\tellopy_internal\tello.py", line 91, in init
self.sock.bind(('', self.port))
File "C:\ProgramData\Anaconda2\lib\socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
error: [Errno 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted
Hi,
Python 2.7 has reached its End Of Life. Its at least no longer supported. OpenCV won't install using pip (on a raspberry pi at least) even from the additional repository. Pip3 installs OpenCV (quite rightly) in a Python3 directory on a Raspberry Pi but that's incompatible for this code: "import cv2" fails as its in the wrong directory? I'm not sure if one could build OpenCV to make it compatible with Python2.7?
So, as far as I can see the best solution all round would be to port this code to Python 3 as others are saying please? I don't know how big a job that is though?
Cheers, WW.
Thanks in advance.
Error log:
Exception in Tkinter callback
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1536, in __call__
return self.func(*args)
File "/Users/jimipedros/git/Tello-Python/Tello_Video/tello_control_ui.py", line 245, in takeSnapshot
cv2.imwrite(p, cv2.cvtColor(self.frame, cv2.COLOR_RGB2BGR))
error: OpenCV(4.0.0) /Users/travis/build/skvark/opencv-python/opencv/modules/imgproc/src/color.cpp:181: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'
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.
Hi guys,
I have installed everything and works as expected. I have video feed and I can make it takeoff and land with the buttons in the UI but I cannot make keyboard buttons works. It simply doesn't recognize them.
What can I do?
Hi!
I'm attempting to use pose recognition, but when i run the main project and i switch on the pose recognition, the joints' skeleton of my body doesn't appear. I've downloaded the model and followed instructions written in the readme. Any solution?
Is there a command to fetch the drone ID of that is displayed in the Wifi connection list?
For example: "TELLO-XXX"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.