Merge remote-tracking branch 'origin/main'

# Conflicts:
#	code/src/Fitbot/app/src/main/AndroidManifest.xml
#	code/src/Fitbot/app/src/main/java/com/example/fitbot/ui/activities/MainActivity.java
This commit is contained in:
Luca Warmenhoven
2024-05-15 16:44:07 +02:00
9 changed files with 58 additions and 40 deletions

31
.idea/workspace.xml generated
View File

@@ -14,10 +14,9 @@
</configurations> </configurations>
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="00599d5b-7eb5-44da-ad7f-98bf42384c16" name="Changes" comment="Renamed files, added motion-tracking-system-analysis.md"> <list default="true" id="00599d5b-7eb5-44da-ad7f-98bf42384c16" name="Changes" comment="Updated onderzoek-voorbeeld.md &amp; motion-tracking-system-analysis.md">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/documentation/research-questions/motion-tracking-system-analysis.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/documentation/research-questions/motion-tracking-system-analysis.md" afterDir="false" /> <change beforePath="$PROJECT_DIR$/docs/documentation/research-questions/motion-tracking-system-analysis.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/documentation/research-questions/motion-tracking-system-analysis.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/personal-documentation/Luca/literatuuronderzoek/onderzoek-voorbeeld.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/personal-documentation/Luca/literatuuronderzoek/onderzoek-voorbeeld.md" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -144,7 +143,7 @@
<component name="SharedIndexes"> <component name="SharedIndexes">
<attachedChunks> <attachedChunks>
<set> <set>
<option value="bundled-js-predefined-1d06a55b98c1-2e7d6887c066-JavaScript-WS-241.15989.47" /> <option value="bundled-js-predefined-1d06a55b98c1-91d5c284f522-JavaScript-WS-241.15989.105" />
</set> </set>
</attachedChunks> </attachedChunks>
</component> </component>
@@ -164,7 +163,9 @@
<workItem from="1715686350378" duration="91000" /> <workItem from="1715686350378" duration="91000" />
<workItem from="1715687332786" duration="822000" /> <workItem from="1715687332786" duration="822000" />
<workItem from="1715724270673" duration="5481000" /> <workItem from="1715724270673" duration="5481000" />
<workItem from="1715765990621" duration="4442000" /> <workItem from="1715765990621" duration="8538000" />
<workItem from="1715777647522" duration="725000" />
<workItem from="1715779408605" duration="3840000" />
</task> </task>
<task id="LOCAL-00001" summary="Changes"> <task id="LOCAL-00001" summary="Changes">
<created>1713528225837</created> <created>1713528225837</created>
@@ -242,7 +243,23 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1715767477412</updated> <updated>1715767477412</updated>
</task> </task>
<option name="localTasksCounter" value="11" /> <task id="LOCAL-00011" summary="Updated onderzoek-voorbeeld.md and motion-tracking-system-analysis.md">
<option name="closed" value="true" />
<created>1715773120402</created>
<option name="number" value="00011" />
<option name="presentableId" value="LOCAL-00011" />
<option name="project" value="LOCAL" />
<updated>1715773120402</updated>
</task>
<task id="LOCAL-00012" summary="Updated onderzoek-voorbeeld.md &amp; motion-tracking-system-analysis.md">
<option name="closed" value="true" />
<created>1715780873394</created>
<option name="number" value="00012" />
<option name="presentableId" value="LOCAL-00012" />
<option name="project" value="LOCAL" />
<updated>1715780873394</updated>
</task>
<option name="localTasksCounter" value="13" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
@@ -271,6 +288,8 @@
<MESSAGE value="onderzoek-voorbeeld.md" /> <MESSAGE value="onderzoek-voorbeeld.md" />
<MESSAGE value="Updated onderzoek-voorbeeld.md" /> <MESSAGE value="Updated onderzoek-voorbeeld.md" />
<MESSAGE value="Renamed files, added motion-tracking-system-analysis.md" /> <MESSAGE value="Renamed files, added motion-tracking-system-analysis.md" />
<option name="LAST_COMMIT_MESSAGE" value="Renamed files, added motion-tracking-system-analysis.md" /> <MESSAGE value="Updated onderzoek-voorbeeld.md and motion-tracking-system-analysis.md" />
<MESSAGE value="Updated onderzoek-voorbeeld.md &amp; motion-tracking-system-analysis.md" />
<option name="LAST_COMMIT_MESSAGE" value="Updated onderzoek-voorbeeld.md &amp; motion-tracking-system-analysis.md" />
</component> </component>
</project> </project>

3
.vscode/settings.json vendored Normal file
View File

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

View File

@@ -4,6 +4,10 @@
<uses-feature android:name="com.softbank.hardware.pepper" /> <uses-feature android:name="com.softbank.hardware.pepper" />
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<application <application
android:allowBackup="true" android:allowBackup="true"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
@@ -12,19 +16,7 @@
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/Theme.Fitbot" > android:theme="@style/Theme.Fitbot" >
<activity <activity
android:name=".Completion_Screen" android:name=".ui.activities.MainActivity"
android:exported="false" />
<activity
android:name=".BicepVideo"
android:exported="false" />
<activity
android:name=".PowerScreen"
android:exported="false" />
<activity
android:name=".MainActivity"
android:exported="true" />
<activity
android:name=".MainScreen"
android:exported="true" > android:exported="true" >
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />

View File

@@ -1,4 +1,4 @@
package com.example.fitbot; package com.example.fitbot.ui.activities;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.os.Bundle; import android.os.Bundle;
@@ -9,7 +9,7 @@ import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar;
public class MainScreen extends AppCompatActivity { public class MainActivity extends AppCompatActivity {
//Variables //Variables
DrawerLayout drawerLayout; DrawerLayout drawerLayout;

View File

@@ -0,0 +1,14 @@
package com.example.fitbot.util.processing;
public interface IMotionDataConsumer {
/**
* Function for accepting motion data and the transformed vector.
* @param transformedVector The transformed vector.
* @param motionData The input motion data.
* @param sampleIndex The index of the current sample
* @param sampleRate The sample rate.
*/
void accept(Vector3f transformedVector, MotionData motionData, int sampleIndex, double sampleRate);
}

View File

@@ -22,7 +22,7 @@ public class MotionProcessor {
private Vector3f ZERO = new Vector3f(0, 0, 0); private Vector3f ZERO = new Vector3f(0, 0, 0);
private float sampleRate = 1.0F; // samples/second private float sampleRate = 1.0F; // samples/second
private DataConsumer motionDataConsumer = (p1, p2, p3, p4) -> {}; private IMotionDataConsumer motionDataConsumer = (p1, p2, p3, p4) -> {};
private GesturePath path; private GesturePath path;
private WebSocket socket; private WebSocket socket;
@@ -245,19 +245,5 @@ public class MotionProcessor {
Log.i("MotionProcessor", "Path length: " + relativePath.size()); Log.i("MotionProcessor", "Path length: " + relativePath.size());
Log.i("MotionProcessor", "Sample rate: " + sampleRate); Log.i("MotionProcessor", "Sample rate: " + sampleRate);
Log.i("MotionProcessor", "Calibration point: " + ZERO.toString()); Log.i("MotionProcessor", "Calibration point: " + ZERO.toString());
/**
* Interface that accepts motion data and the transformed vector.
*/
public interface DataConsumer {
/**
* Function for accepting motion data and the transformed vector.
* @param transformedVector The transformed vector.
* @param motionData The input motion data.
* @param sampleIndex The index of the current sample
* @param sampleRate The sample rate.
*/
void accept(Vector3f transformedVector, MotionData motionData, int sampleIndex, double sampleRate);
} }
} }

View File

@@ -47,4 +47,4 @@ perpendicular to the normal vector of the earth. This is because the acceleratio
is relative to its own axes, and not to the earth's normal vector. is relative to its own axes, and not to the earth's normal vector.
To convert this, we'll have to multiply the acceleration vector `A(x, y, z)` by the rotation matrix To convert this, we'll have to multiply the acceleration vector `A(x, y, z)` by the rotation matrix
with negative angles, to rotate it back to be perpendicular with the normal of the earth. with negative angles, to rotate it back to be perpendicular with the normal of the earth.
After After this transformation

View File

@@ -56,6 +56,7 @@ The software of the system will consist of the following:
The Wii Fit Board will be connected to Pepper using the Wiiboard-simple library. The library will be used to read the sensor data from the Wii Fit Board and transfer it to Pepper. The position tracking algorithm will process the sensor data and determine the user's position. The Wii Fit Board will be connected to Pepper using the Wiiboard-simple library. The library will be used to read the sensor data from the Wii Fit Board and transfer it to Pepper. The position tracking algorithm will process the sensor data and determine the user's position.
Challenge: Challenge:
- Connecting to the wii fit board. It is not possible to connect directly to the Wii Fit Board, it is necessary to use a library that can interpret the data sent by the Wii Fit Board.
- The Wii Fit Balance Board sends data in a specific format. To interpret this data, it's necessary to understand the format and how to convert it to a usable format. - The Wii Fit Balance Board sends data in a specific format. To interpret this data, it's necessary to understand the format and how to convert it to a usable format.
- The Wii Fit Balance Board uses Bluetooth 2.0 to communicate. Pepper uses Bluetooth 4.0 this means that there might be compatibility issues/latancy issues. - The Wii Fit Balance Board uses Bluetooth 2.0 to communicate. Pepper uses Bluetooth 4.0 this means that there might be compatibility issues/latancy issues.
@@ -79,6 +80,9 @@ To be added
## References ## References
[Wiiboard lib](https://code.google.com/archive/p/wiiboard-simple/wikis/Documentation.wiki) [Wiiboard lib](https://code.google.com/archive/p/wiiboard-simple/wikis/Documentation.wiki)
https://advanti-lab.sb.dfki.de/?page_id=64
https://github.com/paulburton/fitscales
https://github.com/micromu/WiiRemoteJ
## Appendices ## Appendices

View File

@@ -80,6 +80,6 @@ Wat moet er beter? Wat ging er goed? Welke SMART leerdoelen hebben jullie voor d
We zijn samen gaan zitten voor de retrospective, hier uit is het volgende voort gekomen (we hebben gebruik gemaakt van the 4 L's): We zijn samen gaan zitten voor de retrospective, hier uit is het volgende voort gekomen (we hebben gebruik gemaakt van the 4 L's):
![alt text](Sprint1Retro.png) ![Retro](Sprint1Retro.png)
De leerdoelen zet iedereen in zijn eigen scorion formulier. De leerdoelen zet iedereen in zijn eigen scorion formulier.