[0348]_github_download方法

★★★★★★★★★★★
githubのgopigoのExampleをダウンロードする
★★★★★★★★★★★

参考

Exampleのありか
https://github.com/DexterInd/GoPiGo/tree/master/Software/Python
Exampleのありか
https://github.com/DexterInd/GoPiGo/tree/master/Software/Python/Examples
★★★★★★★★★★★
https://github.com/DexterInd/GoPiGo3/tree/master/Software/Python/Examples
★★★★★★★★★★★

見本文は
git clone git@github.com:everydayrails/rails-4-1-rspec-3-0.git
より
ありかのWebは
https://github.com/DexterInd/GoPiGo
https://github.com/DexterInd/GoPiGo3.git
なので、cloneのありかは、
git clone https://github.com/DexterInd/GoPiGo.git
★★★★★★★★★★★
git clone https://github.com/DexterInd/GoPiGo3.git
★★★★★★★★★★★
だから
コマンドは、
★★★★★★★★★★★
git clone https://github.com/DexterInd/GoPiGo.git
git clone https://github.com/DexterInd/GoPiGo3.git
★★★★★★★★★★★
(うまくコピーできた!!!)

cd /home/pi/GoPiGo/Software/Python/Examples/Browser_Streaming_Robot

pi@dex:~/GoPiGo/Software/Python/Examples/Browser_Streaming_Robot $ pwd
/home/pi/GoPiGo/Software/Python/Examples/Browser_Streaming_Robot

pi@dex:~/GoPiGo/Software/Python/Examples/Browser_Streaming_Robot $ ls -l
合計 228
-rw-r–r– 1 pi pi 485 10月 18 21:03 COPYING
-rw-r–r– 1 pi pi 1498 10月 18 21:03 LICENSE
-rw-r–r– 1 pi pi 2598 10月 18 21:03 README.md
-rw-r–r– 1 pi pi 62402 10月 18 21:03 Raspberry_Pi_Camera_controlled-by-mobile-browser.jpg
-rw-r–r– 1 pi pi 56971 10月 18 21:03 Raspberry_Pi_Camera_streaming-to-computer-browser.jpg
-rw-r–r– 1 pi pi 58138 10月 18 21:03 Raspberry_Pi_Camera_streaming-to-mobile-browser.jpg
-rwxr-xr-x 1 pi pi 2792 10月 18 21:03 browser_stream_setup.sh
-rw-r–r– 1 pi pi 5178 10月 18 21:03 camera_streamer.py
-rwxr-xr-x 1 pi pi 6377 10月 18 21:03 robot_controller.py
-rwxr-xr-x 1 pi pi 10613 10月 18 21:03 robot_web_server.py
drwxr-xr-x 5 pi pi 4096 10月 18 21:03 www

でも、操作が分からない、、、ので
★★★★★★
(美人だな)レイチェルさんのWebページを参照!

Raspberry Pi: Robot Camera Car Controlled Through the Browser


★★★★★★

Clone their repository from GitHub
git clone https://github.com/DexterInd/GoPiGo.git

cd GoPiGo

cd Setup
sudo chmod +x install.sh
sudo ./install.sh

★★★★★★★★★★★
Testing
★★★★★★★★★★★
cd GoPiGo/Software/Python
sudo python basic_test_all.py
(あれ?。だめだな動かないや!!助けてレイチェルさん!)

★★★★★★★★★★★
Browser Streaming
★★★★★★★★★★★gopigo
cd /home/pi/GoPiGo/Software/Python/Examples/Browser_Streaming_Robot
sudo chmod +x browser_stream_setup.sh
sudo chmod +x robot_web_server.py
sudo ./browser_stream_setup.sh

cd /home/pi/GoPiGo/Software/Python/Examples/Browser_Streaming_Robot
sudo ./robot_web_server.py

http://192.168.0.2
http://192.168.0.7:1
(うーーーーん?。まだだめだな動かないや!!レイチェルさん!)

★★★★★★★★★★★gopigo3
cd /home/pi/GoPiGo3/Software/Python/Examples
sudo chmod +x Motor.py
sudo chmod +x Remote_Control.py

sudo ./Motor.py
sudo ./Remote_Control.py
(これは動く、gopigo3のExamplesのままなので。)
★★★★★★★★★★★

http://192.168.0.6:9090
http://192.168.0.6:8085
http://192.168.0.6:8080
http://192.168.0.6 dex -I
http://192.168.0.6
いろいろやったが、だめ。。。。
レイチェルさん!助けて・・・・・

viエディタでshファイルに追加
import gopigo3
import easygopigo3
(・・・したけど、だめ。)

10/22、更に

Python in the GoPiGo3


参考
sudo curl -kL dexterindustries.com/update_gopigo3 | bash
sudo reboot

■××××××
/home/pi/GoPiGo3/Projects/MouseControl
sudo chmod +x mouse_control_robot.py
sudo ./mouse_control_robot.py
(ダメ!マウスの言う事きかない・・・・)

■◎◎◎◎◎
/home/pi/GoPiGo3/Projects/BasicRobotControl
sudo chmod +x keyboarded_robot.py
sudo chmod +x run_this.py
sudo ./run_this.py
(◎これはOK!!)

■◎◎◎◎◎
/home/pi/GoPiGo3/Projects/IntelligentObjectAvoider
robot.py
sudo chmod +x robot.py
python3 robot.py
(◎動いたが、、servoがいうこと角を検知して避けるようだが。言うこと聞かないなあ・・・)

■×××××RaspPiCameraでないとダメみたい・・・
/home/pi/GoPiGo3/Projects/RemoteCameraRobot
python3 flask_server.py

<以下は、RemoteCameraRobotの説明文、フォルダ内のREADME.mdより>
# Remote Controlled GoPiGo3

In this project we remotely control a GoPiGo3 robot via a mobile device or a laptop.
![Imgur](http://i.imgur.com/sT2tHuPl.jpg)
## Requirements
We need the following components for this project:

* A [GoPiGo3](https://www.dexterindustries.com/gopigo3/) robot – it also includes the battery pack.
* A [Raspberry Pi](https://www.dexterindustries.com/raspberry-pi/).
* A [Pi Camera](https://www.dexterindustries.com/shop/raspberry-pi-camera/).
* A laptop or a mobile device (aka smartphone).

## Setting Up

In order to proceed the setup, make sure you have the `GoPiGo3` repository installed (not just cloned, but also installed) or that you have the latest version of `Raspbian For Robots`.
After going through the above paragraph, install the `Pi Camera` dependencies and `Flask` by running the `install.sh` script:
“`
sudo bash install.sh(★これやった:マーク★)
“`
If everything goes well, **reboot** your `Raspberry Pi`.(★これやった:マーク★)
You should now have everything set up.

## Running it

Start the server by typing the following command:
“`
python3 flask_server.py(★これやった:マーク★)
“`
It’s going to take a couple of seconds for the server to fire up.
A port and address will be shown in there. By default, the port is set to `5000`.

http://dex.local:5000(★これやった:マーク★)でも、RaspPiCameraの映像待ち、、、そりゃそっか・・・

If you have got `Raspbian For Robots` installed, then going to `http://dex.local:5000` address will be enough.
If you don’t have `Raspbian For Robots`, then you’ll need to see what’s your interface’s IP address.

Also, please make sure you have your mobile device / laptop on the same network as your `GoPiGo3`. Otherwise, you won’t be able to access it.

## YouTube Video

#### When loading `http://dex.local:5000` for the first time, click a couple of times on the screen without moving the mouse around, in order to enable the “joystick” functionality.

Here’s a YouTube video of this project:

[![Alt text](https://img.youtube.com/vi/Tu_-Al6Smhg/0.jpg)](https://www.youtube.com/watch?v=Tu_-Al6Smhg)