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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Kazuyuki Mori
May 15, 2016
Programming
46
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
860
BitMech 探索的 トレーディングシステム fin-py study #1
mainyaa
0
57
Electron(旧atom shell)基礎+入門
mainyaa
0
50
Docker基礎+Docker0.9/0.10概要
mainyaa
0
44
Docker基礎+docker0.9, 0.10概要
mainyaa
0
64
Other Decks in Programming
See All in Programming
WebMCP Challenge に星空観察アプリで参加した話
okajun35
0
170
Java 27新機能 / Java 27 new features
kishida
2
140
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
260
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
6
1.9k
手動確認はもう限界 〜XCUITestでCustom URL Schemeの遷移を起動種別ごとに自動テストする〜 / Testing Custom URL Schemes with XCUITest
otouto
0
280
FreeBSDでZabbixを動かす.pdf
kenkino
0
280
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
4.4k
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
6
2.2k
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
110
一参加者から『中の人』へ 〜全通PHPerがブースに立って学んだ、カンファレンスを100倍楽しむコツ〜
wp_daisuke
0
150
MVNOの申込からeSIM開通までをiOSアプリでつなぐ- 本人確認・MNP・通信事業者基盤をまたぐ実装
satotakeshi
0
400
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
210
Featured
See All Featured
Paper Plane
katiecoart
PRO
4
53k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
240
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
600
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
410
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
420
For a Future-Friendly Web
brad_frost
183
10k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.2k
Being A Developer After 40
akosma
91
590k
A better future with KSS
kneath
240
18k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
590
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