|
| 1 | +# NCKU_Sport_At_Home |
| 2 | + |
| 3 | +* [Introduction](#introduction) |
| 4 | +* [Demo Link](#demo-link) |
| 5 | +* [System Architecture](#system-architecture) |
| 6 | +* [Hardware and Software Setup](#hardware-and-software-setup) |
| 7 | + * [Hardware Setup](#hardware-setup) |
| 8 | + * [Software Setup](#software-setup) |
| 9 | +* [User Manual](#user-manual) |
| 10 | + * [SoftWare Environment](#software-environment) |
| 11 | + * [HardWare Environment](#hardware-environment) |
| 12 | + * [Download Source Code](#download-source-code) |
| 13 | + * [Run Code](#run-code) |
| 14 | + * [embARC](#embarc) |
| 15 | + * [Unity](#unity) |
| 16 | + * [How to play?](#how-to-play) |
| 17 | + * [Ball pitch setting](#ball-pitch-setting) |
| 18 | + * [Ball velocity setting](#ball-velocity-setting) |
| 19 | + * [Ball position setting](#ball-position-setting) |
| 20 | +* [Problem](#problem) |
| 21 | + |
| 22 | +## Introduction |
| 23 | +This project titled **Sport, at home** is designed to allow batters to practice indoors during the Coronavirus Outbreak which combines ARC IOTDK to implement voice recognition to operate the game interface , KINECT V2 to detect batters' motions and UNITY to create a simple 3D baseball game. |
| 24 | +## Demo Link |
| 25 | +[Click here](https://v.youku.com/v_show/id_XNDc5MDEwMjUwNA==.html) |
| 26 | + |
| 27 | +## System Architecture |
| 28 | + |
| 29 | +## Hardware and Software Setup |
| 30 | +### Hardware Setup |
| 31 | +The Hardware requirements are as below: |
| 32 | +- DesignWare ARC IoT Development Kit |
| 33 | +- inmp-441(voice sensor) |
| 34 | +- KINECT V2(xbox one) |
| 35 | +- PC |
| 36 | +- Micro USB To USB **x1** |
| 37 | + |
| 38 | +### Software Setup |
| 39 | +The Software requirements are as below: |
| 40 | +- embARC Open Source Platform |
| 41 | +- MetaWare Development Toolkit & GNU Toolchain |
| 42 | +- DSpotter(Cyberon) |
| 43 | +- Unity + Kinect plugin |
| 44 | +- Kinect for Windows SDK 2.0 |
| 45 | + |
| 46 | +## User Manual |
| 47 | +### SoftWare Environment |
| 48 | +1. Installing [Unity](https://store.unity.com/?_ga=2.247763335.1014993985.1596985340-1590034984.1596985340#plans-individual) |
| 49 | +2. Installing [Environmental Settings for ARC IoTDK](https://docs.google.com/presentation/d/1IZgiAmwunmWSda6N9_mpmO7g144-W_fN/edit#slide=id.p1) |
| 50 | +3. Installing [Kinect for Windows SDK 2.0](https://www.microsoft.com/en-us/download/details.aspx?id=44561) |
| 51 | +### HardWare Environment |
| 52 | +1. Connecting INMP441 & ARC |
| 53 | + |
| 54 | +2. Connecting ARC **(Dataport)** & PC by `Micro USB To USB` |
| 55 | +3. Connecting Kinect V2 & PC, then you can test it by `Kinect for Windows SDK 2.0` to confirm whether it works fine |
| 56 | + |
| 57 | +### Download Source Code |
| 58 | +1. Downloading `Unity_package` from [here](https://drive.google.com/drive/folders/1N7AXqAA_fNJt_3JR1my2e3aJU0aEI18h) |
| 59 | +2. Downloading `embARC/DSpotter_Sport_at_home` from github |
| 60 | +### Run Code |
| 61 | +#### embARC |
| 62 | +1. Put `DSpotter_Sport_at_home` into embarc_osp |
| 63 | +2. Use `Visual Code` to open embarc_osp folder |
| 64 | +3. Let `terminal` go to `DSpotter_Sport_at_home` |
| 65 | +4. Key in `gmake TOOLCHAIN=mw BOARD=iotdk DIG_NAME=IoTDK gui` |
| 66 | +5. Click `ok` and wait a second |
| 67 | +6. Click `run` |
| 68 | +#### Unity |
| 69 | +1. Open `Unity Hub` to create a new 3D repository |
| 70 | + |
| 71 | +2. Click Assets -> Import Package -> Custom Package |
| 72 | + |
| 73 | +3. Open Sport_at_home.unitypackage |
| 74 | + |
| 75 | +4. Import All |
| 76 | + |
| 77 | +5. Double Click Scenes -> Baseball, then you can find the blue square appear |
| 78 | + |
| 79 | +6. Choose Game -> Display2 |
| 80 | + |
| 81 | +7. Click Run ! (You can click `Maximize` to maximize the game window, or Click `Maximize On Play` before Click Run) |
| 82 | + |
| 83 | + |
| 84 | +### How to play? |
| 85 | + |
| 86 | +The list on the left is the instructions that you can release, you can use keyboard or voice to release it. |
| 87 | +Example : |
| 88 | +At the beginning, |
| 89 | +you can key in `z` or say `球種設定` in Chinese to `set the ball pitch` |
| 90 | +you can key in `x` or say `球速設定` in Chinese to `set the ball velocity` |
| 91 | +you can key in `c` or say `位置設定` in Chinese to `set the ball position` |
| 92 | +you can key in `space` or say `開始投球` in Chinese to `let the ball be thrown to you` |
| 93 | + |
| 94 | +The info which is white on the Bottom Right Corner is the setting you set now. |
| 95 | +At the beginning, |
| 96 | +the ball pitch is Straight ball |
| 97 | +the ball velocity is random |
| 98 | +the ball position is random |
| 99 | + |
| 100 | +The velocity which is red on the Upper Right Corner is the velocity of this pitch, it will be changed immediately when the next ball be pitched. |
| 101 | +At the beginning, it will display 178 km/h |
| 102 | + |
| 103 | +The 9 grids in the middle is 9 possible positions of the ball. |
| 104 | +The **yellow mark** is the position of this pitch, it will be changed immediately when the next ball be pitched. |
| 105 | +If you set `random` it will first be displayed at middle, then be changed immediately when the next ball be pitched. |
| 106 | +If you set `1~9` it will be displayed at the gird you set immediately. |
| 107 | +At the beginning, because the ball position is random, it will be displayed at middle. |
| 108 | + |
| 109 | +#### Ball pitch setting |
| 110 | +You can set ball pitch by keying in `z` or say `球種設定` in Chinese |
| 111 | +Now, we only have Straight ball |
| 112 | +You can key in `1` or say `設定直球` in Chinese to set `Straight ball` |
| 113 | +You can key in `q` or say `取消設定` in Chinese to `quit setting` |
| 114 | +Initially, it is set `Straight ball` |
| 115 | + |
| 116 | +#### Ball velocity setting |
| 117 | +You can set ball velocity by keying in `x` or say `球速設定` in Chinese |
| 118 | +We totally have 10 segments can be chose |
| 119 | +You can key in `0` or say `一百公里` in Chinese to set velocity between `100 ~ 109 km/h` |
| 120 | +You can key in `1` or say `一百一十` in Chinese to set velocity between `110 ~ 119 km/h` |
| 121 | +You can key in `2` or say `一百二十` in Chinese to set velocity between `120 ~ 129 km/h` |
| 122 | +You can key in `3` or say `一百三十` in Chinese to set velocity between `130 ~ 139 km/h` |
| 123 | +You can key in `4` or say `一百四十` in Chinese to set velocity between `140 ~ 149 km/h` |
| 124 | +You can key in `5` or say `一百五十` in Chinese to set velocity between `150 ~ 159 km/h` |
| 125 | +You can key in `6` or say `一百六十` in Chinese to set velocity between `160 ~ 169 km/h` |
| 126 | +You can key in `7` or say `一百七十` in Chinese to set velocity between `170 ~ 179 km/h` |
| 127 | +You can key in `8` or say `一百八十` in Chinese to set velocity between `180 ~ 189 km/h` |
| 128 | +You can key in `9` or say `一百九十` in Chinese to set velocity between `190 ~ 199 km/h` |
| 129 | +You can key in `r` or say `隨機設定` in Chinese to set velocity `random` which is between `100 ~ 199 km/h` |
| 130 | +You can key in `q` or say `取消設定` in Chinese to `quit setting` |
| 131 | +Initially, it is set `random` |
| 132 | + |
| 133 | +#### Ball position setting |
| 134 | +You can set ball position by keying in `c` or say `位置設定` in Chinese |
| 135 | +We totally have 9 grids can be chose |
| 136 | +You can key in `1` or say `一號位置` in Chinese to set position at `Upper Left Corner` |
| 137 | +You can key in `2` or say `二號位置` in Chinese to set position at `Upper` |
| 138 | +You can key in `3` or say `三號位置` in Chinese to set position at `Upper Right Corner` |
| 139 | +You can key in `4` or say `四號位置` in Chinese to set position at `Left` |
| 140 | +You can key in `5` or say `五號位置` in Chinese to set position at `Middle` |
| 141 | +You can key in `6` or say `六號位置` in Chinese to set position at `Right` |
| 142 | +You can key in `7` or say `七號位置` in Chinese to set position at `Bottom Left Corner` |
| 143 | +You can key in `8` or say `八號位置` in Chinese to set position at `Bottom` |
| 144 | +You can key in `9` or say `九號位置` in Chinese to set position at `Bottom Right Corner` |
| 145 | +You can key in `r` or say `隨機設定` in Chinese to set position `random` |
| 146 | +You can key in `q` or say `取消設定` in Chinese to `quit setting` |
| 147 | +Initially, it is set `random` |
| 148 | + |
| 149 | +## Problem |
| 150 | +If you have problem like below image, please check which `COM?` is your ARC connecting with PC, then double click Script -> adforce to revise `COM3` to your `COM?` |
| 151 | + |
0 commit comments