Merge remote-tracking branch 'origin/main'

This commit is contained in:
Luca Warmenhoven
2024-05-30 15:38:16 +02:00
11 changed files with 321 additions and 9 deletions

View File

@@ -1,3 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
"java.configuration.updateBuildConfiguration": "disabled"
}

View File

@@ -1,4 +1,3 @@
/**
*
* @param {Request} request The incoming request
@@ -14,7 +13,7 @@ function handleIncoming(request, response, app, pool)
if (!request.hasOwnProperty('uid') || typeof request.uid !== 'number')
{
query = 'SELECT * FROM Exercise';
query = 'SELECT * FROM Exercise ORDER BY RAND() LIMIT 1';
} else parameters.push(request.uid);
// Acquire database connection
@@ -33,11 +32,15 @@ function handleIncoming(request, response, app, pool)
// Send back the data in the right format
let converted = rows.map(row => {
return {
exerciseId: row.ExerciseID,
name: row.Name,
description: row.Description,
muscleGroup: row.MuscleGroup,
shortDescription: row.ShortDescription,
description: row.Description,
imageUrl: row.ImageURL,
videoUrl: row.VideoURL
videoUrl: row.VideoURL,
path: row.Path,
duration: row.Duration
};
});

View File

@@ -33,7 +33,7 @@
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/red_button_gradient.xml" value="0.346" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_bicepvideo.xml" value="0.22826086956521738" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_end_screen.xml" value="0.4" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_fitness.xml" value="0.6" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_fitness.xml" value="0.4" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_help.xml" value="0.4" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_main.xml" value="0.4" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_main_screen.xml" value="0.1" />

View File

@@ -45,7 +45,7 @@ tools:openDrawer="start">
android:layout_width="150dp"
android:layout_height="75dp"
android:layout_marginStart="404dp"
android:layout_marginBottom="30dp"
android:layout_marginBottom="0dp"
android:background="@drawable/red_button_gradient"
android:drawableTop="@drawable/ic_baseline_home_48"
android:drawableTint="@color/white"

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><Animation xmlns:editor="http://www.aldebaran.com/animation/editor" typeVersion="2.0"/>

View File

@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<Animation xmlns:editor="http://www.ald.softbankrobotics.com/animation/editor" typeVersion="2.0" editor:fps="25">
<ActuatorCurve fps="25" actuator="LShoulderPitch" mute="false" unit="degree">
<Key value="11.4200077" frame="20">
<Tangent side="right" abscissaParam="8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="58.7350922" frame="45">
<Tangent side="left" abscissaParam="-8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="LShoulderRoll" mute="false" unit="degree">
<Key value="6.67969275" frame="20">
<Tangent side="right" abscissaParam="8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="6.67969275" frame="45">
<Tangent side="left" abscissaParam="-8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="LElbowYaw" mute="false" unit="degree">
<Key value="-88.3528824" frame="20">
<Tangent side="right" abscissaParam="8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="-88.3528824" frame="45">
<Tangent side="left" abscissaParam="-8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="LElbowRoll" mute="false" unit="degree">
<Key value="-5.89348125" frame="20">
<Tangent side="right" abscissaParam="8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="-89.5" frame="45">
<Tangent side="left" abscissaParam="-8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="LWristYaw" mute="false" unit="degree">
<Key value="-1.76023543" frame="20">
<Tangent side="right" abscissaParam="8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="-1.76023543" frame="45">
<Tangent side="left" abscissaParam="-8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="LHand" mute="false" unit="dimensionless">
<Key value="0.589630966" frame="20">
<Tangent side="right" abscissaParam="8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="0.589630966" frame="45">
<Tangent side="left" abscissaParam="-8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="RShoulderPitch" mute="false" unit="degree">
<Key value="15.1628304" frame="20">
<Tangent side="right" abscissaParam="8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="62.0810318" frame="45">
<Tangent side="left" abscissaParam="-8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="RShoulderRoll" mute="false" unit="degree">
<Key value="-6.59180212" frame="20">
<Tangent side="right" abscissaParam="8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="-6.59180212" frame="45">
<Tangent side="left" abscissaParam="-8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="RElbowYaw" mute="false" unit="degree">
<Key value="96.1428452" frame="20">
<Tangent side="right" abscissaParam="8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="96.1428452" frame="45">
<Tangent side="left" abscissaParam="-8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="RElbowRoll" mute="false" unit="degree">
<Key value="0.5" frame="20">
<Tangent side="right" abscissaParam="8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="89.5" frame="45">
<Tangent side="left" abscissaParam="-8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="RWristYaw" mute="false" unit="degree">
<Key value="1.57964516" frame="20">
<Tangent side="right" abscissaParam="8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="1.57964516" frame="45">
<Tangent side="left" abscissaParam="-8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="RHand" mute="false" unit="dimensionless">
<Key value="0.588752136" frame="20">
<Tangent side="right" abscissaParam="8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="0.588752136" frame="45">
<Tangent side="left" abscissaParam="-8.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
</Animation>

View File

@@ -0,0 +1,147 @@
<?xml version="1.0" encoding="UTF-8"?>
<Animation xmlns:editor="http://www.ald.softbankrobotics.com/animation/editor" typeVersion="2.0" editor:fps="25">
<ActuatorCurve fps="25" actuator="LShoulderPitch" mute="false" unit="degree">
<Key value="69.5353165" frame="0">
<Tangent side="right" abscissaParam="9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="-74.2801361" frame="29">
<Tangent side="left" abscissaParam="-9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
<Tangent side="right" abscissaParam="11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="69.5353165" frame="63">
<Tangent side="left" abscissaParam="-11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="LShoulderRoll" mute="false" unit="degree">
<Key value="6.67969275" frame="0">
<Tangent side="right" abscissaParam="9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="6.67969275" frame="29">
<Tangent side="left" abscissaParam="-9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
<Tangent side="right" abscissaParam="11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="6.67969275" frame="63">
<Tangent side="left" abscissaParam="-11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="LElbowYaw" mute="false" unit="degree">
<Key value="-69.7851486" frame="0">
<Tangent side="right" abscissaParam="9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="-69.7851486" frame="29">
<Tangent side="left" abscissaParam="-9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
<Tangent side="right" abscissaParam="11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="-69.7851486" frame="63">
<Tangent side="left" abscissaParam="-11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="LElbowRoll" mute="false" unit="degree">
<Key value="-89.5" frame="0">
<Tangent side="right" abscissaParam="9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="-0.5" frame="29">
<Tangent side="left" abscissaParam="-9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
<Tangent side="right" abscissaParam="11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="-89.5" frame="63">
<Tangent side="left" abscissaParam="-11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="LWristYaw" mute="false" unit="degree">
<Key value="-1.76023543" frame="0">
<Tangent side="right" abscissaParam="9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="-1.76023543" frame="29">
<Tangent side="left" abscissaParam="-9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
<Tangent side="right" abscissaParam="11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="-1.76023543" frame="63">
<Tangent side="left" abscissaParam="-11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="LHand" mute="false" unit="dimensionless">
<Key value="0.589630966" frame="0">
<Tangent side="right" abscissaParam="9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="0.589630966" frame="29">
<Tangent side="left" abscissaParam="-9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
<Tangent side="right" abscissaParam="11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="0.589630966" frame="63">
<Tangent side="left" abscissaParam="-11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="RShoulderPitch" mute="false" unit="degree">
<Key value="68.6139908" frame="0">
<Tangent side="right" abscissaParam="9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="-72.7772903" frame="29">
<Tangent side="left" abscissaParam="-9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
<Tangent side="right" abscissaParam="11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="68.6139908" frame="63">
<Tangent side="left" abscissaParam="-11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="RShoulderRoll" mute="false" unit="degree">
<Key value="-6.59180212" frame="0">
<Tangent side="right" abscissaParam="9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="-6.59180212" frame="29">
<Tangent side="left" abscissaParam="-9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
<Tangent side="right" abscissaParam="11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="-6.59180212" frame="63">
<Tangent side="left" abscissaParam="-11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="RElbowYaw" mute="false" unit="degree">
<Key value="96.1428452" frame="0">
<Tangent side="right" abscissaParam="9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="96.1428452" frame="29">
<Tangent side="left" abscissaParam="-9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
<Tangent side="right" abscissaParam="11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="96.1428452" frame="63">
<Tangent side="left" abscissaParam="-11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="RElbowRoll" mute="false" unit="degree">
<Key value="89.5" frame="0">
<Tangent side="right" abscissaParam="9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="0.5" frame="29">
<Tangent side="left" abscissaParam="-9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
<Tangent side="right" abscissaParam="11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="89.5" frame="63">
<Tangent side="left" abscissaParam="-11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="RWristYaw" mute="false" unit="degree">
<Key value="1.57964516" frame="0">
<Tangent side="right" abscissaParam="9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="1.57964516" frame="29">
<Tangent side="left" abscissaParam="-9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
<Tangent side="right" abscissaParam="11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="1.57964516" frame="63">
<Tangent side="left" abscissaParam="-11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
<ActuatorCurve fps="25" actuator="RHand" mute="false" unit="dimensionless">
<Key value="0.588752136" frame="0">
<Tangent side="right" abscissaParam="9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="0.588752136" frame="29">
<Tangent side="left" abscissaParam="-9.66666667" ordinateParam="0" editor:interpType="bezier_auto"/>
<Tangent side="right" abscissaParam="11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
<Key value="0.588752136" frame="63">
<Tangent side="left" abscissaParam="-11.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
</Key>
</ActuatorCurve>
</Animation>

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

View File

@@ -0,0 +1,62 @@
# Infrastructure UML
``` mermaid
classDiagram
Raspberry pi --> NodeJS
Raspberry pi --> Database
NodeJS --> Androidapp : getExerciseData (Wifi, Rest API)
Database <--> NodeJS : Database queries
ESP8266 --> Androidapp : getRotationalData (Wifi)
namespace Server {
class Raspberry pi {
+MariaDB
+Apache2
+NodeJS
Database()
Webserver()
}
class Database {
+ExerciseID
+ExerciseName
+ExerciseDescription
+ExerciseVideo
+GyroCoordinates
+MuscleGroup
}
class NodeJS {
+MariaDB
GetRandomExercise()
}
}
namespace Pepper {
class Androidapp {
+Java
+Android SDK
+QiSDK
motionProcessing()
robotMovement()
showVideo()
fitnessCycle()
}
}
namespace Hardware {
class ESP8266{
+RotationalX
+RotationalY
+RotationalZ
Gyroscope()
}
}
```

View File

@@ -1,4 +1,4 @@
# Issues with hardware
## Issues with libraries
The websocket library doesnt work well on the esp8266 d1 mini. It lags out the entire esp and makes it unresponsive.
## Issues with programming
The websocket library doesnt work well on the esp8266 d1 mini. It lags out the entire esp and makes it unresponsive. The solution is to use a different way of communicating.