SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Downloaden Sie, um offline zu lesen
自動操縦機器への
mrubyの応用
@fenrir_n
http://fenrir.naruoka.org/
お話しするのは…
• 『小型の無人航空機』を
• 『自動操縦』するため
• 『mruby』を使いました
小型の無人航空機 #とは
• 翼の幅1m程度、重さ1kg程度、人が乗らない
• 遠隔操作を超えた自律機能
• 空中で翼がもげても、
墜落しないものも
故障発生!
高度な制御により
飛行を継続
安全に着陸

高性能な組み込み機器
によって可能に
自動操縦 #とは
センサ
自
動
操
縦
に
必
要
な
ア
ル
ゴ
リ
ズ
ム

航法

どこをどう飛んでいるのか認識す
る

誘導

どのように飛びたいか計画を立て
る

制御

計画に沿うように飛ぶ

アクチュ
エータ
mruby #とは #なぜ1
• ネイティブ開発環境を手軽に用意できない!

開発には
エミュレータや
コンパイラが必要
高価で入手困難な
場合も
mruby #とは #なぜ2
• 多くの人がやりたいのは誘導と制御
• 『アルゴリズムごと変えたい』

ここを徹底的に
いじりたい
パラメータを変え
るだけでは
満足できない
mrubyで解決
• ユーザが開発環境を
用意する必要がない!
–Write once, debug anywhere.

• やりたいことだけ安心してできる
『お砂場』をユーザに用意できる!
–And, try many times.
デモを持ってきています
• 水のこぼれないお盆
(Make: Tokyo Meeting 2012, 2013で展示)

http://www.youtube.com/watch?v=sHb9ELu_oV0 ©RCDFDLさん
デモの仕組み
• 自動操縦装置TinyFeather (TI社製DSP内蔵)
• mrubyのmirb相当を実装
• 動きをつくる部分はRubyスクリプトをSD
カードから読み込んでいる

TinyFeather::guidance_control = lambda{|gc_info|
unless gc_info.valid_nav? then break end
roll_diff_deg = rad2deg(gc_info.phi - init_roll)
roll_p_gain = roll_diff_deg.abs < 5 ? 0.5 : 2
roll_command_diff = roll_diff_deg * roll_p_gain
roll_command = servo_limit(roll_command_previous + roll_command_diff)
servo_out[1] = roll_command.to_i
roll_command_previous = roll_command
TinyFeather::servo_write(servo_out)
}
TinyFeatherの中身
• 各種センサ
– GPS
– 3軸加速度計
– 3軸ジャイロ
– 3軸地磁気
– 気圧計

• MicroSD / USB
バイナリサイズ
Item
array.
o
backtrace.
o
cl o
ass.
codegen.
o
com par.
o
crc.
o
debug.
o
dum p.
o
enum .
o
error.
o
etc.
o
evalo
.
gc.
o
gem _i t.
ni o
hash.
o
i t.
ni o
kernelo
.
l o
oad.
m ath.
o
m rblb.
io
num eri o
c.
obj o
ect.
poolo
.
pri o
nt.
proc.
o
range.
o
spri o
ntf.
state.
o
stri o
ng.
sym bolo
.
ti e.
m o
vari e.
abl o
vm .
o
y. o
tab.

lbm ruby.
i
a

.
text

other
(.
data|.
bss|..
.)

sum

15648
1376
20416
56320
32
96
1312
5856
32
5184
1344
128
7584
128
11808
448
160
6400
4416
32
13056
5696
640
224
1984
4512
15520
1600
22496
5568
8064
8640
23072
64768

512
80
1792
2926
12
0
12
108
12
352
160
8
312
0
352
0
24
60
156
16835
408
728
0
16
200
224
944
304
1225
240
724
196
473
73082

16160
1456
22208
59246
44
96
1324
5964
44
5536
1504
136
7896
128
12160
448
184
6460
4572
16867
13464
6424
640
240
2184
4736
16464
1904
23721
5808
8788
8836
23545
137850

314560

102477

417037

• 約400KB
• TMS320C6745
• cl6x.exe ver.7.4.2
• -mf5 (maximum opt. for
speed )
• tree/b69bb896fcae6437
3606172fc43c558f02d42
07f
mruby 良い点 悪い点
• 開発者としての視点
– エンドユーザに最大限の自由を持たせられる
– 逆に、エンドユーザの範囲を制限できる

• 1エンドユーザとしての視点
– Rubyが動く! 楽しい!!
– 何度でも試行錯誤が素早くできる
mrubyの今後?
• 堅牢性?
– クリティカルな部分には使わない?

• 並列処理?
– スレッド / プロセス / それら間の通信?

• Arduino / mbed ?
– シールドなどH/Wと連動したライブラリ?

Más contenido relacionado

Empfohlen

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 

Empfohlen (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Jun/31/2014 mruby on TinyFeather