Skip to content

Commit

Permalink
1、Add FAQ file(EN&CH) according recent questions asked by users;2、Ren…
Browse files Browse the repository at this point in the history
…ame the 'tello_video_dll.zip',new name is'tello_video_dll(ForWin64)'
  • Loading branch information
hanker-lu committed Feb 15, 2019
1 parent 4d98487 commit 693776d
Show file tree
Hide file tree
Showing 4 changed files with 203 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -29,14 +29,16 @@ This toolkit contains three sample programs based on tello sdk and python2.7,inc
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 sdk@ryzerobotics.com.
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.



96 changes: 96 additions & 0 deletions TelloPython_FAQ(CH).txt
@@ -0,0 +1,96 @@
FAQ about Tello-Python (常见问题解答)

Q1:在windows上,运行tello_video需要哪些依赖项/怎么手动?

A1:在windows上,运行tello_video,首先,需要下载python2.7,
a.python2.7下载链接:
win64: https://www.python.org/ftp/python/2.7.15/python-2.7.15.amd64.msi
win32: https://www.python.org/ftp/python/2.7.15/python-2.7.15.msi

b.然后可以通过pip安装四个依赖项,分别是: (pip的安装方式请自行google)
numpy,opencv-python,pillow,matplotib。安装指令分别为:
numpy: python -m pip install numpy
matplotlib: python -m pip install matplotlib
opencv-python: python -m pip install -v opencv-python==3.4.2.17
pillow: python -m pip install pillow

c.接下来,需要下载并安装boost,目的是获得一个叫boost_python27-vc120-mt-x**-1_68.dll的动态链接库
boost下载链接:
win64: https://nchc.dl.sourceforge.net/project/boost/boost-binaries/1.68.0/boost_1_68_0-msvc-12.0-64.exe
win32: https://excellmedia.dl.sourceforge.net/project/boost/boost-binaries/1.68.0/boost_1_68_0-msvc-12.0-32.exe
下载完毕之后双击安装包进行安装,安装完成后,找到boost_python27-vc120-mt-x**-1_68.dll文件('**'部分取决你的电脑位数),放置到.\Python27\Lib\site-packages路径下。

d.接下来,需要下载ffmpeg,目的是得到包括avcodec-58.dll在内的多个dll文件。
ffmpeg下载链接:
win64: https://ffmpeg.zeranoe.com/builds/win64/shared/ffmpeg-20180825-844ff49-win64-shared.zip
win32: https://ffmpeg.zeranoe.com/builds/win32/shared/ffmpeg-20180825-844ff49-win32-shared.zip
下载完毕之后,解压文件,并将./bin 路径下的所有.dll文件都放置到.\Python27\Lib\site-packages路径下。

e.接下来,需要下载vs2013编译器,
vs2013编译器下载链接:
win64: https://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe
win32: https://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe
下载完毕后,运行安装包,安装程序。

f.将Tello-Python程序包中的libh264decoder复制到.\Python27\Lib\site-packages路径下。
h264decoder.pyd路径:
win64: .\Tello-Python\Tello_Video\h264decoder\Windows\x64\libh264decoder.pyd
win32: .\Tello-Python\Tello_Video\h264decoder\Windows\x86\libh264decoder.pyd

最后,在最新提交的commit中,提供了一个tello_video_dll.zip的压缩包(仅适用于win64),里面包括所需的与boost,ffmpeg,libh264decoder,vs2013编译器相关的文件。
首先,双击运行vcredist_x64.exe(vs2013编译器的安装包)进行安装。其次,将文件夹中的剩余文件都复制到.\Python27\Lib\site-packages路径下。
(通过该zip,你可以省去在网上下载和部分安装的环节,但注意这个zip里面的文件仅适用于win64!另外,像numpy,matplotlib,pillow和opencv-python你仍需要用pip进行安装。)


Q2:windows上的一键安装脚本(install.bat)在我的电脑上无法正常运行。

A2:目前提供的install.bat由于包含MD5校验等环节,对于部分用户电脑不是很兼容,后续会提供一个稳定安装的版本。如果无法正常运行自动安装脚本,请参考
Q1中的手动安装依赖项的方式。


Q3:install_manual.bat有什么作用?

A3:该脚本与install.bat在完成的任务上并无区别,区别主要在于会在每一个安装项目前进行中断,并提示用户是否安装。
目前该脚本并不稳定,建议您适用install.bat或者采用Q1中的手动安装的方式。


Q4:在windows/linux/mac中,我的所有依赖项均已经全部安装完成,运行python main.py之后也没有发生报错,但是运行程序后GUI并没有弹出视频流的画面,也无法使用
Snapshot按钮进行拍照。

A4:正常情况下,在已经连接tello wifi的情况下,运行程序后GUI会弹出视频流的播放窗口,并且可以正常使用snapshot按钮进行拍照,如果没有正常运行(实际效果参照https://www.youtube.com/watch?v=kcXN7CYgQ0g),
请考虑并检查以下几种情况:
a.你的PC设备是否已经正常连接到你的tello 的wifi;
b.检查你的PC的网络防火墙,可能防火墙会对视频流数据进行拦截;
c.进一步检查你的网络设置,因为tello是对PC的11111端口进行视频流数据的推送的,所以请检查你的网络设置中是否禁用了11111UDP端口,或者对11111端口的UDP数据进行了拦截。
如果有,请取消禁用;
d.极少数情况下,可能是PC发送的'streamon'指令发生丢包,没有被tello接收,针对这种情况,请尝试重新运行程序。


Q5:运行程序后,无法正常使用command panel中的按键响应功能。

A5:请确认鼠标不要点击command panel外的地方,如果点击了,请用鼠标重新点击command panel界面,再尝试按键响应功能。


Q6:tello EDU版本是否提供python 版本的多机编队例程?

A6:请参考https://github.com/TelloSDK/Multi-Tello-Formation,并阅读其README.md文档,此外,该例程内提供了可直接执行文件版本(.exe),
请参照Tello-Swarm中的userguide使用。

Q7:libh264decoder的作用是什么?

A7:libh264decoder是根据.\Tello-Python\Tello_Video\h264decoder文件夹中的h264decoder.cpp,h264decoder.hpp和h264decoder_python.cpp生成的
动态链接库,其作用是对tello向PC设备传输的h264编码格式的视频流进行解码。在windows上是以libh264decoder.pyd的形式体现,在linux和macos
上以libh264decoder.so的形式体现。
Windows/Linux/Mac上的libh264decoder动态链接库均提供在.\Tello-Python\Tello_Video\h264decoder路径下。
在Linux和Mac的一键脚本安装过程中,libh264decoder.so通过源码实时编译生成。
在Windows的一键脚本安装过程中,libh264decoder.pyd直接从\Tello_Video\h264decoder\Windows中复制,并被放置到.\Python27\Lib\site-packages中。

Q8:Tello EDU能否在station模式下对外传输视频流(对Tello EDU 使用了ap 'ssid' 'password'指令)?

A8:目前该功能并不被支持。

Q9:tello SDK接口所支持的UDP通信的频段和信道?

A9:目前只支持2.4GHz,支持的信道包括0-11。

如果有其他问题,欢迎提问或补充!
104 changes: 104 additions & 0 deletions TelloPython_FAQ.txt
@@ -0,0 +1,104 @@
FAQ about Tello-Python

Q1:On windows, what dependencies are needed to run tello_video/how to install it manually?

A1:On windows, to run tello_video, first, you need to download python2.7,
a.Python2.7 download link:
win64: https://www.python.org/ftp/python/2.7.15/python-2.7.15.amd64.msi
win32: https://www.python.org/ftp/python/2.7.15/python-2.7.15.msi

b.Then you can install these four dependencies through pip, ('way to install pip' please google by yourself)
numpy,opencv-python,pillow,matplotib。The installation instructions are:
numpy: python -m pip install numpy
matplotlib: python -m pip install matplotlib
opencv-python: python -m pip install -v opencv-python==3.4.2.17
pillow: python -m pip install pillow

c.Next, you need to download and install boost in order to get a dynamic link library called boost_python27-vc120-mt-x**-1_68.dll
boost download link:
win64: https://nchc.dl.sourceforge.net/project/boost/boost-binaries/1.68.0/boost_1_68_0-msvc-12.0-64.exe
win32: https://excellmedia.dl.sourceforge.net/project/boost/boost-binaries/1.68.0/boost_1_68_0-msvc-12.0-32.exe
After the download is complete, double-click the installation package to install. After the installation is complete, find the
boost_python27-vc120-mt-x**-1_68.dll file (the '**' depends on the number of your windows system) and place it in
.\Python27\Lib\site-packages path.

d.Next, you need to download ffmpeg, the purpose is to get multiple dll files including avcodec-58.dll,etc.
ffmpeg download link:
win64: https://ffmpeg.zeranoe.com/builds/win64/shared/ffmpeg-20180825-844ff49-win64-shared.zip
win32: https://ffmpeg.zeranoe.com/builds/win32/shared/ffmpeg-20180825-844ff49-win32-shared.zip
After the download is complete, extract the files,enter ./bin directory and place all the .dll files under the .\Python27\Lib\site-packages path.

e.Next, you need to download the vs2013 compiler.
vs2013 compiler download link:
win64: https://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe
win32: https://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe
After the download is complete, run the installation package and install.

f.Finally Copy the libh264decoder from the Tello-Python package to the .\Python27\Lib\site-packages directory.
h264decoder.pyd path:
win64: .\Tello-Python\Tello_Video\h264decoder\Windows\x64\libh264decoder.pyd
win32: .\Tello-Python\Tello_Video\h264decoder\Windows\x86\libh264decoder.pyd

In the latest commit, a zip named 'tello_video_dll.zip' is provided (for win64 only), which includes the required files related
to boost, ffmpeg, libh264decoder, vs2013 compiler.If you want to install it:
First, double-click to run vcredist_x64.exe (vs2013 compiler installation package) to install.Second, copy the remaining files in the folder
to the C:\Python27\Lib\site-packages path.
(With this zip, you can avoid the online download and partial installation, but note that the files in this zip are only available for win64!
Also, like numpy, matplotlib, pillow and opencv-python you still need to install with pip by yourself.)


Q2:The one-click installation script (install.bat) on windows does not work properly on my computer.

A2:At present, the install.bat that we provide contains steps such as MD5 checksum, which is not very compatible with some users' computers. A stable installation version will be provided later.
If the one-click installation script does not work properly, please refer to the manual installation of dependencies in Q1&A1.


Q3:What does install_manual.bat do? What is the difference with install.bat?

A3:This script is no different from install.bat in the completed tasks. The main difference is that it will be interrupted before each installation project,
and prompt the user to install.
Currently the script is not stable. It is recommended that you apply install.bat or use the manual installation method in Q1&A1.


Q4:In windows/linux/mac, all my dependencies have been installed, and no error has occurred after running python main.py.However, after running
the program, the GUI does not pop up the video stream, and I cannot use the Snapshot button to take a photo.

A4:Under normal circumstances, when tello wifi is connected, the GUI will pop up the playback window of the video stream after running the program, and the snapshot button can
be used to take pictures.If it is not working properly (see https://www.youtube.com/watch?v=kcXN7CYgQ0g for actual results),
Please consider and check the following situations:
a.Whether your PC device is properly connected to your tello wifi;
b.Check your PC's network firewall, which may block video stream data;
c.Further check your network settings, because tello is pushing the video stream data to the 11111 port of your PC, so please check if the 11111 UDP port is disabled in
your PC network settings, or the UDP data of port 11111 is blocked. If there is, please cancel it;
d.In rare cases, it is possible that the 'streamon' command sent by the PC has been lost and not received by the tello. In this case, try to run the program again.


Q5:After running the program, the keyboard control function in the command panel cannot be used normally.

A5:Please make sure that the mouse does not click outside the command panel. If you click it, please click the command panel again with the mouse and
retry the keyboard control function.


Q6:Will you provide a python version sample code of the multi-tello swarm for tello EDU version?

A6:Please refer to https://github.com/TelloSDK/Multi-Tello-Formation and read its README.md documentation.In addition, the program provides a direct executable file version (.exe).
Please refer to the userguide in Tello-Swarm.zip for use.

Q7:What is the role of libh264decoder?

A7:Libh264decoder is a dynamic link library (dll)compiled from h264decoder.cpp, h264decoder.hpp and h264decoder_python.cpp in the .\Tello-Python\Tello_Video\h264decoder folder.
,its function is to decode the video stream of the h264 encoded format transmitted by the tello to the PC device.On windows, it exists in the form of libh264decoder.pyd,
and in linux and macos,it exists in the form of libh264decoder.so.The libh264decoder dynamic link library on Windows,Linux and Mac is available in the
.\Tello-Python\Tello_Video\h264decoder path. In the one-click script installation process for Linux and Mac, libh264decoder.so is compiled and generated in real time through
source code.During the one-click script installation process for Windows, libh264decoder.pyd is copied directly from \Tello_Video\h264decoder\Windows and placed in
.\Python27\Lib\site-packages.

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.

Q9:What are the bands and channels of wifi UDP communication supported by the tello SDK interface?

A9:Currently only supports 2.4GHz, and the supported channels include 0-11.

If you have other questions, please ask questions or add!
File renamed without changes.

1 comment on commit 693776d

@pshaoning
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use Mac. Can anyone provide guid on Mac for Pyghon Tello programming?

Please sign in to comment.