2024-04-24 16:53:51 +02:00
17 changed files with 262 additions and 61 deletions

84
.idea/workspace.xml generated
View File

@@ -15,8 +15,9 @@
</component>
<component name="ChangeListManager">
<list default="true" id="00599d5b-7eb5-44da-ad7f-98bf42384c16" name="Changes" comment="Final update onderzoek-formulier.md">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/personalDocs/Luca/literatuuronderzoek/onderzoek-formulier.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/personalDocs/Luca/literatuuronderzoek/onderzoek-formulier.md" afterDir="false" />
<change afterPath="$PROJECT_DIR$/docs/personalDocs/Luca/weekly-reports/sprint-1-week-1.md" afterDir="false" />
<change afterPath="$PROJECT_DIR$/docs/personalDocs/Luca/weekly-reports/sprint-1-week-2.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/code/src/Fitbot/app/src/main/java/com/example/fitbot/MainActivity.java" beforeDir="false" afterPath="$PROJECT_DIR$/code/src/Fitbot/app/src/main/java/com/example/fitbot/MainActivity.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -26,6 +27,7 @@
<component name="ClangdSettings">
<option name="formatViaClangd" value="false" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[]" />
<component name="ExternalProjectsData">
<projectState path="$PROJECT_DIR$">
<ProjectState />
@@ -65,9 +67,13 @@
<filtered-out-file-type name="COMMIT_BY_MESSAGE" />
</file-type-list>
</component>
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 7
}</component>
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="ProjectColorInfo"><![CDATA[{
"customColor": "",
"associatedIndex": 7
}]]></component>
<component name="ProjectId" id="2fE3N2CwEPDo9wBtexBLxU20tCJ" />
<component name="ProjectLevelVcsManager">
<ConfirmationsSetting value="2" id="Add" />
@@ -76,18 +82,19 @@
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;git-widget-placeholder&quot;: &quot;main&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"RunOnceActivity.OpenProjectViewOnStart": "true",
"git-widget-placeholder": "Merging main",
"kotlin-language-version-configured": "true",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"vue.rearranger.settings.migration": "true"
}
}</component>
}]]></component>
<component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/code/src/app/src/main/java/com/fitbot" />
@@ -102,40 +109,19 @@
<option name="PM_INSTALL_OPTIONS" value="" />
<option name="ALL_USERS" value="false" />
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
<option name="CLEAR_APP_STORAGE" value="false" />
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="" />
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
<option name="MODE" value="default_activity" />
<option name="CLEAR_LOGCAT" value="false" />
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="false" />
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
<option name="FORCE_STOP_RUNNING_APP" value="true" />
<option name="INSPECTION_WITHOUT_ACTIVITY_RESTART" value="false" />
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
<option name="DEBUGGER_TYPE" value="Auto" />
<Auto>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Auto>
<Hybrid>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Hybrid>
<Java />
<Native>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Native>
<option name="DEBUGGER_TYPE" value="Java" />
<Java>
<option name="ATTACH_ON_WAIT_FOR_DEBUGGER" value="false" />
<option name="DEBUG_SANDBOX_SDK" value="false" />
</Java>
<Profilers>
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
<option name="STARTUP_PROFILING_ENABLED" value="false" />
@@ -148,18 +134,9 @@
<option name="ACTIVITY_CLASS" value="" />
<option name="SEARCH_ACTIVITY_IN_GLOBAL_SCOPE" value="false" />
<option name="SKIP_ACTIVITY_VALIDATION" value="false" />
<method v="2">
<option name="Android.Gradle.BeforeRunTask" enabled="true" />
</method>
<method v="2" />
</configuration>
</component>
<component name="SharedIndexes">
<attachedChunks>
<set>
<option value="bundled-js-predefined-1d06a55b98c1-2e7d6887c066-JavaScript-WS-241.15989.47" />
</set>
</attachedChunks>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
@@ -172,6 +149,7 @@
<workItem from="1713352446871" duration="1766000" />
<workItem from="1713814327036" duration="4920000" />
<workItem from="1713863377053" duration="634000" />
<workItem from="1713960463274" duration="353000" />
</task>
<task id="LOCAL-00001" summary="Changes">
<created>1713528225837</created>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<targetSelectedWithDropDown>
<Target>
<type value="QUICK_BOOT_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="C:\Users\sebas\.android\avd\Pepper_1.9_API_29.avd" />
</Key>
</deviceKey>
</Target>
</targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2024-04-24T11:45:40.185922Z" />
</component>
</project>

View File

@@ -3,12 +3,17 @@
<component name="DesignSurface">
<option name="filePathToZoomLevelMap">
<map>
<entry key="../../../../../../../../layout/custom_preview.xml" value="0.35989583333333336" />
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_bicepvideo.xml" value="0.2015625" />
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_main.xml" value="0.2015625" />
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_main_screen.xml" value="0.358695652173913" />
<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_main.xml" value="0.1" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_main_screen.xml" value="0.1" />
<entry key="app/src/main/res/layout/activity_main.xml" value="0.2341485507246377" />
<entry key="app/src/main/res/layout/activity_sport_item.xml" value="0.2341485507246377" />
<entry key="app/src/main/res/layout/activity_sport_menu.xml" value="0.22056159420289856" />
<entry key="app/src/main/res/layout/sport_menu_item.xml" value="0.22056159420289856" />
</map>
</option>
</component>

View File

@@ -32,6 +32,7 @@ dependencies {
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
implementation 'com.android.support:cardview-v7:28.0.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

View File

@@ -11,6 +11,15 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Fitbot">
<activity
android:name=".ui.SportMenuActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".bicepvideo"
android:exported="false" />

View File

@@ -16,9 +16,6 @@ import com.aldebaran.qi.sdk.object.actuation.Animate;
import com.aldebaran.qi.sdk.object.actuation.Animation;
import com.aldebaran.qi.sdk.object.conversation.Phrase;
import com.aldebaran.qi.sdk.object.conversation.Say;
import com.aldebaran.qi.sdk.object.locale.Language;
import com.aldebaran.qi.sdk.object.locale.Locale;
import com.aldebaran.qi.sdk.object.locale.Region;
public class MainActivity extends RobotActivity implements RobotLifecycleCallbacks {
@@ -39,9 +36,10 @@ public class MainActivity extends RobotActivity implements RobotLifecycleCallbac
@Override
public void onRobotFocusGained(QiContext qiContext) {
String locationName = ("Krijg de tyfus");
String locationDescription = ("Je bent een teringlijer");
Locale locale = new Locale(Language.DUTCH, Region.NETHERLANDS);
// Create a new say action.
Say say = SayBuilder.with(qiContext) // Create the builder with the context.
.withText("Hallo hoe gaat het?") // Set the text to say.
.build(); // Build the say action.
Phrase namePhrase = new Phrase("This location is " + locationName);
Say sayName = SayBuilder.with(qiContext)
@@ -64,6 +62,8 @@ public class MainActivity extends RobotActivity implements RobotLifecycleCallbac
// Call the videoPlayer method
BicepVideo.Video(qiContext);
// Execute the action.
say.run();
}

View File

@@ -0,0 +1,35 @@
package com.example.fitbot.speech;
import com.aldebaran.qi.sdk.QiContext;
import com.aldebaran.qi.sdk.builder.SayBuilder;
import com.aldebaran.qi.sdk.object.locale.Language;
import com.aldebaran.qi.sdk.object.locale.Locale;
import com.aldebaran.qi.sdk.object.locale.Region;
public class SpeechGenerator {
private static final Locale DUTCH_LOCALE = new Locale(Language.DUTCH, Region.NETHERLANDS);
private SayBuilder builder;
/**
* Function for making the robot say something with DUTCH_LOCALE as locale
* @param phrase The phrase to make the robot say
* @param ctx The QiContext to use
*/
public static void say(String phrase, QiContext ctx)
{
say(phrase, ctx, DUTCH_LOCALE);
}
public static void say(String text, QiContext ctx, Locale locale)
{
SayBuilder.with(ctx)
.withLocale(locale)
.withText(text)
.build()
.run();
}
}

View File

@@ -0,0 +1,18 @@
package com.example.fitbot.sports;
public enum ESportType {
FITNESS("Fitness"),
POWER("Krachttrening");
private final String name;
ESportType(String name) {
this.name = name;
}
public String getName() {
return name;
}
}

View File

@@ -0,0 +1,21 @@
package com.example.fitbot.ui;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import com.example.fitbot.R;
public class SportItemActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sport_item);
}
@Override
protected void onDestroy() {
super.onDestroy();
}
}

View File

@@ -0,0 +1,22 @@
package com.example.fitbot.ui;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import com.example.fitbot.R;
public class SportMenuActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sport_menu);
}
@Override
protected void onDestroy() {
super.onDestroy();
}
}

View File

@@ -0,0 +1,45 @@
package com.example.fitbot.ui;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.view.View;
import com.example.fitbot.sports.ESportType;
public class SportMenuItem extends View {
private Paint backgroundPaint, textPaint;
private String title, description;
private Bitmap imageResource;
private Rect imageRect, elementRect;
private ESportType type;
public SportMenuItem(Context context, ESportType type, String title, String description, Bitmap backgroundImage) {
super(context);
this.title = title;
this.description = description;
this.imageResource = backgroundImage;
this.imageRect = new Rect(0, 0, this.imageResource.getWidth(), this.imageResource.getHeight());
this.elementRect = new Rect(0, 0, this.getWidth(), this.getHeight());
this.type = type;
this.backgroundPaint = new Paint();
this.textPaint = new Paint();
this.textPaint.setTextAlign(Paint.Align.CENTER);
this.backgroundPaint.setColor(0xFFF0F0F0);
this.textPaint.setColor(0xFF000000);
this.setOnClickListener(v -> context.startActivity(new Intent(context, SportItemActivity.class)));
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
canvas.drawBitmap(this.imageResource, this.imageRect, this.elementRect, null);
canvas.drawRoundRect(0, 0, getWidth(), getHeight(), 10, 10, backgroundPaint);
canvas.drawText(title, getWidth() / 2.0f, this.textPaint.getFontMetrics().top, textPaint);
}
}

View File

@@ -15,4 +15,13 @@
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/menu_switch_btn"
android:layout_width="200dp"
android:layout_height="50dp"
android:text="Go to Sport Menu"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
/>
</android.support.constraint.ConstraintLayout>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.constraint.ConstraintLayout>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:context=".ui.SportMenuActivity">
<com.example.fitbot.ui.SportMenuItem
android:id="@+id/sportMenuItem1"
android:layout_width="300dp"
android:layout_height="300dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>

View File

@@ -0,0 +1,12 @@
## Summary week 1, sprint 1
---
As a team, we mostly worked together on figuring out what project we'd
like to work on. We did this on the first day (Tuesday) and we decided to
make a robot that promotes sports activities for the elderly.
On Wednesday we started making graphs for the project, to visualize all the
required components and how they would interact with each other.
The rest of the time we were mostly working on figuring out how to work
with Android Studio and QiSDK, which was quite a hassle.

View File

@@ -0,0 +1,7 @@
## Summary week 2, sprint 1
---
In the second week, most of us figured out how to work with the IDE
and got the SDK's to work. We've made the robot say things, and we're
currently working on adding a UI part to the robot.

View File

@@ -13,7 +13,7 @@ Betoog op basis van literatuuronderzoek van minimaal 1000 tot maximaal 1500 woor
Waar gaat je betoog over?
Het helpen van ouderen met fitness door middel van robots.
Hoe ethisch verantwoord is het om robots in te zetten in de ouderenzorg om ouderen te helpen met fitness?
**B. AANLEIDING** De aanleiding en/of context van het thema/vraagstuk is:
@@ -43,7 +43,7 @@ Waar liggen de grenzen van de inzet van robots in de zorg voor ouderen wat fitne
Welke vraag ga je beantwoorden in je betoog?
In hoeverre kunnen robots worden ingezet om ouderen te helpen met fitness?
In hoeverre is het etisch verantwoord om robots in te zetten in de ouderenzorg om ouderen te helpen met fitness?
**H. BEGRIPSOMSCHRIJVING** De volgende begrippen uit mijn vraagstelling definieer ik als: