Updated documentation
This commit is contained in:
@@ -2,30 +2,41 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
As for our project, we've made the following design choices for our infrastructure.
|
||||||
|
We've decided to implement a NodeJS server on a Raspberry Pi, which will handle the requests for retrieving exercises.
|
||||||
|
This server will communicate with a MariaDB database, which contains the exercise data.
|
||||||
|
The Pepper robot will host a web server, which will handle the incoming rotational data from an ESP8266.
|
||||||
|
This data will then be processed by a motion processor class, `InputProcessor`, which will compare the rotational data
|
||||||
|
to the data of the current exercise and show how well the user is performing.
|
||||||
|
|
||||||
|
Down below is a visual representation of how this infrastructure will look like.
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
|
|
||||||
graph TB
|
graph TB
|
||||||
subgraph "Raspberry Pi"
|
subgraph "Raspberry Pi"
|
||||||
server[NodeJS Server\nHandles requests for\nexercises]
|
server[NodeJS Server\n\nHandles requests for\nretrieving exercises]
|
||||||
db[Database]
|
db[Database - MariaDB\n\nContains exercise data]
|
||||||
server --Fetch exercise--> db
|
server --Fetch database entry--> db
|
||||||
db --Exercise--> server
|
db --Return retrieved entry--> server
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
subgraph "Pepper Robot"
|
subgraph "Pepper Robot"
|
||||||
webServer[Web Server\n\nHandles incoming rotational data\nfrom ESP8266]
|
webServer[Web Server\n\nHandles incoming rotational data\nfrom ESP8266]
|
||||||
motionProcessor[Motion Processor\n\nProcesses rotational data,\ncompares it to the current exercise\nand shows the statistics on the screen]
|
motionProcessor[Motion Processor\n\nProcesses rotational data,\ncompares it to the current exercise\nand shows the statistics on the screen]
|
||||||
|
ui[User Interface\n\nShows the current exercise,\nhow to perform it and the\nstatistics of the user's performance]
|
||||||
motionProcessor --Send HTTP GET for Exercise--> server
|
motionProcessor --Send HTTP GET for Exercise--> server
|
||||||
server --Send exercise in JSON format--> motionProcessor
|
server --Send exercise data\nin JSON format--> motionProcessor
|
||||||
webServer --Process rotational data--> motionProcessor
|
webServer --Process rotational data--> motionProcessor
|
||||||
|
motionProcessor --Show statistics\non the UI--> ui
|
||||||
end
|
end
|
||||||
|
|
||||||
subgraph "Motion Sensing Device"
|
subgraph "Motion Sensing Device"
|
||||||
esp[ESP8266\n\nMeasures sensor data\nand sends it to the web server]
|
esp[ESP8266\n\nMeasures sensor data\nand sends it to the web server]
|
||||||
gyro[Gyroscope\n\nMeasures rotational data\nand sends it to the ESP8266]
|
gyro[Gyroscope\n\nMeasures rotational data\n(Rx, Ry, Rz)]
|
||||||
esp --Send rotational data\nto Pepper Web Server--> webServer
|
esp --Send rotational data\nto Pepper Web Server--> webServer
|
||||||
gyro <--> esp
|
gyro <---> esp
|
||||||
end
|
end
|
||||||
|
|
||||||
```
|
```
|
Reference in New Issue
Block a user