Merge remote-tracking branch 'origin/main'
# Conflicts: # docs/documentation/diagrams/infrastructure.md
This commit is contained in:
@@ -21,9 +21,10 @@ void Connectivity::connectWiFi(char* ssid, char* pass){
|
||||
// }
|
||||
|
||||
const char* getServerURL = "http://145.92.8.132:443/get-ip";
|
||||
String ipAddress = "";
|
||||
String ipAddress = ""; // string that will hold the server's IP address
|
||||
|
||||
String Connectivity::fetchIPAddress() {
|
||||
const char* Connectivity::fetchIPAddress() {
|
||||
char* ipAddress = NULL; // Declare ipAddress as a char*
|
||||
if (WiFi.status() == WL_CONNECTED) {
|
||||
HTTPClient http;
|
||||
WiFiClient client;
|
||||
@@ -32,7 +33,12 @@ String Connectivity::fetchIPAddress() {
|
||||
int httpCode = http.GET();
|
||||
if (httpCode > 0) {
|
||||
if (httpCode == HTTP_CODE_OK) {
|
||||
ipAddress = http.getString();
|
||||
// If successful (code 200), read the response body and parse the IP address
|
||||
String response = http.getString();
|
||||
StaticJsonDocument<200> doc;
|
||||
deserializeJson(doc, response);
|
||||
const char* ip = doc["ip"]; // Extract the IP address
|
||||
ipAddress = strdup(ip);
|
||||
}
|
||||
} else {
|
||||
Serial.printf("GET request failed, error: %s\n", http.errorToString(httpCode).c_str());
|
||||
|
@@ -11,6 +11,8 @@
|
||||
#include <ESP8266WiFiSTA.h>
|
||||
#include <WiFiClient.h>
|
||||
#include <WiFiClientSecure.h>
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
|
||||
|
||||
class Connectivity {
|
||||
@@ -19,7 +21,7 @@ public:
|
||||
void websocketSetup(char* ip, uint16_t port, char* adress);
|
||||
void sendData(float roll, float pitch, float yaw);
|
||||
int httpPost(const char *serverAddress, const char *serverSubPath, const unsigned short serverPort, const char *data, const size_t dataLength, const char *contentType);
|
||||
String fetchIPAddress();
|
||||
const char* fetchIPAddress();
|
||||
|
||||
private:
|
||||
ESP8266WiFiMulti wifi;
|
||||
|
@@ -4,13 +4,12 @@ void setup() {
|
||||
//connect to internet and start sensor
|
||||
connectivity.connectWiFi(ssid, pass);
|
||||
sensorManager.sensorSetup();
|
||||
Serial.begin(9600);
|
||||
Serial.begin(115200);
|
||||
Serial.println("startup");
|
||||
}
|
||||
|
||||
unsigned long lastTime = 0; // will store the last time the code was run
|
||||
|
||||
void loop() {
|
||||
SensorManager::eulerAngles eulerRotation = sensorManager.getEulerAngles();
|
||||
SensorManager::RotationQuaternions Rotation = sensorManager.getQuaternions();
|
||||
// SensorManager::acceleration rotationAcceleration = sensorManager.getAcelleration();
|
||||
|
||||
struct acceleration {
|
||||
@@ -19,6 +18,12 @@ struct acceleration {
|
||||
float z = 9;
|
||||
} accelData;
|
||||
|
||||
if (!ipAquired) {
|
||||
serverIp = connectivity.fetchIPAddress(); // Assign the value here
|
||||
ipAquired = true;
|
||||
}
|
||||
|
||||
unsigned long lastTime = 0; // will store the last time the code was run
|
||||
unsigned long currentTime = millis();
|
||||
if (currentTime - lastTime >= 100) { // 100 ms has passed
|
||||
memset(buffer, 0, BUFFER_SIZE);
|
||||
@@ -26,15 +31,17 @@ struct acceleration {
|
||||
buffer,
|
||||
"{\"deviceId\": %d, \"rotationX\": %f, \"rotationY\": %f, \"rotationZ\": %f, \"accelerationX\": %f, \"accelerationY\": %f, \"accelerationZ\": %f, \"type\": %s}",
|
||||
DEVICE_ID,
|
||||
eulerRotation.roll,
|
||||
eulerRotation.pitch,
|
||||
eulerRotation.yaw,
|
||||
accelData.x,
|
||||
Rotation.i,
|
||||
Rotation.j,
|
||||
Rotation.k,
|
||||
Rotation.w,
|
||||
accelData.y,
|
||||
accelData.z,
|
||||
"data");
|
||||
// %d = int, %f = floatation, %s = string
|
||||
connectivity.httpPost(connectivity.fetchIPAddress(), "/", 3445, buffer, strlen(buffer), "application/json");
|
||||
connectivity.httpPost(serverIp, "/", 3445, buffer, strlen(buffer), "application/json");
|
||||
Serial.println(serverIp);
|
||||
Serial.println(buffer);
|
||||
lastTime = currentTime;
|
||||
}
|
||||
}
|
||||
|
@@ -17,14 +17,14 @@ void SensorManager::sensorSetup() {
|
||||
// myIMU.enableStepCounter(500); //Send data update every 500ms
|
||||
}
|
||||
//get sensordata
|
||||
SensorManager::RotationQuintillions SensorManager::getQuintillions() {
|
||||
SensorManager::RotationQuaternions SensorManager::getQuaternions() {
|
||||
if (myIMU.dataAvailable() == true) {
|
||||
float i = myIMU.getQuatI();
|
||||
float j = myIMU.getQuatJ();
|
||||
float k = myIMU.getQuatK();
|
||||
float w = myIMU.getQuatReal();
|
||||
|
||||
RotationQuintillions rotation = { i, j, k, w };
|
||||
RotationQuaternions rotation = { i, j, k, w };
|
||||
return rotation;
|
||||
} else {
|
||||
float i = myIMU.getQuatI();
|
||||
@@ -32,13 +32,13 @@ SensorManager::RotationQuintillions SensorManager::getQuintillions() {
|
||||
float k = myIMU.getQuatK();
|
||||
float w = myIMU.getQuatReal();
|
||||
|
||||
RotationQuintillions rotation = { i, j, k, w };
|
||||
RotationQuaternions rotation = { i, j, k, w };
|
||||
return rotation;
|
||||
}
|
||||
}
|
||||
//calculate Quintillions to Euler angles from -1π to +1π
|
||||
//calculate Quaternions to Euler angles from -1π to +1π
|
||||
SensorManager::eulerAngles SensorManager::getEulerAngles() {
|
||||
SensorManager::RotationQuintillions rotation = getQuintillions();
|
||||
SensorManager::RotationQuaternions rotation = getQuaternions();
|
||||
float roll = atan2(2.0f * (rotation.w * rotation.i + rotation.j * rotation.k), 1.0f - 2.0f * (rotation.i * rotation.i + rotation.j * rotation.j));
|
||||
float pitch = asin(2.0f * (rotation.w * rotation.j - rotation.k * rotation.i));
|
||||
float yaw = atan2(2.0f * (rotation.w * rotation.k + rotation.i * rotation.j), 1.0f - 2.0f * (rotation.j * rotation.j + rotation.k * rotation.k));
|
||||
|
@@ -22,14 +22,17 @@ public:
|
||||
eulerAngles getEulerAngles();
|
||||
acceleration getAcelleration();
|
||||
bool sensorTap();
|
||||
private:
|
||||
struct RotationQuintillions {
|
||||
|
||||
struct RotationQuaternions {
|
||||
float i;
|
||||
float j;
|
||||
float k;
|
||||
float w;
|
||||
};
|
||||
RotationQuintillions getQuintillions();
|
||||
RotationQuaternions getQuaternions();
|
||||
|
||||
private:
|
||||
|
||||
BNO080 myIMU;
|
||||
};
|
||||
|
||||
|
@@ -8,10 +8,12 @@ Connectivity connectivity;
|
||||
WebSocketsClient webSocket;
|
||||
#define USE_SERIAL Serial
|
||||
|
||||
#define ssid "1235678i"
|
||||
#define pass "12345678"
|
||||
#define ssid "msi 5556"
|
||||
#define pass "abc12345"
|
||||
#define BUFFER_SIZE 1024
|
||||
#define DEVICE_ID 1
|
||||
#define IP_ADDRESS "192.168.137.12"
|
||||
|
||||
char *buffer = (char *)malloc(sizeof(char) * BUFFER_SIZE);
|
||||
const char* serverIp = NULL; // Declare serverIp here
|
||||
bool ipAquired = false;
|
@@ -1,5 +1,5 @@
|
||||
|
||||
const databaseQuery = 'SELECT * FROM `Exercise` ORDER BY RAND() LIMIT 1';
|
||||
const databaseQuery = 'SELECT * FROM `Exercise` WHERE ExerciseID = 1';
|
||||
// const databaseQueryRand = 'SELECT * FROM `Exercise` ORDER BY RAND() LIMIT 1';
|
||||
|
||||
/**
|
||||
*
|
||||
|
1
code/src/Fitbot/.gitignore
vendored
1
code/src/Fitbot/.gitignore
vendored
@@ -15,3 +15,4 @@
|
||||
local.properties
|
||||
.idea
|
||||
.vscode
|
||||
/.idea/
|
||||
|
4
code/src/Fitbot/.idea/misc.xml
generated
4
code/src/Fitbot/.idea/misc.xml
generated
@@ -25,6 +25,7 @@
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/border_background_3.xml" value="0.2475" />
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/box_background.xml" value="0.2555" />
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/darkred_button_gradient.xml" value="0.346" />
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/fitbot_launcher_background.xml" value="0.2475" />
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/help2_background.xml" value="0.2395" />
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/help_background.xml" value="0.2395" />
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/ic_baseline_home_48.xml" value="0.25" />
|
||||
@@ -35,7 +36,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.1" />
|
||||
<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_info_dialog.xml" value="0.264" />
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_main.xml" value="0.4" />
|
||||
@@ -47,6 +48,7 @@
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/header.xml" value="0.264" />
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/toolbar.xml" value="0.264" />
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/menu/main_menu.xml" value="0.4" />
|
||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/mipmap-anydpi-v26/fitbot_launcher.xml" value="0.2475" />
|
||||
<entry key="app/src/main/res/layout/activity_end_screen.xml" value="0.1" />
|
||||
<entry key="app/src/main/res/layout/activity_fitness.xml" value="0.23550724637681159" />
|
||||
<entry key="app/src/main/res/layout/activity_main.xml" value="0.1" />
|
||||
|
@@ -7,7 +7,8 @@ public class Exercise {
|
||||
public final EMuscleGroup muscleGroup;
|
||||
public final GesturePath leftPath;
|
||||
public final GesturePath rightPath;
|
||||
public final String title;
|
||||
public final String name;
|
||||
public final String shortDescription;
|
||||
public final String description;
|
||||
public final String imageUrl;
|
||||
public final String videoUrl;
|
||||
@@ -19,14 +20,16 @@ public class Exercise {
|
||||
* @param muscleGroup The muscle group of the exercise.
|
||||
* @param leftPath The path of the left hand.
|
||||
* @param rightPath The path of the right hand.
|
||||
* @param title The title of the exercise.
|
||||
* @param description The description of the exercise.
|
||||
* @param name The title of the exercise.
|
||||
* @param shortDescription The short description of the exercise.
|
||||
* @param description The full description of the exercise.
|
||||
* @param imageUrl The URL of the image.
|
||||
* @param videoUrl The URL of the video.
|
||||
*/
|
||||
public Exercise(EMuscleGroup muscleGroup, String title, String description, String imageUrl, String videoUrl, GesturePath leftPath, GesturePath rightPath, float exerciseTimeInSeconds) {
|
||||
public Exercise(EMuscleGroup muscleGroup, String name,String shortDescription, String description, String imageUrl, String videoUrl, GesturePath leftPath, GesturePath rightPath, float exerciseTimeInSeconds) {
|
||||
this.name = name;
|
||||
this.muscleGroup = muscleGroup;
|
||||
this.title = title;
|
||||
this.shortDescription = shortDescription;
|
||||
this.description = description;
|
||||
this.leftPath = leftPath;
|
||||
this.rightPath = rightPath;
|
||||
|
@@ -13,7 +13,7 @@ import java.net.URLConnection;
|
||||
|
||||
public class ExerciseManager {
|
||||
|
||||
private static final String HOST_ADDRESS = "http://145.92.8.132:443/";
|
||||
private static final String HOST_ADDRESS = "http://145.92.8.132:443";
|
||||
|
||||
// The value of these property variables must be equivalent of
|
||||
// the JSON data that the database sends back.
|
||||
@@ -21,23 +21,22 @@ public class ExerciseManager {
|
||||
private static final String PROPERTY_EXERCISE_DURATION = "duration";
|
||||
private static final String PROPERTY_EXERCISE_ID = "exerciseId";
|
||||
private static final String PROPERTY_MUSCLE_GROUP = "muscleGroup";
|
||||
private static final String PROPERTY_SHORT_DESC = "shortDescription";
|
||||
private static final String PROPERTY_IMAGE_URL = "imageUrl";
|
||||
private static final String PROPERTY_VIDEO_URL = "videoUrl";
|
||||
private static final String PROPERTY_DESC = "description";
|
||||
private static final String PROPERTY_SHORT_DESC = "shortDescription";
|
||||
private static final String PROPERTY_PATH = "path";
|
||||
private static final String PROPERTY_NAME = "name";
|
||||
|
||||
// The delimiter used to separate the paths of the sensors.
|
||||
public static final String PATH_DELIMITER = ";";
|
||||
public static final String PATH_DELIMITER = ":";
|
||||
|
||||
public static final int SENSOR_COUNT = 2;
|
||||
|
||||
private static final String[] REQUIRED_PROPERTIES = {
|
||||
PROPERTY_MUSCLE_GROUP, PROPERTY_DESC, PROPERTY_IMAGE_URL,
|
||||
PROPERTY_MUSCLE_GROUP, PROPERTY_DESC,PROPERTY_SHORT_DESC, PROPERTY_IMAGE_URL,
|
||||
PROPERTY_VIDEO_URL, PROPERTY_NAME, PROPERTY_PATH,
|
||||
PROPERTY_EXERCISE_DURATION, PROPERTY_EXERCISE_ID,
|
||||
PROPERTY_SHORT_DESC
|
||||
PROPERTY_EXERCISE_DURATION, PROPERTY_EXERCISE_ID
|
||||
};
|
||||
|
||||
public static final int DEFAULT_EXERCISE_REPETITIONS = 10;
|
||||
@@ -85,16 +84,18 @@ public class ExerciseManager {
|
||||
*/
|
||||
public static Exercise fetchExerciseFromDatabase() {
|
||||
String response = sendHTTP(
|
||||
HOST_ADDRESS, "POST", "application/json",
|
||||
HOST_ADDRESS, "POST", "application/json", "{}"
|
||||
);
|
||||
// Validate the response
|
||||
if (response != null) {
|
||||
try {
|
||||
System.out.println(response);
|
||||
JsonObject content = JsonParser.parseString(response).getAsJsonObject();
|
||||
|
||||
// Ensure all required properties are present
|
||||
for (String property : REQUIRED_PROPERTIES) {
|
||||
if (!content.has(property)) {
|
||||
System.out.println("Missing property: " + property);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -102,14 +103,18 @@ public class ExerciseManager {
|
||||
// Path data is split into two parts, due to the left and right hand.
|
||||
// If one wants to add support for more sensors, one will have to adjust the Exercise
|
||||
// class to support more paths.
|
||||
System.out.println(content.get(PROPERTY_PATH).getAsString());
|
||||
String[] leftRightData = content.get(PROPERTY_PATH).getAsString().split(PATH_DELIMITER);
|
||||
|
||||
if (leftRightData.length != SENSOR_COUNT)
|
||||
if (leftRightData.length != SENSOR_COUNT) {
|
||||
System.out.println("Invalid path data.");
|
||||
return null;
|
||||
}
|
||||
|
||||
return new Exercise(
|
||||
EMuscleGroup.parse(content.get(PROPERTY_MUSCLE_GROUP).getAsString()),
|
||||
content.get(PROPERTY_NAME).getAsString(),
|
||||
content.get(PROPERTY_SHORT_DESC).getAsString(),
|
||||
content.get(PROPERTY_DESC).getAsString(),
|
||||
content.get(PROPERTY_IMAGE_URL).getAsString(),
|
||||
content.get(PROPERTY_VIDEO_URL).getAsString(),
|
||||
|
@@ -3,9 +3,11 @@ package com.example.fitbot.ui.activities;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.media.MediaPlayer;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.widget.TextView;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Button;
|
||||
@@ -29,10 +31,19 @@ import org.joml.Vector3f;
|
||||
public class FitnessActivity extends RobotActivity implements RobotLifecycleCallbacks {
|
||||
|
||||
// Private fields for the FitnessActivity class.
|
||||
private ExerciseStatusElement personalMotionPreviewElement;
|
||||
private ExerciseStatusElement exerciseStatusElement;
|
||||
private InputProcessor motionProcessor;
|
||||
private Exercise currentExercise;
|
||||
|
||||
// Exercise status element data
|
||||
private TextView exerciseMuscleGroupTextView;
|
||||
private TextView exerciseNameTextView;
|
||||
private TextView exerciseShortDescriptionTextView;
|
||||
//private TextView exerciseDescriptionTextView;
|
||||
private static String exerciseVideoUrl;
|
||||
|
||||
private final Object lock = new Object();
|
||||
|
||||
// Some nice little messages for the user
|
||||
private static final String[] EXERCISE_NOT_FOUND_MESSAGES = new String[]{
|
||||
"Ik heb momenteel helaas wat moeite met het ophalen van oefeningen, sorry.",
|
||||
@@ -45,26 +56,29 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
|
||||
|
||||
private static final float SENSOR_SAMPLE_RATE = 10.0f;
|
||||
private static final int EXERCISE_COUNT = 5;
|
||||
private static int EXERCISE_REP = 10;
|
||||
private static final float EXERCISE_SPEED_MULTIPLIER = 1.0f;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
QiSDK.register(this, this);
|
||||
|
||||
setContentView(R.layout.activity_fitness);
|
||||
|
||||
// Remove the ugly ass bar on top of the view
|
||||
setSpeechBarDisplayStrategy(SpeechBarDisplayStrategy.IMMERSIVE);
|
||||
// Fill empty objects with exercise data
|
||||
this.exerciseNameTextView = findViewById(R.id.textViewFitnessTitle);
|
||||
this.exerciseShortDescriptionTextView = findViewById(R.id.textViewFitnessShortDescription);
|
||||
//this.exerciseDescriptionTextView = findViewById(R.id.textViewDialogDescription);
|
||||
|
||||
// Find the VideoView by its ID
|
||||
VideoView videoView = findViewById(R.id.videoView);
|
||||
playVideo(videoView, this);
|
||||
// Navigation Buttons
|
||||
NavigationManager.setupButtonNavigation(this, R.id.homeButtonFitness, MainActivity.class);
|
||||
NavigationManager.setupButtonNavigation(this, R.id.skipButtonFitness, MainActivity.class); //Needs to skip exercises once those are implemented
|
||||
|
||||
// Hide system UI
|
||||
NavigationManager.hideSystemUI(this);
|
||||
setSpeechBarDisplayStrategy(SpeechBarDisplayStrategy.IMMERSIVE);
|
||||
|
||||
// Initiate info button
|
||||
Button infoButtonFitness = findViewById(R.id.infoButtonFitness);
|
||||
infoButtonFitness.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -80,22 +94,24 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
|
||||
// Provide the context so that all queued actions can be performed.
|
||||
Pepper.provideContext(qiContext, this.getClass());
|
||||
|
||||
personalMotionPreviewElement = findViewById(R.id.personalMotionPreviewElement);
|
||||
exerciseStatusElement = findViewById(R.id.personalMotionPreviewElement);
|
||||
|
||||
// Initialize the element whenever it has been added to the screen.
|
||||
// This will provide the element with the appropriate dimensions for drawing
|
||||
// the canvas properly.
|
||||
personalMotionPreviewElement.post(() -> {
|
||||
exerciseStatusElement.post(() -> {
|
||||
this.fetchExerciseAsync((exercise) -> {
|
||||
// Acquire paths from the exercise and provide them to the motion processor
|
||||
Vector3f[][] vectors = new Vector3f[][]{exercise.leftPath.getVectors(), exercise.rightPath.getVectors()};
|
||||
|
||||
motionProcessor = new InputProcessor(vectors, exercise.exerciseTimeInSeconds, SENSOR_SAMPLE_RATE);
|
||||
|
||||
personalMotionPreviewElement.initialize(exercise, motionProcessor, EXERCISE_COUNT);
|
||||
|
||||
exerciseStatusElement.initialize(exercise, motionProcessor, EXERCISE_COUNT);
|
||||
motionProcessor.useExercise(exercise);
|
||||
/* TODO: Remove if not needed */motionProcessor.setRecording(true, 10);
|
||||
motionProcessor.setInputHandler(exerciseStatusElement);
|
||||
motionProcessor.startListening();
|
||||
motionProcessor.setInputHandler(personalMotionPreviewElement);
|
||||
|
||||
}, (n) -> {
|
||||
int randomMessageIndex = (int) Math.floor(Math.random() * EXERCISE_NOT_FOUND_MESSAGES.length);
|
||||
Pepper.say(EXERCISE_NOT_FOUND_MESSAGES[randomMessageIndex]);
|
||||
@@ -103,8 +119,6 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
|
||||
NavigationManager.navigateToActivity(this, EndScreenActivity.class);
|
||||
});
|
||||
});
|
||||
|
||||
// FitnessCycle.playVideo(qiContext, videoView, this);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -121,6 +135,27 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
|
||||
onFailedFetch.handle(null);
|
||||
} else {
|
||||
onSuccessfulFetch.handle(exercise);
|
||||
this.runOnUiThread(() -> {
|
||||
exerciseNameTextView.setText(exercise.name);
|
||||
exerciseShortDescriptionTextView.setText(exercise.shortDescription);
|
||||
// exerciseDescriptionTextView.setText(exercise.description);
|
||||
exerciseVideoUrl = exercise.videoUrl;
|
||||
|
||||
// Play the video
|
||||
VideoView videoView = findViewById(R.id.videoView);
|
||||
playVideo(videoView, this);
|
||||
|
||||
// Set a listener to repeat the video
|
||||
while (EXERCISE_REP > 1) {
|
||||
videoView.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
|
||||
@Override
|
||||
public void onCompletion(MediaPlayer mp) {
|
||||
videoView.start(); // start the video again
|
||||
}
|
||||
});
|
||||
EXERCISE_REP--;
|
||||
}
|
||||
});
|
||||
}
|
||||
})).start();
|
||||
}
|
||||
@@ -134,14 +169,7 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
|
||||
public static void playVideo(VideoView videoView, Context context) {
|
||||
// Set up the video player
|
||||
if (videoView != null) {
|
||||
Uri videoUri = Uri.parse("android.resource://" + context.getPackageName() + "/" + R.raw.bicepvideo);
|
||||
videoView.setVideoURI(videoUri);
|
||||
|
||||
videoView.setOnCompletionListener(mp -> {
|
||||
// Repeat the video when it finishes playing
|
||||
videoView.start();
|
||||
});
|
||||
|
||||
videoView.setVideoPath(exerciseVideoUrl);
|
||||
videoView.start();
|
||||
} else {
|
||||
Log.e("FitnessActivity", "VideoView is null. Check your layout XML.");
|
||||
@@ -154,7 +182,7 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
|
||||
Pepper.provideContext(null, this.getClass()); // Remove the context (unavailable)
|
||||
|
||||
// Go to the main screen
|
||||
NavigationManager.navigateToActivity(this, MainActivity.class);
|
||||
// NavigationManager.navigateToActivity(this, MainActivity.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -177,12 +205,15 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
|
||||
final Dialog dialog = new Dialog(this);
|
||||
dialog.setContentView(R.layout.dialog_info);
|
||||
|
||||
// Hide the system UI
|
||||
NavigationManager.hideSystemUI(this);
|
||||
|
||||
// Set the dialog options
|
||||
dialog.getWindow().setDimAmount(0.5f);
|
||||
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
|
||||
dialog.setCancelable(true);
|
||||
|
||||
// Close button for dialog
|
||||
Button closeButton = dialog.findViewById(R.id.closeButtonDialog);
|
||||
closeButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@@ -18,12 +18,7 @@ import com.example.fitbot.util.NavigationManager;
|
||||
import com.example.fitbot.util.processing.IInputHandler;
|
||||
import com.example.fitbot.util.processing.InputProcessor;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.joml.Vector2f;
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.Vector4f;
|
||||
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
public class ExerciseStatusElement extends View implements IInputHandler {
|
||||
|
||||
@@ -38,16 +33,6 @@ public class ExerciseStatusElement extends View implements IInputHandler {
|
||||
private final Paint borderPaint = new Paint();
|
||||
private final Paint backgroundPaint = new Paint();
|
||||
|
||||
// TODO: Remove
|
||||
private final Matrix4f viewMatrix = new Matrix4f(); // The view matrix for the 3D to 2D transformation.
|
||||
private final Matrix4f projectionMatrix = new Matrix4f(); // The projection matrix for the 3D to 2D transformation.
|
||||
private final Vector4f objectPosition = new Vector4f(0, 0, 0, 1); // The location of the object in 3D space.
|
||||
private final ConcurrentLinkedQueue<Vector2f> vectors = new ConcurrentLinkedQueue<>();
|
||||
|
||||
// TODO: Remove
|
||||
private Vector2f[] axisVectors = new Vector2f[0];
|
||||
|
||||
|
||||
private static final String[] STARTING_PHRASES = {
|
||||
"Veel success met de oefening!",
|
||||
"Je kan het!",
|
||||
@@ -93,60 +78,10 @@ public class ExerciseStatusElement extends View implements IInputHandler {
|
||||
this.exercise = exercise;
|
||||
this.exerciseCount = exerciseCount;
|
||||
|
||||
/* TODO: Remove */
|
||||
this.axisVectors = new Vector2f[]{
|
||||
projectVertex(new Vector3f(-5.0f, 0, 0), getWidth(), getHeight()),
|
||||
projectVertex(new Vector3f(5.0f, 0, 0), getWidth(), getHeight()),
|
||||
projectVertex(new Vector3f(0, -5.0f, 0), getWidth(), getHeight()),
|
||||
projectVertex(new Vector3f(0, 5.0f, 0), getWidth(), getHeight()),
|
||||
projectVertex(new Vector3f(0, 0, -5.0f), getWidth(), getHeight()),
|
||||
projectVertex(new Vector3f(0, 0, 5.0f), getWidth(), getHeight())
|
||||
};
|
||||
|
||||
Pepper.say(STARTING_PHRASES[(int) Math.floor(Math.random() * STARTING_PHRASES.length)]);
|
||||
|
||||
// Handler that is called every time the motion processor receives new data.
|
||||
this.motionProcessor.setInputHandler((rotationVector, deviceId) -> {
|
||||
|
||||
Log.i("MotionProcessor", "Rotation vector received: " + rotationVector);
|
||||
Log.i("MotionProcessor", "Last error offset:" + this.motionProcessor.getError(deviceId, this.motionProcessor.secondsPassed()));
|
||||
|
||||
if (this.motionProcessor.hasFinished()) {
|
||||
// If for some reason the parent activity is not defined,
|
||||
// move back to the main screen.
|
||||
if (this.parentActivity == null) {
|
||||
// Move to main screen
|
||||
NavigationManager.navigateToActivity(getContext(), MainActivity.class);
|
||||
return;
|
||||
}
|
||||
// Move on to the next exercise, or finish.
|
||||
if (this.exerciseCount > 0) {
|
||||
this.exerciseCount--;
|
||||
this.parentActivity.fetchExerciseAsync((newExercise) -> {
|
||||
this.motionProcessor.useExercise(newExercise);
|
||||
}, (failed) -> {
|
||||
// Move to main screen
|
||||
NavigationManager.navigateToActivity(parentActivity, MainActivity.class);
|
||||
});
|
||||
} else {
|
||||
// Finish the exercise.
|
||||
NavigationManager.navigateToActivity(parentActivity, EndScreenActivity.class);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: Use raw vector */
|
||||
vectors.add(projectVertex(rotationVector, this.getWidth(), this.getHeight()));
|
||||
|
||||
/* TODO: Remove */
|
||||
Vector2f parsed = projectVertex(rotationVector, this.getWidth(), this.getHeight());
|
||||
|
||||
this.vectors.add(parsed /* TODO: Add regular vertex once exercise data is stored in DB*/);
|
||||
|
||||
// Remove the first element if the array is too big
|
||||
if (this.vectors.size() > 100)
|
||||
this.vectors.poll();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -157,52 +92,15 @@ public class ExerciseStatusElement extends View implements IInputHandler {
|
||||
public void setExercise(Exercise exercise) {
|
||||
this.motionProcessor.useExercise(exercise);
|
||||
this.exercise = exercise;
|
||||
Log.i("MotionProcessor", "Updating exercise in ExerciseStatusElement");
|
||||
}
|
||||
|
||||
|
||||
private Vector2f projectVertex(Vector3f point, int virtualWidth, int virtualHeight) {
|
||||
viewMatrix
|
||||
.identity()
|
||||
.lookAt(new Vector3f(0, 0, -2), new Vector3f(0, 0, 0), new Vector3f(0, 1, 0));
|
||||
|
||||
// Transform the projection matrix to a perspective projection matrix
|
||||
// Perspective transformation conserves the depth of the object
|
||||
projectionMatrix
|
||||
.identity()
|
||||
.perspective((float) Math.toRadians(70), (float) virtualWidth / virtualHeight, .01f, 1000.0f);
|
||||
|
||||
// Convert world coordinates to screen-space using MVP matrix
|
||||
Vector4f screenCoordinates = new Vector4f(point, 1.0f)
|
||||
.mul(this.viewMatrix)
|
||||
.mul(this.projectionMatrix);
|
||||
|
||||
// Normalize screen coordinates from (-1, 1) to (0, virtualWidth) and (0, virtualHeight)
|
||||
float normalizedX = (screenCoordinates.x / screenCoordinates.w + 1.0f) * 0.5f * virtualWidth;
|
||||
float normalizedY = (1.0f - screenCoordinates.y / screenCoordinates.w) * 0.5f * virtualHeight;
|
||||
return new Vector2f(normalizedX, normalizedY);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDraw(Canvas canvas) {
|
||||
canvas.drawRect(0, 0, getWidth(), getHeight(), backgroundPaint);
|
||||
this.setBackgroundColor(0xFF000000); // Black
|
||||
/*if (this.exercise == null)
|
||||
return;*/
|
||||
|
||||
|
||||
/* TODO: Remove */
|
||||
for (int i = 0, startX, endX, startY, endY; i < axisVectors.length / 2; i++) {
|
||||
startX = (int) Math.max(0, Math.min(this.getWidth(), (int) axisVectors[i * 2].x));
|
||||
endX = (int) Math.max(0, Math.min(this.getWidth(), (int) axisVectors[i * 2 + 1].x));
|
||||
startY = (int) Math.max(0, Math.min(this.getHeight(), (int) axisVectors[i * 2].y));
|
||||
endY = (int) Math.max(0, Math.min(this.getHeight(), (int) axisVectors[i * 2 + 1].y));
|
||||
canvas.drawLine(startX, startY, endX, endY, this.borderPaint);
|
||||
}
|
||||
|
||||
for (Vector2f point : this.vectors) {
|
||||
canvas.drawRect(point.x, point.y, point.x + 5, point.y + 5, this.userProgressPaint);
|
||||
}
|
||||
/*
|
||||
// Draw target circle
|
||||
float targetRadius = (this.screenDimensions.x + this.screenDimensions.y) / 5.0f;
|
||||
@@ -222,6 +120,40 @@ public class ExerciseStatusElement extends View implements IInputHandler {
|
||||
|
||||
@Override
|
||||
public void accept(Vector3f rotationVector, int sensorId) {
|
||||
Log.i("MotionProcessor", "Rotation vector received: " + rotationVector);
|
||||
Log.i("MotionProcessor", "Last error offset:" + this.motionProcessor.getError(sensorId, this.motionProcessor.secondsPassed()));
|
||||
|
||||
// Check whether the current exercise has been completed.
|
||||
// This is determined by the duration of the exercise, and the amount of time that has passed.
|
||||
// The duration of the exercise originates from the database, and is stored in seconds.
|
||||
// Whenever 'useExercise' is called, the timer resets and this method will be called again.
|
||||
if (this.motionProcessor.hasFinished() && !this.motionProcessor.isRecording()) {
|
||||
// If for some reason the parent activity is not defined,
|
||||
// move back to the main screen.
|
||||
if (this.parentActivity == null) {
|
||||
// Move to main screen
|
||||
Log.i("MotionProcessor", "Parent activity was null.");
|
||||
NavigationManager.navigateToActivity(getContext(), MainActivity.class);
|
||||
return;
|
||||
}
|
||||
// Move on to the next exercise, or finish.
|
||||
if (this.exerciseCount > 0) {
|
||||
this.exerciseCount--;
|
||||
this.parentActivity.fetchExerciseAsync((newExercise) -> {
|
||||
this.motionProcessor.useExercise(newExercise);
|
||||
|
||||
// Whenever the database retrieval failed, we return to the main screen.
|
||||
}, (failed) -> {
|
||||
// Move to main screen
|
||||
Log.i("MotionProcessor", "Failed to fetch exercise from database");
|
||||
NavigationManager.navigateToActivity(parentActivity, MainActivity.class);
|
||||
});
|
||||
} else {
|
||||
// Finish the exercise.
|
||||
Log.i("MotionProcessor", "Exercise has finished");
|
||||
NavigationManager.navigateToActivity(parentActivity, EndScreenActivity.class);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -13,8 +13,14 @@ public class GesturePath {
|
||||
* @param vectors The vectors that make up the path.
|
||||
*/
|
||||
public GesturePath(Vector3f[] vectors) {
|
||||
if (vectors.length < 2)
|
||||
throw new IllegalArgumentException("A path must have at least two points.");
|
||||
if (vectors.length < 2) {
|
||||
this.segments = new PathSegment[1];
|
||||
this.segments[0] = new PathSegment(
|
||||
new Vector3f(0, 0, 0),
|
||||
new Vector3f(0, 0, 0)
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
this.segments = new PathSegment[vectors.length - 1];
|
||||
for (int i = 0; i < vectors.length - 1; i++)
|
||||
@@ -92,11 +98,13 @@ public class GesturePath {
|
||||
*/
|
||||
|
||||
public static GesturePath fromString(String input) {
|
||||
if (input == null)
|
||||
throw new IllegalArgumentException("Input string cannot be null");
|
||||
byte[] bytes = input.getBytes();
|
||||
|
||||
// Check if the input string contains a valid amount of bytes (12 bytes per vector)
|
||||
if (input.length() % 12 != 0) {
|
||||
throw new IllegalArgumentException("Invalid input string length");
|
||||
throw new IllegalArgumentException("Invalid input string length (" + input.length() + " bytes provided - must be a multiple of 12)");
|
||||
}
|
||||
Vector3f[] vectors = new Vector3f[input.length() / 12];
|
||||
|
||||
|
@@ -80,6 +80,8 @@ public class InputProcessor {
|
||||
|
||||
this.selfRotationVectorPaths = new Vector3f[2][(int) (exercise.exerciseTimeInSeconds * this.sampleRate)];
|
||||
this.targetRotationVectorPaths = new Vector3f[2][exercise.rightPath.getVectors().length];
|
||||
this.targetRotationVectorPaths[0] = exercise.leftPath.getVectors();
|
||||
this.targetRotationVectorPaths[1] = exercise.rightPath.getVectors();
|
||||
this.exerciseDurationInSeconds = exercise.exerciseTimeInSeconds;
|
||||
this.secondsPassed = 0.0D;
|
||||
this.lastTime = System.currentTimeMillis();
|
||||
@@ -99,7 +101,7 @@ public class InputProcessor {
|
||||
if (recording) {
|
||||
this.secondsPassed = 0.0D;
|
||||
this.lastTime = System.currentTimeMillis();
|
||||
|
||||
this.selfRotationVectorPaths = new Vector3f[2][(int) (duration * this.sampleRate)];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,6 +160,8 @@ public class InputProcessor {
|
||||
|
||||
try {
|
||||
|
||||
Log.i("MotionProcessor", "Time passed: " + this.secondsPassed + "s");
|
||||
Log.i("MotionProcessor", "Recording: " + this.recordingMovement + ", " + this.secondsPassed + " / " + this.recordingDurationInSeconds);
|
||||
Log.i("MotionProcessor", "Received packet data: " + data);
|
||||
|
||||
JsonElement json = JsonParser.parseString(data);
|
||||
@@ -178,6 +182,7 @@ public class InputProcessor {
|
||||
int deviceId = object.get("deviceId").getAsInt();
|
||||
String type = object.get("type").getAsString();
|
||||
|
||||
// Parse the retrieved data
|
||||
parseRotationVector(rotation, deviceId);
|
||||
} catch (Exception e) {
|
||||
Log.i("MotionProcessor", "Failed to parse packet data.");
|
||||
@@ -195,18 +200,12 @@ public class InputProcessor {
|
||||
|
||||
// Re-calculate time for index calculation
|
||||
secondsPassed = (System.currentTimeMillis() - lastTime) / 1000.0d;
|
||||
lastTime = System.currentTimeMillis();
|
||||
|
||||
|
||||
// Supposed index of the current rotation vector in the `rotationVectorPaths` array
|
||||
int selfIndex = (int) (secondsPassed * sampleRate);
|
||||
|
||||
motionDataConsumer.accept(rotation, deviceId);
|
||||
if (selfIndex >= selfRotationVectorPaths[deviceId].length || selfIndex < 0)
|
||||
return;
|
||||
|
||||
selfRotationVectorPaths[deviceId][selfIndex] = rotation;
|
||||
|
||||
if ( this.recordingMovement && this.hasFinished()) {
|
||||
if ( this.recordingMovement && this.secondsPassed >= this.recordingDurationInSeconds) {
|
||||
// Do something with the recorded data.
|
||||
this.recordingMovement = false;
|
||||
// Convert recorded data from `selfRotationVectorPaths` to string, and
|
||||
@@ -218,6 +217,11 @@ public class InputProcessor {
|
||||
Log.i("MotionProcessor", "Converted data: ");
|
||||
Log.i("MotionProcessor", converted);
|
||||
}
|
||||
motionDataConsumer.accept(rotation, deviceId);
|
||||
if (selfIndex >= selfRotationVectorPaths[deviceId].length || selfIndex < 0)
|
||||
return;
|
||||
|
||||
selfRotationVectorPaths[deviceId][selfIndex] = rotation;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,4 +338,8 @@ public class InputProcessor {
|
||||
public float secondsPassed() {
|
||||
return (float) secondsPassed;
|
||||
}
|
||||
|
||||
public boolean isRecording() {
|
||||
return this.recordingMovement;
|
||||
}
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
android:viewportHeight="108"
|
||||
android:viewportWidth="108"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#3DDC84"
|
||||
<path android:fillColor="#00000000"
|
||||
android:pathData="M0,0h108v108h-108z"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
|
@@ -42,12 +42,23 @@
|
||||
android:layout_margin="10dp"
|
||||
tools:ignore="SpeakableTextPresentCheck" />
|
||||
|
||||
<VideoView
|
||||
android:id="@+id/videoView"
|
||||
<android.support.v7.widget.CardView
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="300dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_margin="50dp" />
|
||||
android:layout_marginStart="50dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginEnd="50dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
card_view:cardCornerRadius="30dp">
|
||||
|
||||
<VideoView
|
||||
android:id="@+id/videoView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -58,9 +69,9 @@
|
||||
android:layout_marginVertical="20dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:padding="10dp"
|
||||
android:background="@drawable/border_background"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
@@ -72,20 +83,19 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/title"
|
||||
android:textAlignment="center"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="5dp"/>
|
||||
android:layout_gravity="center_horizontal" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/border_background_3"
|
||||
android:padding="16dp"
|
||||
android:layout_margin="10dp"
|
||||
android:padding="5dp"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewFitnessDescription"
|
||||
style="@style/TextStyle"
|
||||
android:id="@+id/textViewFitnessShortDescription"
|
||||
style="@style/TextStyleDesc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/context"
|
||||
@@ -96,8 +106,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/border_background_3"
|
||||
android:padding="16dp"
|
||||
android:layout_margin="10dp"
|
||||
android:padding="5dp"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<TextView
|
||||
@@ -113,8 +123,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/border_background_3"
|
||||
android:padding="16dp"
|
||||
android:layout_margin="10dp"
|
||||
android:padding="5dp"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<TextView
|
||||
|
@@ -33,7 +33,7 @@
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewDialog"
|
||||
android:id="@+id/textViewDialogDescription"
|
||||
style="@style/TextStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
275
code/src/Fitbot/app/src/main/res/raw/armcircle.qianim
Normal file
275
code/src/Fitbot/app/src/main/res/raw/armcircle.qianim
Normal file
@@ -0,0 +1,275 @@
|
||||
<?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="HeadYaw" mute="false" unit="degree">
|
||||
<Key value="-0.439454377" frame="101">
|
||||
<Tangent side="right" abscissaParam="32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-0.439454377" frame="199">
|
||||
<Tangent side="left" abscissaParam="-32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-0.439454377" frame="299">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-0.439454377" frame="401">
|
||||
<Tangent side="left" abscissaParam="-34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="HeadPitch" mute="false" unit="degree">
|
||||
<Key value="-12.1289139" frame="101">
|
||||
<Tangent side="right" abscissaParam="32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-12.1289139" frame="199">
|
||||
<Tangent side="left" abscissaParam="-32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-12.1289139" frame="299">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-12.1289139" frame="401">
|
||||
<Tangent side="left" abscissaParam="-34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LShoulderPitch" mute="false" unit="degree">
|
||||
<Key value="-119.500008" frame="101">
|
||||
<Tangent side="right" abscissaParam="32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="119.500008" frame="199">
|
||||
<Tangent side="left" abscissaParam="-32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-119.500008" frame="299">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="119.500008" frame="401">
|
||||
<Tangent side="left" abscissaParam="-34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LShoulderRoll" mute="false" unit="degree">
|
||||
<Key value="6.67969275" frame="101">
|
||||
<Tangent side="right" abscissaParam="32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="6.67969275" frame="199">
|
||||
<Tangent side="left" abscissaParam="-32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="6.67969275" frame="299">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="6.67969275" frame="401">
|
||||
<Tangent side="left" abscissaParam="-34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LElbowYaw" mute="false" unit="degree">
|
||||
<Key value="-69.7851486" frame="101">
|
||||
<Tangent side="right" abscissaParam="32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-69.7851486" frame="199">
|
||||
<Tangent side="left" abscissaParam="-32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-69.7851486" frame="299">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-69.7851486" frame="401">
|
||||
<Tangent side="left" abscissaParam="-34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LElbowRoll" mute="false" unit="degree">
|
||||
<Key value="-29.7070332" frame="101">
|
||||
<Tangent side="right" abscissaParam="32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-29.7070332" frame="199">
|
||||
<Tangent side="left" abscissaParam="-32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-29.7070332" frame="299">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-29.7070332" frame="401">
|
||||
<Tangent side="left" abscissaParam="-34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LWristYaw" mute="false" unit="degree">
|
||||
<Key value="-1.76023543" frame="101">
|
||||
<Tangent side="right" abscissaParam="32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-1.76023543" frame="199">
|
||||
<Tangent side="left" abscissaParam="-32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-1.76023543" frame="299">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-1.76023543" frame="401">
|
||||
<Tangent side="left" abscissaParam="-34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LHand" mute="false" unit="dimensionless">
|
||||
<Key value="0.589630966" frame="101">
|
||||
<Tangent side="right" abscissaParam="32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.589630966" frame="199">
|
||||
<Tangent side="left" abscissaParam="-32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.589630966" frame="299">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.589630966" frame="401">
|
||||
<Tangent side="left" abscissaParam="-34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="HipRoll" mute="false" unit="degree">
|
||||
<Key value="-0.26367262" frame="101">
|
||||
<Tangent side="right" abscissaParam="32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-0.26367262" frame="199">
|
||||
<Tangent side="left" abscissaParam="-32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-0.26367262" frame="299">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-0.26367262" frame="401">
|
||||
<Tangent side="left" abscissaParam="-34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="HipPitch" mute="false" unit="degree">
|
||||
<Key value="-1.49414492" frame="101">
|
||||
<Tangent side="right" abscissaParam="32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-1.49414492" frame="199">
|
||||
<Tangent side="left" abscissaParam="-32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-1.49414492" frame="299">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-1.49414492" frame="401">
|
||||
<Tangent side="left" abscissaParam="-34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="KneePitch" mute="false" unit="degree">
|
||||
<Key value="0" frame="101">
|
||||
<Tangent side="right" abscissaParam="32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0" frame="199">
|
||||
<Tangent side="left" abscissaParam="-32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0" frame="299">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0" frame="401">
|
||||
<Tangent side="left" abscissaParam="-34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RShoulderPitch" mute="false" unit="degree">
|
||||
<Key value="-119.500008" frame="101">
|
||||
<Tangent side="right" abscissaParam="32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="119.500008" frame="199">
|
||||
<Tangent side="left" abscissaParam="-32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-119.500008" frame="299">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="112.970039" frame="401">
|
||||
<Tangent side="left" abscissaParam="-34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RShoulderRoll" mute="false" unit="degree">
|
||||
<Key value="-0.5" frame="101">
|
||||
<Tangent side="right" abscissaParam="32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-0.5" frame="199">
|
||||
<Tangent side="left" abscissaParam="-32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-0.5" frame="299">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-0.5" frame="401">
|
||||
<Tangent side="left" abscissaParam="-34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RElbowYaw" mute="false" unit="degree">
|
||||
<Key value="70.2246094" frame="101">
|
||||
<Tangent side="right" abscissaParam="32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="70.2246094" frame="199">
|
||||
<Tangent side="left" abscissaParam="-32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="70.2246094" frame="299">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="70.2246094" frame="401">
|
||||
<Tangent side="left" abscissaParam="-34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RElbowRoll" mute="false" unit="degree">
|
||||
<Key value="29.7070332" frame="101">
|
||||
<Tangent side="right" abscissaParam="32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="29.7070332" frame="199">
|
||||
<Tangent side="left" abscissaParam="-32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="29.7070332" frame="299">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="29.7070332" frame="401">
|
||||
<Tangent side="left" abscissaParam="-34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RWristYaw" mute="false" unit="degree">
|
||||
<Key value="1.57964516" frame="101">
|
||||
<Tangent side="right" abscissaParam="32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="1.57964516" frame="199">
|
||||
<Tangent side="left" abscissaParam="-32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="1.57964516" frame="299">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="1.57964516" frame="401">
|
||||
<Tangent side="left" abscissaParam="-34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RHand" mute="false" unit="dimensionless">
|
||||
<Key value="0.588752136" frame="101">
|
||||
<Tangent side="right" abscissaParam="32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.588752136" frame="199">
|
||||
<Tangent side="left" abscissaParam="-32.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.588752136" frame="299">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.588752136" frame="401">
|
||||
<Tangent side="left" abscissaParam="-34" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
</Animation>
|
208
code/src/Fitbot/app/src/main/res/raw/armraise.qianim
Normal file
208
code/src/Fitbot/app/src/main/res/raw/armraise.qianim
Normal file
@@ -0,0 +1,208 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Animation xmlns:editor="http://www.ald.softbankrobotics.com/animation/editor" typeVersion="2.0" editor:fps="25">
|
||||
<editor:clip editor:fps="25" editor:startFrame="0" editor:endFrame="201"/>
|
||||
<ActuatorCurve fps="25" actuator="HeadYaw" mute="false" unit="degree">
|
||||
<Key value="-0.439454377" frame="0">
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-0.439454377" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-0.439454377" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="HeadPitch" mute="false" unit="degree">
|
||||
<Key value="-12.1289139" frame="0">
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-12.1289139" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-12.1289139" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LShoulderPitch" mute="false" unit="degree">
|
||||
<Key value="90.5273514" frame="0">
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-83.5680313" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="90.5273514" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.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="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="6.67969275" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="6.67969275" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.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="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-69.7851486" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-69.7851486" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LElbowRoll" mute="false" unit="degree">
|
||||
<Key value="-0.5" frame="0">
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-0.5" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-0.5" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.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="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-1.76023543" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-1.76023543" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.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="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.589630966" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.589630966" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="HipRoll" mute="false" unit="degree">
|
||||
<Key value="-0.26367262" frame="0">
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-0.26367262" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-0.26367262" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="HipPitch" mute="false" unit="degree">
|
||||
<Key value="-1.49414492" frame="0">
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-1.49414492" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-1.49414492" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="KneePitch" mute="false" unit="degree">
|
||||
<Key value="0" frame="0">
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RShoulderPitch" mute="false" unit="degree">
|
||||
<Key value="90.5273438" frame="0">
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-85.0710983" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="90.5273438" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.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="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-6.59180212" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-6.59180212" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RElbowYaw" mute="false" unit="degree">
|
||||
<Key value="70.2246094" frame="0">
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="70.2246094" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="70.2246094" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RElbowRoll" mute="false" unit="degree">
|
||||
<Key value="0.5" frame="0">
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.681336999" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.5" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.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="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="1.57964516" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="1.57964516" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.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="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.588752136" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.588752136" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
</Animation>
|
99
code/src/Fitbot/app/src/main/res/raw/squat.qianim
Normal file
99
code/src/Fitbot/app/src/main/res/raw/squat.qianim
Normal 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="HeadYaw" mute="false" unit="degree">
|
||||
<Key value="-0.439454377" frame="0">
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-0.439454377" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-0.439454377" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="HeadPitch" mute="false" unit="degree">
|
||||
<Key value="-12.1289139" frame="0">
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-12.1289139" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-12.1289139" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LShoulderPitch" mute="false" unit="degree">
|
||||
<Key value="-5.74017525" frame="0"/>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LShoulderRoll" mute="false" unit="degree">
|
||||
<Key value="6.67969275" frame="0"/>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LElbowYaw" mute="false" unit="degree">
|
||||
<Key value="-2.0873363" frame="0"/>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LElbowRoll" mute="false" unit="degree">
|
||||
<Key value="-0.5" frame="0"/>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LWristYaw" mute="false" unit="degree">
|
||||
<Key value="-12.7772932" frame="0"/>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LHand" mute="false" unit="dimensionless">
|
||||
<Key value="0.98" frame="0"/>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="HipRoll" mute="false" unit="degree">
|
||||
<Key value="-0.26367262" frame="0">
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-0.26367262" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-0.26367262" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="HipPitch" mute="false" unit="degree">
|
||||
<Key value="-1.49414492" frame="0">
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-42.3515282" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-1.49414492" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="KneePitch" mute="false" unit="degree">
|
||||
<Key value="0" frame="0">
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="29.5" frame="100">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0" frame="200">
|
||||
<Tangent side="left" abscissaParam="-33.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RShoulderPitch" mute="false" unit="degree">
|
||||
<Key value="-5.69999981" frame="0"/>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RShoulderRoll" mute="false" unit="degree">
|
||||
<Key value="-0.5" frame="0"/>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RElbowYaw" mute="false" unit="degree">
|
||||
<Key value="-2.0999999" frame="0"/>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RElbowRoll" mute="false" unit="degree">
|
||||
<Key value="0.5" frame="0"/>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RWristYaw" mute="false" unit="degree">
|
||||
<Key value="1.57964516" frame="0"/>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RHand" mute="false" unit="dimensionless">
|
||||
<Key value="0.98" frame="0"/>
|
||||
</ActuatorCurve>
|
||||
</Animation>
|
@@ -25,6 +25,13 @@
|
||||
<item name="android:padding">6dp</item>
|
||||
</style>
|
||||
|
||||
<style name="TextStyleDesc">
|
||||
<item name="android:textSize">14sp</item>
|
||||
<item name="android:textColor">#FFFFFF</item>
|
||||
<item name= "android:textStyle">bold</item>
|
||||
<item name="android:padding">6dp</item>
|
||||
</style>
|
||||
|
||||
<style name="TextStyleTitle">
|
||||
<item name="android:textSize">40sp</item>
|
||||
<item name="android:textColor">#D3D3D3</item>
|
||||
|
@@ -14,7 +14,7 @@ public class DatabaseFetchingTest {
|
||||
assert exercise != null;
|
||||
System.out.println("\n---------------------------------");
|
||||
System.out.println("Exercise:");
|
||||
System.out.println("Name: " + exercise.title);
|
||||
System.out.println("Name: " + exercise.name);
|
||||
System.out.println("Description: " + exercise.description);
|
||||
System.out.println("Muscle Group: " + exercise.muscleGroup);
|
||||
System.out.println("Image URL: " + exercise.imageUrl);
|
||||
|
34
docs/documentation/brainstorm/Dataprotocols.md
Normal file
34
docs/documentation/brainstorm/Dataprotocols.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# Dataprotocols
|
||||
|
||||
|
||||
|
||||
# different types
|
||||
|
||||
### Hypertext Transfer Protocol (HTTP)
|
||||
HTTP is the foundation of web communication, permitting the transport of data across the internet using a request-response architecture. It uses TCP/IP and stands out by its statelessness, with each request being independent, increasing the web's scalability and flexibility. While it does not encrypt data which makes it usable with sensible data it still makes an nice easy to use option.
|
||||
|
||||
We decided to use this for our project because for communicating with the database it is easy to use and we are not usiong sensible data. If we were to use sensible data that we want to encrypt we can use HTTPS. We are only sending small amounts of data to our app and we are not transfering files to our app. This made HTTP it way more attractive option.
|
||||
|
||||
### File Transfer Protocol (FTP)
|
||||
FTP is the classic protocol for transferring files between computers. It establishes a connection between two computers and it has 2 modes. Passive mode for recieving files. This leaves a port open on the computer. You also have an active mode. This is were the client opens a port towards an other computer. If you want to encrypt your data you can use FTPS.
|
||||
|
||||
When we started the project is thought of this as a option however since we are not only transfering videos but also stuff like titles and dicriptions i thought we were not going to enable it to its fullest potattional. On top of that we are also transfering only small amounts of videos and we switched the way we used videos on our project by hosting the videos on a service like youtube. This made FTP not usefull for our project.
|
||||
|
||||
### User Datagram Protocol (UDP)
|
||||
UDP is s connectionless protocol that prioritizes speed over reliability. It sends datagrams to a computer without establishing a connection with the reciever. It is not stable so you need to keep in mind that it will not be 100% accurate. However it is really fast so this makes it a suitible option for applications where a tiny amount of dataloss is not an issue.
|
||||
|
||||
(to be added)
|
||||
|
||||
### Message Queue Telemetry Transport (MQTT)
|
||||
MQTT is s lightweight messaging protocol designed for machine-to-machine communication in Internet of Things applications. It uses a publish subscribe model. This is were one device publishes data on a server and the other devices need to subscribe to that publisher to recieve the data. It is commonly used to transmot sensor data to a server.
|
||||
|
||||
(to be added)
|
||||
|
||||
### Real-time Streaming Protocols (RTSP)
|
||||
RTSP is collection of protocols used for streaming media such as videos over networks. However it requires additional software for it to work properly. RTSP shines in controlling live streams allowing features like pause. It's often used in IPTV's and video conferencing applications.
|
||||
|
||||
|
||||
Due to its limited support we are not uising it in our project. We were already having issues with other things that are not supported on android or mobile apps and we did not want to risk getting more issues while working on our project since we were already using up our limited time. It is a very interesting option though since it will enable more advanced videos. It also is realy complex which makes it a less atractive option since we are already learning a lot of new things and if we were to want to learn more things we would rather learn something with a low learning curve.
|
||||
|
||||
|
||||
# Conclusion
|
49
docs/documentation/hardware/Ideasforfitbord.md
Normal file
49
docs/documentation/hardware/Ideasforfitbord.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# Ideas for hardware
|
||||
|
||||
# making a balance bord
|
||||
|
||||
Since We are not able to connect the wii fit bord we have to come up with a solution. We thought of it for some time and what we want to do with it. Origanlly we wanted to use the balance bord for excersises such as standing on one leg. This is a simple leg excersise we wanted to have. We thaugt of multiple solutions to still have this excersise. However we still needed to think of a design for the frame.
|
||||
|
||||
# the frame
|
||||
|
||||
We wanted it to have a similar style to the balance bord. howevere since we can make or own we wanted to make it a bit taller. This makes it easier to implement some other excersise such as the step up. This is na excersise that benefits from a taller box than the wii fit box.
|
||||
|
||||
## LDR
|
||||
|
||||
We can use a LDR to determine if someone is standing on the bord. We will have a small window where light can pass trought to let de LDR read out the light. We need to make clear that the user needs to stand on these points by providing an easy to udnerstand design.
|
||||
|
||||
## Knock sensor
|
||||
|
||||
A knock sensor is a sensor that detects impact. This could come in handy for us since it could detect impact on our fitbord. If we were to make a fitbord we would love to implement this sensor. We could use it to detect if someone is standing on the fitbord. This will not make the LDR useless since it only will detect one impact. This will be when someone will be standing on the fitbord it will not activate when someone is standing on the fitbord without moving.
|
||||
|
||||
We could is it for excersises where u want someone to jog or walk in place. The knock sensor will detect the small impacts from walking. This will greatly expend our excersise pool since walking and running is really important for cardio excersises. We could also make people stamp on the ground. This is a fun and good excersise for your legs.
|
||||
|
||||
```C++
|
||||
const int knockSensor = A0;
|
||||
const int threshold = 200;
|
||||
|
||||
int sensorReading = 0;
|
||||
|
||||
|
||||
void setup() {
|
||||
Serial.begin(9600);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
sensorReading = analogRead(knockSensor);
|
||||
|
||||
if (sensorReading >= threshold) {
|
||||
|
||||
Serial.println(sensorReading);
|
||||
}
|
||||
|
||||
if (sensorReading >= 500) {
|
||||
Serial.println(stamp detected)
|
||||
}
|
||||
}
|
||||
delay(10);
|
||||
```
|
||||
|
||||
|
||||

|
@@ -20,5 +20,9 @@ We chose this pcb because its really small and it has a socket for a sensor and
|
||||
We are going to rotational data from the sensor and use that to give feedback to the user based on how well they did the exercise.
|
||||

|
||||
|
||||
## How can i program this ESP?
|
||||
|
||||
To program this you need to use the Arduino IDE. You need to install the ESP8266 board in the board manager. You need to go to File -> prefrences -> additional board manager url's. Then you need to add this link `https://arduino.esp8266.com/stable/package_esp8266com_index.json`. Then you can find the LOLIN(WEMOS) D1 mini lite. Thats the board you need to select. When compiling you will see a lot of warnings but you can ignore them.
|
||||
|
||||
### Sources
|
||||
* https://github.com/Sorakage033/SlimeVR-CheeseCake
|
42
docs/personal-documentation/Niels/Expertreview3.md
Normal file
42
docs/personal-documentation/Niels/Expertreview3.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# K1
|
||||
|
||||
Voor k1 heb ik al beschreven wat ik wist van k1 in mijn vorige expert zoals hoe onze database infrastructuur werkt en hoe een android app maken werkt.
|
||||
|
||||
### OOP
|
||||
|
||||
Ik heb OOP gewerkt met java. Dit komt doordat java een object orianted language is. Ik heb een class gemaakt om makkelijk te kunnen navigeren tussen de menus.
|
||||
|
||||
[Navigation Manager](../../../../code/src/Fitbot/app/src/main/java/com/example/fitbot/util/NavigationManager.java)
|
||||
|
||||
Ik heb ook een class gemaakt in C++ dit komt doordat ik een class heb gemaakt die het IP get van pepper. hier praat ik verder over in k5
|
||||
|
||||
### Database
|
||||
|
||||
ik heb de databse ingevuld met data. We hadden eerst alle videos op youtube prive geupload en wilden dat in de database doen. Dat hebben we veranderd naar een google docs. Wij slaan ook andere data op zoals de excersise discription deze wordt verstuurd naar de app en deze wordt dan weergegeven.
|
||||
|
||||
# K2
|
||||
|
||||
Ik heb voor K2 onderzoeken geschreven over zicht en kleuren bij ouderen. Ook ben ik met de ouderen gaan wandelen en heb ik kleine gesprekken emt hun gevoerd. Ik had de test card al gemaakt in mijn vorige expert en heb nu de learning card gemaakt van mijn ervaring.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
# K3
|
||||
Wij hadden als team vorige sprint al gebrainstormt en besproken hoe wij onze infrastructuur gaan inrichten dit hebben wij met ze alle gedaan en ik in mijn vorige sprint review behandelt welke onderdelen wij gebruiken. Ik ben ook bezig geweest met een onderzoek over datatransfer protocolen. Ik wilde dit odnerzoeken doordat het wij een nieuwe manier van data transfers gebruiken. Ik had voor dit nognooit met fiel transfer gewerkt. Na mijn vorige sprint review kreeg ik als feedback dat het beter was om het met externe linkjes te doen en niet met direct files. Dit heb ik bij mijn team voorgelegt en we hadden het verandert naar youtube linkjes. Nadat wij erachter kwamen dat het niet heel handig is zijn we over gestapt naar google drive.
|
||||
|
||||
|
||||
# K4
|
||||
Ik had graag willen werken met het wiifit bord helaas werkte dit neit omdat het heel moeilijk te intergreren was in een android app. Daarna wilden wij onze eigen maken maar dit is helaas niet van gekomen omdat onze ESP32 alleen BLE uitzend en dat zorgt ervoor dat de app maar 1 keer de data binnekrijgt. Doordat we weining tijd hebben voor een oplossing ben ik gaan onderzoeken wat voor andere sensoren en oefeningen we kunnen doen met een eigen gemaakte wii fit bord.
|
||||
|
||||
[fetchIPAddress](../../documentation/hardware/Ideasforfitbord.md)
|
||||
|
||||
# K5
|
||||
ik heb een get request gemaakt voor de motion trackers zodat zij het ip kunnen krijgen. Peppers IP is niet static waardoor ze elke keer weer een nieuwe IP nodig hebben. Ik heb ook pepper laten bewegen en ik kan makkelijk meer movement toevoegen. Pepper iets laten zeggen is ook gemakkelijk met de pepper.say command.
|
||||
|
||||
[peppermovement](../../../code/src/Fitbot/app/src/main/res/raw/armcircle.qianim)
|
||||
|
||||
[fetchIPAddress](../../../code/arduino/Movement-sensor-code/Connectivity.cpp)
|
BIN
docs/personal-documentation/Niels/assets/Learningcard28.png
Normal file
BIN
docs/personal-documentation/Niels/assets/Learningcard28.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 161 KiB |
@@ -1,11 +1,71 @@
|
||||
# Reflectie 3 blokken
|
||||
|
||||
## Blok 1
|
||||
### Blok 1
|
||||
In blok 1 heb ik de professionele skills Persoonlijk leiderschap en Toekomstgericht organiseren. Ik had veel moeite met documenteren en het scrumboard te gebruiken, omdat ik er nog geen ervaring mee had. Ik had op dat moment al het hele project in blokjes opgedeeld voor mezelf en keer daarna nooit meer naar het scrumboard. Door die manier van werken deed ik ook 5 dingen tegelijk waardoor ik af en toe het overzicht kwijtraakte . Ik had als doel opgesteld om in de volgende blokken meer het scrumboard te gaan gebruiken. Mijn aanpak was proberen zelf wat user story’s te maken, zodat ik ook wat meer betrokken was bij het scrumboard. Uiteindelijk heb ik daardoor wel wat meer gebruik gemaakt van het scrumboard, maar ik ging nog wel veel mijn eigen weg. Ik was niet helemaal tevreden met het resultaat, maar de aanpak werkte wel. Wat ik heb geleerd is als ik veel gebruik van iets wil maken moet ik er zelf ook bij betrokken zijn. Volgende keren zorg ik er voor dat ik betrokken ben bij het scrum board wat nu ook moet, waardoor ik meer het scrumboard gebruik.
|
||||
|
||||
## Blok 2
|
||||
### Blok 2
|
||||
In blok 2 gingen we voor het eerst samenwerken in een duo, waarbij we ook deels onze eigen user story’s moesten maken, dat heeft me ook geholpen om door het hele blok heen het scrumboard meer te gebruiken. Communicatie ging over het algemeen in dat blok redelijk goed. Als we vragen aan elkaar hadden werden die gewoon gesteld en als een van ons vastliep hielpen we elkaar. In sprint 2 werden classes aan ons geïntroduceerd waarbij ik best wat moeite had om dat te begrijpen. Dus ik had maar 1 class gemaakt en verder alles in functies gestopt. Pas eind sprint 2 probeerde ik de feedback te verwerken om alles in classes te stoppen, maar omdat je code uiteindelijk zo complex is. Is het bijna onmogelijk om het in classes te stoppen. Waarbij het resultaat was een heel lastig leesbaar programma. Ik was niet tevreden of over het resultaat aan het einde van het blok. Mijn aanpak was bij het volgende blok. Meteen alles in classes maken. Wat uiteindelijk wel goed heeft gewerkt. Ben daardoor ook achter gekomen hoe handig classes zijn en dat ze enorm veel overzicht geven van wat je aan het maken bent.
|
||||
|
||||
## Blok 3
|
||||
### Blok 3
|
||||
In blok 3 stond doelgericht interacteren en persoonlijke leiderschap centraal. Het groepje in blok 3 was te gezellig waardoor we vaak meer zaten te lollen dan we aan het werk waren. Ik had mezelf de taak gegeven om proberen om meer gefocust te werken zonder dat ik afgeleid raakte door mijn groepje. Mijn aanpak was door mezelf af te schermen met een koptelefoon of eventjes ergens anders te gaan zitten, wat ook goed hielp was even een rondje lopen. Op die manier kon ik de laatste sprint heel efficiënt werken en in blok 4 merk ik ook dat die techniek enorm erg helpt met meer gefocust en productief blijven op een dag. Dit resultaat was eigenlijk een beetje laat het liefst deed ik dit al eind sprint 1, zodat ik heel het blok beter kon doorwerken.
|
||||
|
||||
|
||||
## Sterkte zwakte analyse.
|
||||
|
||||
### Toekomstgericht organiseren
|
||||
Een van mijn zwakkere punten is organiseren in een team, want ik heb alles heel snel een plan in mijn hoofd maar dat duidelijk op papier zetten is was lastiger. Daardoor kan je ook minder rekening houden met de product owner van wat ze daadwerkelijk willen. Daarbij lukt me het wel beter om andere mogelijkheden en kansen te zien als we bezig zijn met het project waardoor we ons product kunnen verbeteren.
|
||||
Ethiek is een van mijn sterkere punten als ik iets maak denk ik wel er bij van wat de slechte gevolgen er van kunnen zijn en of het wel handig is om te maken. Ook ben ik me er van bewust dat er grenzen zijn bij het verzamelen van informatie.
|
||||
Procesmanagement is ook een van mijn zwakkere punten maar het is zich langzaam aan het verbeteren. Eerst had ik veel moeite met een planning maken en er voor zorgen dat ik me er aan hield. Nu gaat dat allemaal een stuk beter en merk ik dat ik echt volgens de planning bezig ben. Nu ben ik ook product owner binnen mijn groepje en push ik om een minimal viable product af te hebben voor de sprint 2 review.
|
||||
Ik geef mezelf een score van 3. Vanaf het begin van de opleiding is het al stukken verbeterd, maar er is meer ruimte voor verbetering.
|
||||
|
||||
### Onderzoekend probleemoplossen
|
||||
Een zwak punt van mij is methodische probleemaanpak als het gaat om theoretische vraagstukken. Daarbij heb ik veel moeite met het belangrijkste er uit halen en het onder te verdelen in hoofd en bijzaken. Als het praktisch is gaat het een stuk makkelijker en heb ik heel snel een beeld van de hoofd en bijzaken en welke kennis er nog ontbreekt.
|
||||
Met onderzoek heb ik nog wel moeite, over het algemeen heb ik moeite met Nederlands en merk ik zelf dat ik af en toe 3 keer een zin moet lezen totdat ik weet wat er staat. Het onderscheiden van meningen en feiten heb ik minder moeite mee en de betrouwbaarheid van een bron kan ik er redelijk snel uithalen.
|
||||
In oplossingen zoeken ben ik redelijk goed in. Ik kan kritisch zijn op mezelf en anderen en geef vaak suggesties over wat beter kan. Of als iets op een andere manier kan. Ook ben ik goed in het bedenken van nieuwe oplossingen op problemen.
|
||||
Ik geef mezelf nu een score van 2.5, omdat ik nog niet heel goed ben in teksten en formuleren.
|
||||
|
||||
### Persoonlijk leiderschap
|
||||
Ik denk dat ondernemend zijn een sterkte punt van mij is. Ik ga snel dingen uit mezelf doen en als iets me niet lukt probeer ik het nog steeds zelf uit te vogelen anders vraag ik om hulp. Bij beslissingen probeer ik instemmingen van het hele groepje er bij te krijgen. Ook als niemand de leiding in het groepje heeft of er gebeurt niks pak ik snel de leiding om nog proberen iets af te kunnen krijgen.
|
||||
Persoonlijke ontwikkeling is een sterk punt van mij. Ik weet waar ik goed en slecht in ben en ik reflecteer vaak om mijn acties en wat ik doe en wat misschien beter kon. Ik probeer me mee te leven met anderen en hun ideeën. Ook ben ik mij bewust van de consequenties die mijn acties kunnen hebben.
|
||||
Ik heb nog wel moeite met persoonlijke profilering, omdat ik heel snel een rol pak waar ik mij comfortabel bij voel en niet een rol pak dat uitdagender is waarbij ik veel meer leer. Daarentegen weet ik wel heel goed wat ik wil leren en welke kennis ik nog zou willen oppakken. Ook geef ik aan mijn teamgenoten aan waar ik goed en slecht in ben, zodat we makkelijk en beter taken kunnen verdelen als we in tijdnood zitten.
|
||||
Over het algemeen geef ik persoonlijke leiderschap 3.6 punten. Ik moet nog werken aan meer uitdaging zoeken, maar verder gaat het goed op dit vlak.
|
||||
|
||||
### Doelgericht interacteren
|
||||
Ik ben redelijk goed met rekening houden met opdrachtgevers en vraag vaak aan feedback van wat ze willen en laat ze ook zien tussen het project wat we hebben.
|
||||
In communiceren ben ik goed en slecht. Ik kan goed actief luisteren en rekening houden met iemands gevoelens. Ook kan ik mijn meningen logisch onderbouwen. Het gedeelte waar ik af en toe nog moeite mee heb ik begrijpelijk kunnen spreken en woord volgorde.
|
||||
Met samenwerken ben ik redelijk goed. Ik kan goed afspraken maken en die nakomen, bijvoorbeeld dat we samen eerder naar school komen om iets af te krijgen. We werken samen naar een oplossing en helpen elkaar waar nodig is.
|
||||
Ik geef met doelgericht interacteren mezelf 4 punten, omdat het samenwerken elk blok tot nu toe goed is gegaan en ik ook producten naar wens de laatste blokken heb opgeleverd.
|
||||
|
||||
|
||||
## SMART Leerdoelen
|
||||
### Toekomstgericht organiseren
|
||||
Specifiek:
|
||||
Ik wil leren hoe ik plannen beter op papier kan zetten, zodat mijn team ook inzicht heeft in mijn ideeën voor het project.
|
||||
Meetbaar:
|
||||
Ik zal bij de eerste sprint een gestructureerd uitgewerkt plan hebben voor mijn team, zodat ze allemaal op de hoogste zijn van mijn ideeën en zodat we dingen makkelijk kunnen afstemmen.
|
||||
Acceptabel:
|
||||
Het is realistisch, want ik heb al stappen gezet om het te verbeteren en ik wil kijken hoe goed dit gaat werken.
|
||||
Tijdgebonden:
|
||||
Ik zal dit doen komend blok, waarbij ik aan het begin van de eerste sprint werk aan een plan die ik kan zien aan mijn teamgenoten waarbij ik mijn visie van het project kan laten zien.
|
||||
|
||||
### Onderzoekend probleemoplossen
|
||||
Specifiek: Verbeter mijn methodische probleemaanpak bij theoretische vraagstukken en mijn begrip van teksten in het Nederlands.
|
||||
Meetbaar: Ik wil mijn vaardigheden verhogen van het huidige niveau naar een hoger niveau waarbij ik complexe vraagstukken gestructureerd en kritisch aanpak.
|
||||
Acceptabel: Dit doel is belangerijk voor mijn leerproces en zal me helpen om beter en efficiënter te zijn bij onderzoekend probleem oplossen.
|
||||
Realistisch: Ik zal gerichte inspanningen leveren om mijn vaardigheden te verbeteren, bijvoorbeeld door meer te oefenen met theoretische vraagstukken en actief te werken aan mijn taalvaardigheid.
|
||||
Tijdgebonden: Ik wil dit doel bereiken voordat het half jaar project volgend jaar over is.
|
||||
|
||||
### Persoonlijk leiderschap
|
||||
Specifiek: Binnen zes maanden wil ik mijn persoonlijke leiderschapsvaardigheden versterken door minstens drie keer een uitdagende rol binnen teamprojecten op me te nemen en hierin actief te werken aan nieuwe vaardigheden.
|
||||
Meetbaar: Ik zal na elk project een reflectieverslag schrijven en feedback vragen aan ten minste twee teamleden om mijn voortgang te meten. Mijn succescriteria zijn het succesvol voltooien van deze rollen en positieve feedback van teamleden over mijn leiderschapskwaliteiten.
|
||||
Acceptabel: Ik ben bereid tijd en moeite te investeren in deze uitdaging omdat het essentieel is voor mijn professionele groei en het behalen van mijn carrièredoelen.
|
||||
Realistisch: Met mijn huidige competenties en de beschikbare tijd kan ik deze uitdagende rollen aannemen en succesvol voltooien. Ik heb al bewezen initiatief en leiderschap te kunnen tonen.
|
||||
Tijdsgebonden: Ik zal dit doel bereiken door elke twee maanden een nieuw teamproject met een uitdagende rol af te ronden, wat resulteert in drie uitdagende projecten binnen zes maanden.
|
||||
|
||||
### Doelgericht interacteren
|
||||
Specifiek: Binnen drie maanden wil ik mijn bijdragen aan daily standup-meetings verbeteren door elke dag een duidelijke update te geven over mijn voortgang, obstakels en plannen, en door actief feedback te vragen en te geven.
|
||||
Meetbaar: Ik zal elke dag kijken of de daily standup gedaan word. En daarbij elke werkdag mijn bijdrage leveren
|
||||
Acceptabel: Dit zorgt er voor dat de samenwerking uiteindelijk beter word en dat iedereen elkaar sneller helpt met dingen
|
||||
Realistisch: Dit is realistisch want het is iets kleins van 10 min elke dag.
|
||||
Tijdsgebonden: Ik zal dit doel bereiken voor het halfjaar project over is
|
||||
|
||||
|
Reference in New Issue
Block a user