SlideShare a Scribd company logo
1 of 36
Download to read offline
過去2回の登壇内容からの
Python×ドローンの進化
アップデート内容と今後について展望
片寄 里菜(Lina Katayose)
@selina787b
29Aug2020/Online/招待講演#pyconjp #pyconjp_1
Evolution of Python x drone from the contents of the last two times.
Talk about update content and future outlook.
今日話すこと Talk Description
✢自己紹介 Self-introduction
✢目的 What is the purpose
✢過去のトークと進歩 Past two talks and progress
✢できた事&できなかった事 Solution methodology
✢Pythonとドローンの相性「まとめ」 Python and drone congeniality
✢TELLOをPythonで動かす Run Tello (small drone) with Python
✢コード紹介とデモ映像 Flying demonstration movie and code
2
1.
Self-introduction
自己紹介です。よろしくお願いします!
空を飛ぶことに憧れ、航空宇宙学を専攻。
Pythonではモノを動かすコードに興味を持つ。
将来は自分の作った航空機で空を飛びたいと
思っている。
PyLadiesTokyoスタッフ、(株)moegi代表
I am Lina KATAYOSE (Selina)
Ilove toflyinthe sky, because of majoringinaerospace studies.
InPython, I'minterestedincode that movesthings
Inthe future I'dlike toflythe skywithmyownaircraft.
IfoundedamoegiInc.
4
@selina787b
2.
What is the purpose
目的
What is the purpose
✢ みんながドローンを簡単に飛ばせる仕組みを作りたい。
 I want to create a mechanism that makes it easy for everyone to fly a drone.
✢ ドローンをハックし、安全に改造できるようにしたい。
 I want to hack a drone so that it can be safely modified.
6
What is the purpose
✢ 小中学生向け、プログラミング&電子工作の勉強のために。
✢ 気軽に作成できるプラットフォームを開発。
✢ 前回の発表では、ブラシレスモーターを回す仕組みに焦点を
当てたが、今回は以下に簡単にモーターを4つ回しプログラム
で動かすかに焦点を当てた。
✢ I amdevelopinga platformthat elementary andjunior high
school students cancasually create while studying
programmingandelectronic work.It is educational andnot a
full-blowndrone development.
(別途進めている。)本格的なドローンはArduinoなどのマイコンを併用予定
7
3
3.
Past two talks and Progress
過去のトークと進歩
Past talk summary
✢2017年 (PyConJP)
 ドローンのフライトコントローラをPythonで制御してみた話
 A story of controlling a drone flight controller with Python
✢2018年(PyConJP PSFは英語)
 Make a Drone using RaspberryPi
 and Google VoiceKit by Python
✢2019年 (別のイベント)
 過去のトーク内容をより精査・改良を行い、イベントを開催
  Held an event by further examining and improving the contents of past talks
9
Past talk summary (2017)
(ドローンのフライトコントローラをPythonで制御してみた話)
✢ドローンの概要説明 Drone overview
✢ドローンの飛ぶ仕組み等 Drone flying mechanism, etc.
✢Pythonでドローンのフライトコントローラを作ろうと
した話
  A story trying to make a drone flight controller with Python
10
2017
Past talk summary (2017)
11
2017
Past talk summary(2018)
(Make a Drone using RaspberryPi and Google VoiceKit by Python)
✢ラズベリーパイで4つのモーターをコントロール
✢モーター4つを別々に動かすためのライブラリと
Pythonコード
✢ハードと電流問題
12
2018
Raspberry Pi
Past talk summary(2018)
Voice Kit
13
2018
Past talk summary(2018)
14
2018
Raspberry Pi
Past talk summary(2018)
15
2018
Past talk summary(2018)
16
先ほどの基盤とRaspberryPiを
ドローンにつなげて
モーターを別々に回すプログラム
(安定化は入れていない。
2018
Past talk summary
✢過去のトーク内容をより精査し、
  改良を行った。
✢電子回路を作り直し。
✢プログラミングの修正。
✢機体フレームの作成。
✢実験機の製作
17
2019
Progress(2019)
18
回路図を作りました!
ラズパイゼロで動かすFET(ドローンキット)
2019
電界効果トランジスタ FET(Field effect transistor)
は、簡単に言うと信号を増幅させたりON/OFFのスイッチをする部品です。
Progress(2019)
19
ラズパイゼロで動かすドローンキット
動いた動画は後半に!
2019
code(2019)
20
2019
先ほどのドローンとRaspberryPi+FET基盤を
wiringpiライブラリを使用し、
モーターを別々に回すプログラム(安定化は入れていない。)
4.
Solution methodology
できた事&できなかった事
Solution methodology(できたことできなかったこと)
✢ RaspberryPiとPythonだけでブラシレスモーターを回せた
✢ RaspberryPiの活用幅が広がった
✢ 電源周り、電子回路の知識がアップ
22
できたこと
✢ PythonだけでFlightコントローラを作ることは難しい
✢ ハードウェアの作りこみが難しい
✢ 飛ばせなかった
できなかったこと
2017
Solution methodology(できたことできなかったこと)
✢ RaspberryPiとPythonだけで個別の
  DCモーターをコントロールできた
✢ Python×RaspberryPiの無線通信で実行可能に。
✢ 電源周り、電子回路の知識がアップ
23
できたこと
✢ 動きの制御(傾きを与えた時の反応)
✢ Pythonだけでフライトコントローラを作ることは難しい
✢ 電流不足
✢ 飛ばせなかった
できなかったこと
2018
Solution methodology(できたことできなかったこと)
✢ より精度の高いPythonライブラリを使えた。
✢ モーターの細かな速度調整ができた。
✢ 電源周り、電子回路を改善。電流問題を解決。
24
できたこと
✢ 動きの制御(傾きを与えた時の反応)
✢ PythonだけでFlightコントローラを作ることは難しい
✢ フレームの重さ
✢ 浮くが、飛ばせなかった
できなかったこと
2019
5.
Python and drone congeniality
Pythonとドローンの相性を考えた「まとめ」
Past talk summary
まとめ
Pythonだけではドローン一式を作り上げるのは難しい。
運動分野の制御が得意なマイコンArduino(アルドゥイーノ)でC言語を使用し、
動的部分を作り上げ、RaspberryPi+Pythonで総合的な指示系統ができる
ドローンが作れるのではないかと推測する。
すでにArduino+RaspberryPiの連携。そして、無線通信の動作確認を行っています。
これらのことを踏まえて、引き続き、実験等を行っています。
数々の失敗があり、悩みもあります。
考えを変え、今後はPythonをフロントエンドの言語として使用し、
ドローン開発を行っていきたいと考えています。
It's difficult to build a complete drone with just Python.
It is speculated that we could make a drone that uses C language with a microcomputer Arduino, which is good at controlling in the field of motion,
to create a dynamic part, and use RaspberryPi + Python to create a comprehensive instruction system. Arduino + Raspberry Pi cooperation
already. And we are checking the operation of wireless communication. Based on these things, we continue to conduct experiments.
There are many failures and worries. I changed my mind and would like to continue developing drones using Python as the front end language. 26
Python and drone congeniality
27
Past talk summary
と、言うように「まとめ」を
話しましたが、それらをすべて作り、
販売しているドローンがあります!
次にそのドローンの紹介とPythonでの
動作・飛行方法をお話します!
I talked about "summary" and there are drones that make and sell them all!
Next, I will introduce the drone and explain how it works/flying in Python!
28
6.
Run Tello with Python
TELLO(小型ドローン)をPythonで動かす
Run Tello with Python
30
TELLOはこちらです。性能や種類も異なります。
左は普通のTELLO  右がTELLO EDU
TELLO is here. Performance and type are also different.
The left is normal TELLO and the right is TELLO EDU
Run Tello with Python
Python
31
指示系統イメージ
Connection image
姿勢制御など細かな制御はTELLO内で行う(Pythonでは動かせない)
Detailed control such as posture control is performed in TELLO.(Not possible in Python)
移動するためのコマンドを送る。
TELLOの状態を知るコマンドもここで送る。
Send a command to move TELLO.
A command to know the status of TELLO is also sent here.
カメラやセンサー情報が
TELLOから送られる。
Camera and sensor
information is sent from TELLO
WiFi
Run Tello with Python
32
TELLOを動かすために
このTello SDKを使って動かすと簡単です。
(方法は他にもありますが、今回はPythonで説明)
動かし方の詳細は
BLOGに記載していますのでご覧ください。
https://se-lina.hatenablog.com/entry/2020/08/16/110723
ざっくりとした説明ですが、
PCとTELLOをWiFi(UDP通信)でつなぎ、
Pythonコードで直接動かすイメージです。
It's easy to run TELLO using this Tello SDK.
It is an image that connects PC and TELLO
with WiFi (UDP communication) and directly
operates with Python code.
For details, please see the BLOG.
日本語訳
作りました!
7.
Flying movie and code
コード紹介と動かした動画
Flying movie and code
34
時間の指示と
動くためのコードを書くだけで
飛ばすことができます。
15秒間何も指示がない場合は、
自動的に着陸します。(仕様上)
実験をしているときに、誤動作が起きました。
念のため、緊急停止プログラムを作っていると
よいでしょう。
codeは整理してGitHubにあげる予定。
TELLO can be fly by writing the time and
the code to move.
It will land automatically if no instructions are given
for 15 seconds.
While doing the experiment, a malfunction occurred.
Just in case, it's a good idea to have an emergency
stop program.
I will be uproad the code to GitHub.
デモンストレーション動画
the demonstlation movie.
今回の動画はBLOGにも紹介しています。見逃してしまった方は、そちらもぜひ!
https://se-lina.hatenablog.com/entry/2020/08/28/230236
35
ご視聴ありがとうございます。
Thank you!
何か質問はありますか?Any questions?
Youcanfindmeat“LinaKATAYOSE”
@selina787b
lina.katayose@gmail.com
36
http://se-lina.hatenablog.com/

More Related Content

What's hot

Python札幌 2012/06/17
Python札幌 2012/06/17Python札幌 2012/06/17
Python札幌 2012/06/17
Shinya Okano
 
Windowsにpythonをインストールしてみよう
WindowsにpythonをインストールしてみようWindowsにpythonをインストールしてみよう
Windowsにpythonをインストールしてみよう
Kenji NAKAGAKI
 

What's hot (20)

Pyladies tokyo 2nd anniversary LT
Pyladies tokyo 2nd anniversary LTPyladies tokyo 2nd anniversary LT
Pyladies tokyo 2nd anniversary LT
 
なぜ科学計算にはPythonか?
なぜ科学計算にはPythonか?なぜ科学計算にはPythonか?
なぜ科学計算にはPythonか?
 
Stapy#17LT
Stapy#17LTStapy#17LT
Stapy#17LT
 
エキスパートPythonプログラミング改訂3版の読みどころ
エキスパートPythonプログラミング改訂3版の読みどころエキスパートPythonプログラミング改訂3版の読みどころ
エキスパートPythonプログラミング改訂3版の読みどころ
 
GBDC 勉強会 #1 Python を用いたツール作成工数の最小化
GBDC 勉強会 #1 Python を用いたツール作成工数の最小化GBDC 勉強会 #1 Python を用いたツール作成工数の最小化
GBDC 勉強会 #1 Python を用いたツール作成工数の最小化
 
PyCon JP 2016 ビギナーセッション
PyCon JP 2016 ビギナーセッションPyCon JP 2016 ビギナーセッション
PyCon JP 2016 ビギナーセッション
 
たった一ファイルの python スクリプトから始めるOSS開発入門 / PyCon JP 2016
たった一ファイルの python スクリプトから始めるOSS開発入門 / PyCon JP 2016たった一ファイルの python スクリプトから始めるOSS開発入門 / PyCon JP 2016
たった一ファイルの python スクリプトから始めるOSS開発入門 / PyCon JP 2016
 
Pythonで作る俺様サウンドエフェクター
Pythonで作る俺様サウンドエフェクターPythonで作る俺様サウンドエフェクター
Pythonで作る俺様サウンドエフェクター
 
PyLadies Tokyo 二周年記念パーティ LT
PyLadies Tokyo 二周年記念パーティ LTPyLadies Tokyo 二周年記念パーティ LT
PyLadies Tokyo 二周年記念パーティ LT
 
Python入門 コードリーディング - PyConJP2016
Python入門 コードリーディング - PyConJP2016Python入門 コードリーディング - PyConJP2016
Python入門 コードリーディング - PyConJP2016
 
Python札幌 2012/06/17
Python札幌 2012/06/17Python札幌 2012/06/17
Python札幌 2012/06/17
 
「Python言語」はじめの一歩 / First step of Python
「Python言語」はじめの一歩 / First step of Python「Python言語」はじめの一歩 / First step of Python
「Python言語」はじめの一歩 / First step of Python
 
Python 2/3コード共存戦略 #osakapy
Python 2/3コード共存戦略 #osakapyPython 2/3コード共存戦略 #osakapy
Python 2/3コード共存戦略 #osakapy
 
Raspberry PiとPythonでできること
Raspberry PiとPythonでできることRaspberry PiとPythonでできること
Raspberry PiとPythonでできること
 
Sinatra風マイクロフレームワークで始めるPython
Sinatra風マイクロフレームワークで始めるPythonSinatra風マイクロフレームワークで始めるPython
Sinatra風マイクロフレームワークで始めるPython
 
Goとテスト
GoとテストGoとテスト
Goとテスト
 
Open bio2004 biopython
Open bio2004 biopythonOpen bio2004 biopython
Open bio2004 biopython
 
Python界隈の翻訳プロジェクト
Python界隈の翻訳プロジェクトPython界隈の翻訳プロジェクト
Python界隈の翻訳プロジェクト
 
Windowsにpythonをインストールしてみよう
WindowsにpythonをインストールしてみようWindowsにpythonをインストールしてみよう
Windowsにpythonをインストールしてみよう
 
Pyconjp2016 pyftplib
Pyconjp2016 pyftplibPyconjp2016 pyftplib
Pyconjp2016 pyftplib
 

Similar to 過去2回の登壇内容からのPython×ドローンの進化アップデート内容と今後について展望

Introduction of kabepy
Introduction of kabepyIntroduction of kabepy
Introduction of kabepy
Kenjiro Kosaka
 
Pythonスタートアップ勉強会201109 python入門
Pythonスタートアップ勉強会201109 python入門Pythonスタートアップ勉強会201109 python入門
Pythonスタートアップ勉強会201109 python入門
Takayuki Shimizukawa
 

Similar to 過去2回の登壇内容からのPython×ドローンの進化アップデート内容と今後について展望 (20)

Introduction Pycon2010
Introduction Pycon2010Introduction Pycon2010
Introduction Pycon2010
 
Introduction of kabepy
Introduction of kabepyIntroduction of kabepy
Introduction of kabepy
 
Lina katayose pyladies3周年LT
Lina katayose pyladies3周年LTLina katayose pyladies3周年LT
Lina katayose pyladies3周年LT
 
20120915 Pythonは本当にBlenderの役に立っているか?
20120915 Pythonは本当にBlenderの役に立っているか?20120915 Pythonは本当にBlenderの役に立っているか?
20120915 Pythonは本当にBlenderの役に立っているか?
 
TFLite_and_PyTorch_Mobile
TFLite_and_PyTorch_MobileTFLite_and_PyTorch_Mobile
TFLite_and_PyTorch_Mobile
 
CPythonを読もう
CPythonを読もうCPythonを読もう
CPythonを読もう
 
PyPy 紹介
PyPy 紹介PyPy 紹介
PyPy 紹介
 
「自動化...か、かっこいいタル」(憧れ)から始める自動化
「自動化...か、かっこいいタル」(憧れ)から始める自動化「自動化...か、かっこいいタル」(憧れ)から始める自動化
「自動化...か、かっこいいタル」(憧れ)から始める自動化
 
Pythonスタートアップ勉強会201109 python入門
Pythonスタートアップ勉強会201109 python入門Pythonスタートアップ勉強会201109 python入門
Pythonスタートアップ勉強会201109 python入門
 
PyCon JP 2014 plone terada
PyCon JP 2014 plone teradaPyCon JP 2014 plone terada
PyCon JP 2014 plone terada
 
211120 他人の書いたPythonスクリプトをステップ実行で理解する
211120 他人の書いたPythonスクリプトをステップ実行で理解する211120 他人の書いたPythonスクリプトをステップ実行で理解する
211120 他人の書いたPythonスクリプトをステップ実行で理解する
 
Security.gs fes 2010 in tokyo
Security.gs fes 2010 in tokyoSecurity.gs fes 2010 in tokyo
Security.gs fes 2010 in tokyo
 
Pyconjp2014_implementations
Pyconjp2014_implementationsPyconjp2014_implementations
Pyconjp2014_implementations
 
Django ORM道場:クエリの基本を押さえ,より良い形を身に付けよう
Django ORM道場:クエリの基本を押さえ,より良い形を身に付けようDjango ORM道場:クエリの基本を押さえ,より良い形を身に付けよう
Django ORM道場:クエリの基本を押さえ,より良い形を身に付けよう
 
S16 t1 python学習奮闘記#6
S16 t1 python学習奮闘記#6S16 t1 python学習奮闘記#6
S16 t1 python学習奮闘記#6
 
人間のためのpython #stapy68 2021-04-14
人間のためのpython #stapy68 2021-04-14人間のためのpython #stapy68 2021-04-14
人間のためのpython #stapy68 2021-04-14
 
ユーザ・デザイナーから見たPlone CMSのアピールポイント
ユーザ・デザイナーから見たPlone CMSのアピールポイントユーザ・デザイナーから見たPlone CMSのアピールポイント
ユーザ・デザイナーから見たPlone CMSのアピールポイント
 
Python+Raspberry Piでロボット製作はじめました
Python+Raspberry Piでロボット製作はじめましたPython+Raspberry Piでロボット製作はじめました
Python+Raspberry Piでロボット製作はじめました
 
Python × Herokuで作る 雑談slack bot
Python × Herokuで作る 雑談slack botPython × Herokuで作る 雑談slack bot
Python × Herokuで作る 雑談slack bot
 
CONBU API の開発
CONBU API の開発CONBU API の開発
CONBU API の開発
 

More from Lina Katayose

More from Lina Katayose (17)

Pythonで ハードウェアを動かす楽しさと ハードウェアハック始めたきっかけ
Pythonで ハードウェアを動かす楽しさと ハードウェアハック始めたきっかけPythonで ハードウェアを動かす楽しさと ハードウェアハック始めたきっかけ
Pythonで ハードウェアを動かす楽しさと ハードウェアハック始めたきっかけ
 
実際にワーケーションを実践して思ったこと。
実際にワーケーションを実践して思ったこと。実際にワーケーションを実践して思ったこと。
実際にワーケーションを実践して思ったこと。
 
Raspberry Piを使ったモーターのコントロールと応用
Raspberry Piを使ったモーターのコントロールと応用Raspberry Piを使ったモーターのコントロールと応用
Raspberry Piを使ったモーターのコントロールと応用
 
海外のPyLadiesメンバーと交流して思ったこと
海外のPyLadiesメンバーと交流して思ったこと海外のPyLadiesメンバーと交流して思ったこと
海外のPyLadiesメンバーと交流して思ったこと
 
スマホアプリを0から設計してリリースするまでのこと
スマホアプリを0から設計してリリースするまでのことスマホアプリを0から設計してリリースするまでのこと
スマホアプリを0から設計してリリースするまでのこと
 
PyLadies and the importance of community participation
PyLadies and the importance of community participationPyLadies and the importance of community participation
PyLadies and the importance of community participation
 
Pyladies Tokyo LT 20181008
Pyladies Tokyo LT 20181008Pyladies Tokyo LT 20181008
Pyladies Tokyo LT 20181008
 
Making a Drone by Python using RaspberryPi and Google VoiceKit
Making a Drone by Python using RaspberryPi and Google VoiceKitMaking a Drone by Python using RaspberryPi and Google VoiceKit
Making a Drone by Python using RaspberryPi and Google VoiceKit
 
Preparation for pycon 2018(cleveland)
Preparation for pycon 2018(cleveland)Preparation for pycon 2018(cleveland)
Preparation for pycon 2018(cleveland)
 
Python Boot Camp のお話し
Python Boot Camp のお話しPython Boot Camp のお話し
Python Boot Camp のお話し
 
すうがく初めの一歩
すうがく初めの一歩すうがく初めの一歩
すうがく初めの一歩
 
ドローンのフライトコントローラをPythonで制御してみた話
ドローンのフライトコントローラをPythonで制御してみた話ドローンのフライトコントローラをPythonで制御してみた話
ドローンのフライトコントローラをPythonで制御してみた話
 
私のPython学習法lt
私のPython学習法lt私のPython学習法lt
私のPython学習法lt
 
Geek women japanのロゴをhtmlとcssで作る2
Geek women japanのロゴをhtmlとcssで作る2Geek women japanのロゴをhtmlとcssで作る2
Geek women japanのロゴをhtmlとcssで作る2
 
Geek women japanのロゴをhtmlとcssで作る
Geek women japanのロゴをhtmlとcssで作るGeek women japanのロゴをhtmlとcssで作る
Geek women japanのロゴをhtmlとcssで作る
 
Raspberry pi 3を使ってみてあれこれ
Raspberry pi 3を使ってみてあれこれRaspberry pi 3を使ってみてあれこれ
Raspberry pi 3を使ってみてあれこれ
 
Raspberry pi 3を使ってみてあれこれ
Raspberry pi 3を使ってみてあれこれRaspberry pi 3を使ってみてあれこれ
Raspberry pi 3を使ってみてあれこれ
 

過去2回の登壇内容からのPython×ドローンの進化アップデート内容と今後について展望