Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
GoPiGo2で遊んでみた
Search
Kazuyuki Mori
May 15, 2016
Programming
50
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
GoPiGo2で遊んでみた
Kazuyuki Mori
May 15, 2016
More Decks by Kazuyuki Mori
See All by Kazuyuki Mori
ライブ配信サーバー完全に理解した
mainyaa
2
880
BitMech 探索的 トレーディングシステム fin-py study #1
mainyaa
0
61
Electron(旧atom shell)基礎+入門
mainyaa
0
56
Docker基礎+Docker0.9/0.10概要
mainyaa
0
44
Docker基礎+docker0.9, 0.10概要
mainyaa
0
64
Other Decks in Programming
See All in Programming
ChromeでローカルLLM
ryu1013
0
140
APNsからLive Activityを開始する話
yumnumm
0
170
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
1k
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
160
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
170
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
260
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.2k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
190
気持ちぃ〜角丸 Squircle
ryu1013
0
310
golang-bob.pdf
iwatsukayura
0
130
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
450
R8 の設定見直しでアプリサイズ削減
andpad
0
220
Featured
See All Featured
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
490
Designing Experiences People Love
moore
143
24k
Large-scale JavaScript Application Architecture
addyosmani
516
110k
Practical Orchestrator
shlominoach
192
12k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
450
Marketing to machines
jonoalderson
1
5.9k
For a Future-Friendly Web
brad_frost
184
10k
How GitHub (no longer) Works
holman
316
150k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
The SEO identity crisis: Don't let AI make you average
varn
0
590
Abbi's Birthday
coloredviolet
4
10k
Transcript
GoPiGo2で遊んでみた
Who am i 森 和之 @mainyaa 株式会社トップゲート ボドゲ好き猫エンジニア
GoPiGo2
GoPiGo2とは • RaspberryPIを積んだロボットカー • Dexter Industries社製 ◦ LEGOマインドストームのキットを作ってる • Kickstarter発
None
GoPiGo2の良い所 • 20分で作れる • センサーがキットになっていて、カスタマイズ出来る • 電子工作が初めてでも作れるぐらい簡単 • LEGOみたいにセンサーを組み合わせられる
GoPiGo2の良い所2 • ソースコードがオープンソースで公開されている(GPL) • ライブラリが豊富 ◦ C、C#、Java、NodeJS、Python、Scratch • https://github.com/DexterInd/GoPiGo/ •
プログラマブルなロボットカー
購入ガイド • RaspberryPIすでに持っている人 ◦ BaseKit+何かのセンサーで十分 ◦ $99 • これからRaspberryPIを始める人 ◦
StarterKitがおすすめ ◦ $299
None
None
GoPiGo2の良い所3 • Exampleが豊富 ◦ https://github.com/DexterInd/GoPiGo/tree/master/Software/Python/Ex amples • PS3コントローラーで操作できる(要bluetooth) • 超音波センサーで2m先まで物体があるか検知できる
• エンコーダーホイールがあるため、cm単位でモーターを制 御できる
None
エンコーダー ホイール タイヤと同じ軸に取り付ける タイヤがどれだけ回転したのかを パルスで受け取る Photo: ROBOTC http://www.robotc.net/wikiarchive/Tutorials/Arduino_Projects/Mobile_Robotics/BoeBot/What_is_an_Encoder
エンコーダーホイール • エンコーダーの穴は合計64個なので、360 / 64で、5 deg / pulse • ホイールの半径は3.25cm
• DER (Degree Per Ratio)がわかれば、タイヤをn cm進むのに必要なパルス数 が求められる
エンコーダーホイール • 例:90度右を向く def right_deg(degree): pulse= int(degree / 5) #
5 degree/pulse enc_tgt(0, 1, pulse) right()
どこでもRaspberryPI開発したい
どこでもRaspberryPI開発したい • 家に置いてあるRaspberryPIをノマドしつつ開発する ◦ wifiを自動再接続するようにする ◦ SSH Tunnelを使う ◦ wifiは11acを使う
•
どこでもRaspberryPI開発したい • wifiを自動再接続するようにする ◦ $ sudo apt-get install wicd ◦
$ wicd-curses
どこでもRaspberryPI開発したい • SSH Tunnelを使う ◦ MacもRPIも異なるプライベートネットワークで、グローバルIPがない ◦ GCPやAWS上にSSH Tunnel用の中継サーバーを建てちゃう ◦
世界中どこからでもRPIにSSH接続できる
Google Cloud Platform RPI(母艦) Macbook 中継サーバー private network private network
どこでもRaspberryPI開発したい - SSH Tunnelを使う • $ sudo apt-get install autossh
• $ git clone https://github.com/mainyaa/RaspberryPi-Mothership • $ cd ssh-tunnel-example • $ vim usr/bin/ssh_tunnel ◦ [ssh_tunnel]をglobalIPに書き換え
どこでもRaspberryPI開発したい - SSH Tunnelを使う • sudo apt-get install -y autossh
• git clone https://github.com/mainyaa/RaspberryPi-Mothership.git • sudo cp ./RaspberryPi-Mothership/init.d/ssh_tunnel /etc/init.d/ • sudo cp ./RaspberryPi-Mothership/sbin/ssh_tunnel /usr/sbin/ • sudo insserv ssh_tunnel • sudo reboot ◦ これで、RPIが常に中継サーバーにSSH接続している 状態になった
どこでもRaspberryPI開発したい - SSH Tunnelを使う • RPIに接続する ◦ ssh -o 'ProxyCommand
ssh ssh-tunnel nc %h %p' -p 20022 pi@localhost
Google Cloud Platform RPI(母艦) Macbook 中継サーバー private network private network
Port20022 Port22
どこでもRaspberryPI開発したい • RaspberryPiがどんなネットワークにいようと、raspiのIPアドレスを調べることな くssh接続できるようにする ◦ http://qiita.com/mainyaa/items/f10d15a7d2cdddd7dfbf
どこでもRaspberryPI開発したい • wifiは11acを使う ◦ これは間に合いませんでした>< ◦ ドライバのビルドのためにカーネルヘッダーを用意したり、ドライバのソース にパッチを当てたり、大変なのに認識してくれない>< ◦ 成功している人いますか?
GoPiGo2で脳◦メーカー作ってみた
GoPiGo2で脳◦メーカー作ってみた • Cloud Vision APIすごいよ • # LABEL_DETECTION カテゴリの検出 •
# LANDMARK_DETECTION 観光名所などの場所名 • # LOGO_DETECTION ロゴの検出 • # TEXT_DETECTION OCR、文字の検出 • # SAFE_SEARCH_DETECTION 画像が有害な内容を含んでいるかを検出 • # IMAGE_PROPERTIES 画像に関する色データを検出 • # FACE_DETECTION 顔検出 •
GoPiGo2で脳◦メーカー作ってみた • Cloud Vision APIすごいよ ◦ 顔検出ができる ▪ 顔の座標特定 ▪
笑顔、怒り、悲しみ、驚きを判定
GoPiGo2で脳◦メーカー作ってみた • Cloud Vision APIすごいよ ◦ 物体検出ができる ◦ カメラに写っている物体を識別 ▪
gadget, cat, human, room, floor, clothing, book
GoPiGo2で脳◦メーカー作ってみた • Cloud Vision APIすごいよ ◦ 課金はリクエスト1,000回=1unitで換算 ◦ 月1unitまで無料 ◦
以降、月1unitごとに$5 ▪ https://cloud.google.com/vision/docs/pricing
GoPiGo2で脳◦メーカー作ってみた • Cloud Vision APIの凄さを伝えるべくRasPi botとビデオを作った話 ◦ http://qiita.com/kazunori279/items/768c7fdf96cdf45a9d16 • kazunoriさんに作成とOSS化の許可を得て、フルスクラッチでvBot君を
作った • OSSで公開予定
GoPiGo2で脳◦メーカー作ってみた • 僕のvBot君の機能 ◦ 顔を検知できなかったら認識できた物体をしゃべるよ ◦ 笑顔を認識すると寄ってくるよ ◦ 笑顔から笑顔度を判定して◯内メーカー風に画像を出し てくれるよ
None
None
デモ
None
Thanks