├── .gitignore
├── COPYING.md
├── README.md
├── User_Guide-Best_Practices_for_Navigation.md
├── app
├── .gitignore
├── build.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── assets
│ └── robot
│ │ └── robotsdk.xml
│ ├── ic_launcher-web.png
│ ├── java
│ └── com
│ │ └── softbankrobotics
│ │ └── maplocalizeandmove
│ │ ├── Fragments
│ │ ├── GoToFrameFragment.java
│ │ ├── LoadingFragment.java
│ │ ├── LocalizeAndMapFragment.java
│ │ ├── LocalizeRobotFragment.java
│ │ ├── MainFragment.java
│ │ ├── ProductionFragment.java
│ │ ├── SaveLocationsFragment.java
│ │ ├── SetupFragment.java
│ │ └── SplashFragment.java
│ │ ├── MainActivity.java
│ │ └── Utils
│ │ ├── GoToHelper.java
│ │ ├── LocalizeAndMapHelper.java
│ │ ├── NavUtils.java
│ │ ├── PointsOfInterestView.kt
│ │ ├── Popup.java
│ │ ├── RobotHelper.java
│ │ ├── SaveFileHelper.java
│ │ └── Vector2theta.java
│ └── res
│ ├── anim
│ ├── enter_fade_in_left.xml
│ ├── enter_fade_in_right.xml
│ ├── exit_fade_out_left.xml
│ ├── exit_fade_out_right.xml
│ └── pulse.xml
│ ├── drawable-v24
│ └── ic_launcher_foreground.xml
│ ├── drawable
│ ├── charging_sation.png
│ ├── dropdown_icon.png
│ ├── ic_360map_bg.xml
│ ├── ic_btn_add_full.xml
│ ├── ic_btn_back.xml
│ ├── ic_btn_close.xml
│ ├── ic_btn_del.xml
│ ├── ic_btn_del_round.xml
│ ├── ic_btn_goto.xml
│ ├── ic_btn_ok.xml
│ ├── ic_btn_save_down.xml
│ ├── ic_btn_save_up.xml
│ ├── ic_del_btn.xml
│ ├── ic_dot_followone.xml
│ ├── ic_dot_followthree.xml
│ ├── ic_dot_followtwo.xml
│ ├── ic_dot_full.xml
│ ├── ic_dot_outline.xml
│ ├── ic_icn_goto_frame.xml
│ ├── ic_icn_goto_frame_error.xml
│ ├── ic_icn_goto_frame_error_update.xml
│ ├── ic_icn_goto_frame_notavailable.xml
│ ├── ic_icn_goto_frame_ok.xml
│ ├── ic_icn_goto_frame_ok_update.xml
│ ├── ic_icn_localize_and_map.xml
│ ├── ic_icn_localize_done.xml
│ ├── ic_icn_localize_error.xml
│ ├── ic_icn_localize_robot_burgermenu.xml
│ ├── ic_icn_localize_robot_burgermenu_notavailable.xml
│ ├── ic_icn_localize_robot_burgermenu_oklocation.xml
│ ├── ic_icn_map_positions.xml
│ ├── ic_icn_mapping.xml
│ ├── ic_icn_nolocation.xml
│ ├── ic_icn_productionmode.xml
│ ├── ic_icn_save_frames.xml
│ ├── ic_icn_save_frames_ok.xml
│ ├── ic_icn_setupmode.xml
│ ├── ic_icn_warning.xml
│ ├── ic_ils_pushpepper.xml
│ ├── ic_ils_trap_ac_pepper.xml
│ ├── ic_ils_trap_close_ac_pepper.xml
│ ├── ic_launcher_background.xml
│ ├── ic_location.xml
│ ├── ic_separation_list.xml
│ ├── ic_separation_menu.xml
│ ├── spinner.xml
│ ├── spinner_boarder.xml
│ └── ui_pepper.png
│ ├── font
│ ├── verdana.ttf
│ ├── verdanab.ttf
│ ├── verdanai.ttf
│ └── verdanaz.ttf
│ ├── layout
│ ├── activity_main.xml
│ ├── fragment_goto_frame.xml
│ ├── fragment_loading.xml
│ ├── fragment_localize_and_map.xml
│ ├── fragment_localize_robot.xml
│ ├── fragment_main.xml
│ ├── fragment_production.xml
│ ├── fragment_save_locations.xml
│ ├── fragment_setup.xml
│ ├── fragment_splash.xml
│ ├── item_location_list.xml
│ ├── item_location_list_goto.xml
│ ├── popup_backup_locations_confirmation.xml
│ ├── popup_existing_or_new_map.xml
│ ├── popup_goto.xml
│ ├── popup_localized.xml
│ ├── popup_map_saved.xml
│ ├── popup_no_locations_to_load.xml
│ ├── popup_no_map_to_load.xml
│ └── popup_tutorial_save_attached_frame.xml
│ ├── mipmap-anydpi-v26
│ ├── ic_launcher.xml
│ ├── ic_launcher_round.xml
│ └── ic_logo_framework_round.xml
│ ├── mipmap-hdpi
│ ├── ic_launcher.png
│ ├── ic_launcher_round.png
│ ├── ic_logo_framework_round.png
│ └── ic_logo_placeholder_foreground.png
│ ├── mipmap-mdpi
│ ├── ic_launcher.png
│ ├── ic_launcher_round.png
│ ├── ic_logo_framework_round.png
│ └── ic_logo_placeholder_foreground.png
│ ├── mipmap-xhdpi
│ ├── ic_launcher.png
│ ├── ic_launcher_round.png
│ ├── ic_logo_framework_round.png
│ └── ic_logo_placeholder_foreground.png
│ ├── mipmap-xxhdpi
│ ├── ic_launcher.png
│ ├── ic_launcher_round.png
│ ├── ic_logo_framework_round.png
│ └── ic_logo_placeholder_foreground.png
│ ├── mipmap-xxxhdpi
│ ├── ic_launcher.png
│ ├── ic_launcher_round.png
│ ├── ic_logo_framework_round.png
│ └── ic_logo_placeholder_foreground.png
│ ├── raw
│ ├── full_turn_with_stop.pmt
│ ├── goto_loader.json
│ ├── idle.qianim
│ └── loader.json
│ └── values
│ ├── colors.xml
│ ├── ic_launcher_background.xml
│ ├── ic_logo_placeholder_background.xml
│ ├── strings.xml
│ └── styles.xml
├── autonomousrecharge
├── build.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ └── java
│ └── com
│ └── aldebaran
│ └── qi
│ └── sdk
│ └── autonomousrecharge
│ ├── AutonomousRecharge.kt
│ ├── AutonomousRechargeListeners.kt
│ └── RechargeRequestReceiver.kt
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── screen_shots
├── Anchor_points_Showroom.png
├── Path1.png
├── Path2.png
├── Path3.png
├── PathWithChargingStation.png
├── exploMap.png
├── screen1.png
├── screen3.png
└── screen5.png
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle/*
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 | ### JetBrains template
11 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
12 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
13 |
14 | # User-specific stuff:
15 | .idea
16 |
17 | # Sensitive or high-churn files:
18 | .idea/dataSources/
19 | .idea/dataSources.ids
20 | .idea/dataSources.xml
21 | .idea/dataSources.local.xml
22 | .idea/sqlDataSources.xml
23 | .idea/dynamic.xml
24 | .idea/uiDesigner.xml
25 |
26 | # Gradle:
27 | .idea/gradle.xml
28 | .idea/libraries
29 |
30 | # Mongo Explorer plugin:
31 | .idea/mongoSettings.xml
32 |
33 | ## File-based project format:
34 | *.iws
35 |
36 | ## Plugin-specific files:
37 |
38 | # IntelliJ
39 | /out/
40 |
41 | # mpeltonen/sbt-idea plugin
42 | .idea_modules/
43 |
44 | # JIRA plugin
45 | atlassian-ide-plugin.xml
46 |
47 | # Crashlytics plugin (for Android Studio and IntelliJ)
48 | com_crashlytics_export_strings.xml
49 | crashlytics.properties
50 | crashlytics-build.properties
51 | fabric.properties
52 | ### Java template
53 | *.class
54 |
55 | # BlueJ files
56 | *.ctxt
57 |
58 | # Mobile Tools for Java (J2ME)
59 | .mtj.tmp/
60 |
61 | # Package Files #
62 | *.jar
63 | *.war
64 | *.ear
65 |
66 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
67 | hs_err_pid*
68 | ### Android template
69 | # Built application files
70 | *.apk
71 | *.ap_
72 |
73 | # Files for the ART/Dalvik VM
74 | *.dex
75 |
76 | # Java class files
77 | *.class
78 |
79 | # Generated files
80 | bin/
81 | gen/
82 | out/
83 |
84 | # Gradle files
85 | .gradle/
86 | build/
87 | gradle.properties
88 | # Local configuration file (sdk path, etc)
89 | local.properties
90 |
91 | # Proguard folder generated by Eclipse
92 | proguard/
93 |
94 | # Log Files
95 | *.log
96 |
97 | # Android Studio Navigation editor temp files
98 | .navigation/
99 |
100 | # Android Studio captures folder
101 | captures/
102 |
103 | # Intellij
104 | *.iml
105 | .idea/workspace.xml
106 | .idea/tasks.xml
107 | .idea/libraries
108 |
109 | # Keystore files
110 | *.jks
111 |
112 | # External native build folder generated in Android Studio 2.2 and later
113 | .externalNativeBuild
114 | ### Gradle template
115 | .gradle
116 | /build/
117 |
118 | # Ignore Gradle GUI config
119 | gradle-app.setting
120 |
121 | # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
122 | !gradle-wrapper.jar
123 |
124 | # Cache of project
125 | .gradletasknamecache
126 |
127 | # # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
128 | # gradle/wrapper/gradle-wrapper.properties
129 |
130 | # idea misc
131 | .idea/misc.xml
132 |
--------------------------------------------------------------------------------
/COPYING.md:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011-2020, SoftBank Robotics Europe
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above copyright
10 | notice, this list of conditions and the following disclaimer in the
11 | documentation and/or other materials provided with the distribution.
12 | * Neither the name of the SoftBank Robotics Europe nor the
13 | names of its contributors may be used to endorse or promote products
14 | derived from this software without specific prior written permission.
15 |
16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | DISCLAIMED. IN NO EVENT SHALL SoftBank Robotics Europe BE LIABLE FOR ANY
20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | /debug
3 | /release
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'kotlin-android'
3 |
4 | android {
5 | compileSdkVersion 30
6 | defaultConfig {
7 | applicationId "com.softbankrobotics.maplocalizeandmove"
8 | minSdkVersion 23
9 | targetSdkVersion 30
10 | versionCode 147
11 | versionName "1.4.7"
12 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
13 | setProperty("archivesBaseName", "maplocalizeandmove-$versionName")
14 | }
15 | buildTypes {
16 | release {
17 | minifyEnabled false
18 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
19 | }
20 | }
21 | compileOptions {
22 | sourceCompatibility = '1.8'
23 | targetCompatibility = '1.8'
24 | }
25 | splits {
26 | abi {
27 | enable true
28 | reset()
29 | include "x86", "armeabi-v7a"
30 | universalApk false
31 | }
32 | }
33 | }
34 |
35 | dependencies {
36 | implementation fileTree(dir: 'libs', include: ['*.jar'])
37 | implementation 'androidx.appcompat:appcompat:1.2.0'
38 | implementation 'androidx.cardview:cardview:1.0.0'
39 | implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
40 | implementation('com.airbnb.android:lottie:2.7.0') {
41 | exclude group: 'com.android.support', module: 'support-v7'
42 | exclude group: 'com.android.support', module: 'support-v4'
43 | exclude group: 'com.android.support', module: 'design'
44 | exclude group: 'com.android.support', module: 'recyclerview'
45 | exclude group: 'com.android.support', module: 'transition'
46 | }
47 | // Gson
48 | implementation 'com.google.code.gson:gson:2.8.6'
49 |
50 | // Kotlin
51 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
52 |
53 | // QiSDK
54 | implementation 'com.aldebaran:qisdk:1.7.5'
55 | implementation 'com.aldebaran:qisdk-design:1.7.5'
56 | implementation project(path: ':autonomousrecharge')
57 |
58 | implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.0'
59 | implementation 'org.apache.commons:commons-math3:3.6.1'
60 | implementation 'com.github.softbankrobotics-labs:pepper-extras:1.1.1'
61 | }
62 | repositories {
63 | mavenCentral()
64 | }
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/assets/robot/robotsdk.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/ic_launcher-web.png
--------------------------------------------------------------------------------
/app/src/main/java/com/softbankrobotics/maplocalizeandmove/Fragments/LoadingFragment.java:
--------------------------------------------------------------------------------
1 | package com.softbankrobotics.maplocalizeandmove.Fragments;
2 |
3 | import android.content.Context;
4 | import android.os.Bundle;
5 |
6 | import androidx.annotation.Nullable;
7 |
8 | import android.util.Log;
9 | import android.view.ContextThemeWrapper;
10 | import android.view.LayoutInflater;
11 | import android.view.View;
12 | import android.view.ViewGroup;
13 | import android.view.animation.Animation;
14 | import android.view.animation.AnimationUtils;
15 | import android.widget.TextView;
16 |
17 | import androidx.fragment.app.Fragment;
18 |
19 | import com.softbankrobotics.maplocalizeandmove.MainActivity;
20 | import com.softbankrobotics.maplocalizeandmove.R;
21 |
22 | public class LoadingFragment extends Fragment {
23 |
24 | private static final String TAG = "MSI_LoadingFragment";
25 | private MainActivity ma;
26 |
27 | /**
28 | * Inflates the layout associated with this fragment.
29 | * If an application theme is set, it will be applied to this fragment.
30 | */
31 |
32 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
33 | Bundle savedInstanceState) {
34 | int fragmentId = R.layout.fragment_loading;
35 | this.ma = (MainActivity) getActivity();
36 | if (ma != null) {
37 | Integer themeId = ma.getThemeId();
38 | if (themeId != null) {
39 | final Context contextThemeWrapper = new ContextThemeWrapper(ma, themeId);
40 | LayoutInflater localInflater = inflater.cloneInContext(contextThemeWrapper);
41 | return localInflater.inflate(fragmentId, container, false);
42 | } else {
43 | return inflater.inflate(fragmentId, container, false);
44 | }
45 | } else {
46 | Log.d(TAG, "could not get mainActivity, can't create fragment");
47 | return null;
48 | }
49 | }
50 |
51 | @Override
52 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
53 | TextView textLoading = view.findViewById(R.id.loading_text);
54 | Animation animPulse = AnimationUtils.loadAnimation(ma, R.anim.pulse);
55 | textLoading.startAnimation(animPulse);
56 | }
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/app/src/main/java/com/softbankrobotics/maplocalizeandmove/Fragments/LocalizeRobotFragment.java:
--------------------------------------------------------------------------------
1 | package com.softbankrobotics.maplocalizeandmove.Fragments;
2 |
3 | import android.content.Context;
4 | import android.os.Bundle;
5 | import android.util.Log;
6 | import android.view.ContextThemeWrapper;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 | import android.widget.Button;
11 | import android.widget.ImageView;
12 |
13 | import androidx.annotation.Nullable;
14 | import androidx.fragment.app.Fragment;
15 |
16 | import com.airbnb.lottie.LottieAnimationView;
17 | import com.aldebaran.qi.sdk.util.FutureUtils;
18 | import com.softbankrobotics.maplocalizeandmove.MainActivity;
19 | import com.softbankrobotics.maplocalizeandmove.R;
20 | import com.softbankrobotics.maplocalizeandmove.Utils.LocalizeAndMapHelper;
21 | import com.softbankrobotics.maplocalizeandmove.Utils.Popup;
22 |
23 | import java.util.concurrent.TimeUnit;
24 |
25 | public class LocalizeRobotFragment extends Fragment {
26 |
27 | private static final String TAG = "MSI_LocalizeRobot";
28 | private MainActivity ma;
29 | private Popup localizedPopup;
30 |
31 | /**
32 | * Inflates the layout associated with this fragment
33 | * If an application theme is set, it will be applied to this fragment.
34 | */
35 |
36 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
37 | Bundle savedInstanceState) {
38 | int fragmentId = R.layout.fragment_localize_robot;
39 | this.ma = (MainActivity) getActivity();
40 | if (ma != null) {
41 | Integer themeId = ma.getThemeId();
42 | if (themeId != null) {
43 | final Context contextThemeWrapper = new ContextThemeWrapper(ma, themeId);
44 | LayoutInflater localInflater = inflater.cloneInContext(contextThemeWrapper);
45 | return localInflater.inflate(fragmentId, container, false);
46 | } else {
47 | return inflater.inflate(fragmentId, container, false);
48 | }
49 | } else {
50 | Log.d(TAG, "could not get mainActivity, can't create fragment");
51 | return null;
52 | }
53 | }
54 |
55 | @Override
56 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
57 | LocalizeRobotFragment currentFragment = (LocalizeRobotFragment) ma.getFragment();
58 | Button back_button = view.findViewById(R.id.back_button);
59 | back_button.setOnClickListener((v) -> {
60 | ma.stopLocalizing();
61 | ma.setFragment(new ProductionFragment(), true);
62 | ma.robotHelper.localizeAndMapHelper.removeOnFinishedLocalizingListeners();
63 |
64 | });
65 | Button stopLocalize = view.findViewById(R.id.button_stop_save);
66 | stopLocalize.setOnClickListener((v) -> ma.stopLocalizing());
67 |
68 | Button retry_Button = view.findViewById(R.id.button_retry);
69 | LottieAnimationView localizing_at_home = view.findViewById(R.id.localizing_at_home);
70 | ImageView localizing_error = view.findViewById(R.id.localizing_error);
71 |
72 | localizedPopup = new Popup(R.layout.popup_localized, this, ma);
73 | Button close_button = localizedPopup.inflator.findViewById(R.id.close_button);
74 | close_button.setOnClickListener((v) -> {
75 | localizedPopup.dialog.hide();
76 | ma.setFragment(new GoToFrameFragment(), false);
77 | });
78 |
79 | ma.robotHelper.localizeAndMapHelper.addOnFinishedLocalizingListener(result -> {
80 | ma.robotIsLocalized.set(result == LocalizeAndMapHelper.LocalizationStatus.LOCALIZED);
81 | ma.robotHelper.releaseAbilities();
82 | ma.runOnUiThread(() -> {
83 | if (result == LocalizeAndMapHelper.LocalizationStatus.LOCALIZED) {
84 | ma.robotLocalizedOnce = true;
85 | localizedPopup.dialog.show();
86 | localizedPopup.dialog.getWindow().setAttributes(localizedPopup.lp);
87 | FutureUtils.wait(4, TimeUnit.SECONDS)
88 | .thenConsume(aUselessFutureB -> ma.runOnUiThread(() -> {
89 | if (currentFragment.isVisible()) {
90 | ma.setFragment(new GoToFrameFragment(), false);
91 | localizedPopup.dialog.hide();
92 | }
93 | }));
94 | ma.robotHelper.localizeAndMapHelper.removeOnFinishedLocalizingListeners();
95 | } else if (result == LocalizeAndMapHelper.LocalizationStatus.MAP_MISSING) {
96 | noMapToLoad();
97 | ma.robotHelper.localizeAndMapHelper.removeOnFinishedLocalizingListeners();
98 | } else if (result == LocalizeAndMapHelper.LocalizationStatus.FAILED) {
99 | stopLocalize.setVisibility(View.GONE);
100 | localizing_at_home.setVisibility(View.GONE);
101 | localizing_error.setVisibility(View.VISIBLE);
102 | retry_Button.setVisibility(View.VISIBLE);
103 | retry_Button.setOnClickListener((v) -> {
104 | ma.startLocalizing();
105 | retry_Button.setVisibility(View.GONE);
106 | localizing_error.setVisibility(View.GONE);
107 | stopLocalize.setVisibility(View.VISIBLE);
108 | localizing_at_home.setVisibility(View.VISIBLE);
109 | });
110 | } else {
111 | Log.d(TAG, "onViewCreated: Unable to localize in Map");
112 | }
113 | });
114 | });
115 | ma.startLocalizing();
116 | }
117 |
118 |
119 | /**
120 | * If there is no map to load from memory, display a popup to inform the user.
121 | */
122 | private void noMapToLoad() {
123 | Popup noMapToLoad = new Popup(R.layout.popup_no_map_to_load, this, ma);
124 | Button close = noMapToLoad.inflator.findViewById(R.id.close_button);
125 | close.setOnClickListener((v) -> {
126 | noMapToLoad.dialog.hide();
127 | ma.setFragment(new SetupFragment(), true);
128 | });
129 | noMapToLoad.dialog.show();
130 | }
131 |
132 | }
133 |
--------------------------------------------------------------------------------
/app/src/main/java/com/softbankrobotics/maplocalizeandmove/Fragments/MainFragment.java:
--------------------------------------------------------------------------------
1 | package com.softbankrobotics.maplocalizeandmove.Fragments;
2 |
3 | import android.content.Context;
4 | import android.os.Bundle;
5 | import android.util.Log;
6 | import android.view.ContextThemeWrapper;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 |
11 | import androidx.annotation.Nullable;
12 | import androidx.fragment.app.Fragment;
13 |
14 | import com.softbankrobotics.maplocalizeandmove.MainActivity;
15 | import com.softbankrobotics.maplocalizeandmove.R;
16 |
17 | public class MainFragment extends Fragment {
18 |
19 | private static final String TAG = "MSI_MainFragment";
20 | private MainActivity ma;
21 |
22 | /**
23 | * Inflates the layout associated with this fragment
24 | * If an application theme is set, it will be applied to this fragment.
25 | */
26 |
27 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
28 | Bundle savedInstanceState) {
29 | int fragmentId = R.layout.fragment_main;
30 | this.ma = (MainActivity) getActivity();
31 | if (ma != null) {
32 | Integer themeId = ma.getThemeId();
33 | if (themeId != null) {
34 | final Context contextThemeWrapper = new ContextThemeWrapper(ma, themeId);
35 | LayoutInflater localInflater = inflater.cloneInContext(contextThemeWrapper);
36 | return localInflater.inflate(fragmentId, container, false);
37 | } else {
38 | return inflater.inflate(fragmentId, container, false);
39 | }
40 | } else {
41 | Log.d(TAG, "could not get mainActivity, can't create fragment");
42 | return null;
43 | }
44 | }
45 |
46 | @Override
47 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
48 | view.findViewById(R.id.button_setup_mode).setOnClickListener(
49 | (v) -> ma.setFragment(new SetupFragment(), false));
50 | view.findViewById(R.id.button_production_mode).setOnClickListener(
51 | (v) -> ma.setFragment(new ProductionFragment(), false));
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/app/src/main/java/com/softbankrobotics/maplocalizeandmove/Fragments/ProductionFragment.java:
--------------------------------------------------------------------------------
1 | package com.softbankrobotics.maplocalizeandmove.Fragments;
2 |
3 | import android.content.Context;
4 | import android.os.Bundle;
5 |
6 | import androidx.annotation.Nullable;
7 |
8 | import android.util.Log;
9 | import android.view.ContextThemeWrapper;
10 | import android.view.LayoutInflater;
11 | import android.view.View;
12 | import android.view.ViewGroup;
13 | import android.widget.Button;
14 |
15 | import androidx.fragment.app.Fragment;
16 |
17 | import com.softbankrobotics.maplocalizeandmove.MainActivity;
18 | import com.softbankrobotics.maplocalizeandmove.R;
19 |
20 | import java.util.concurrent.ExecutionException;
21 |
22 | public class ProductionFragment extends Fragment {
23 |
24 | private static final String TAG = "MSI_ProductionFragment";
25 | private MainActivity ma;
26 |
27 | /**
28 | * Inflates the layout associated with this fragment
29 | * If an application theme is set, it will be applied to this fragment.
30 | */
31 |
32 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
33 | Bundle savedInstanceState) {
34 | int fragmentId = R.layout.fragment_production;
35 | this.ma = (MainActivity) getActivity();
36 | if (ma != null) {
37 | Integer themeId = ma.getThemeId();
38 | if (themeId != null) {
39 | final Context contextThemeWrapper = new ContextThemeWrapper(ma, themeId);
40 | LayoutInflater localInflater = inflater.cloneInContext(contextThemeWrapper);
41 | return localInflater.inflate(fragmentId, container, false);
42 | } else {
43 | return inflater.inflate(fragmentId, container, false);
44 | }
45 | } else {
46 | Log.d(TAG, "could not get mainActivity, can't create fragment");
47 | return null;
48 | }
49 | }
50 |
51 | @Override
52 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
53 | view.findViewById(R.id.back_button).setOnClickListener((v) ->
54 | ma.setFragment(new MainFragment(), true));
55 | Button startLocalizeButton = view.findViewById(R.id.button_start_localize);
56 |
57 | startLocalizeButton.setOnClickListener((v) -> {
58 | if (!ma.robotHelper.askToCloseIfFlapIsOpened()) {
59 | ma.setFragment(new LocalizeRobotFragment(), false);
60 | }
61 | });
62 | Button goToFrameButton = view.findViewById(R.id.goToFrame);
63 | goToFrameButton.setOnClickListener((v) -> ma.setFragment(new GoToFrameFragment(), false));
64 |
65 | if (ma.savedLocations.isEmpty()) {
66 | try {
67 | ma.loadLocations().get();
68 | } catch (ExecutionException e) {
69 | e.printStackTrace();
70 | }
71 | }
72 |
73 | Button undock = view.findViewById(R.id.goto_undock);
74 | undock.setOnClickListener(v -> {
75 | if (ma.robotLocalizedOnce && ma.savedLocations.containsKey("ChargingStation")) {
76 | if (ma.robotHelper.goToHelper.isDocked(ma.savedLocations.get("ChargingStation")).getValue()) {
77 | ma.undockFromChargingStation();
78 | } else {
79 | ma.robotHelper.say("I can't undock from ChargingStation as I am not docked");
80 | Log.d(TAG, "Can't undock from ChargingStation as not docked");
81 | }
82 | } else if (ma.robotHelper.goToHelper.isDocked(null).getValue()) {
83 | ma.undockFromChargingStation();
84 | } else {
85 | ma.robotHelper.say("I can't undock from ChargingStation as I am not docked");
86 | Log.d(TAG, "Can't undock from ChargingStation as not docked & no ChargingStation frame saved");
87 | }
88 | });
89 |
90 | // GoToFrameFragment is available only if Pepper is localized.
91 | if (ma.robotIsLocalized.get()) {
92 | goToFrameButton.setEnabled(true);
93 | goToFrameButton.setAlpha(1);
94 | goToFrameButton.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.ic_icn_goto_frame, 0, 0);
95 | startLocalizeButton.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.ic_icn_localize_robot_burgermenu_oklocation, 0, 0);
96 | }
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/app/src/main/java/com/softbankrobotics/maplocalizeandmove/Fragments/SetupFragment.java:
--------------------------------------------------------------------------------
1 | package com.softbankrobotics.maplocalizeandmove.Fragments;
2 |
3 | import android.content.Context;
4 | import android.os.Bundle;
5 |
6 | import androidx.annotation.Nullable;
7 |
8 | import android.util.Log;
9 | import android.view.ContextThemeWrapper;
10 | import android.view.LayoutInflater;
11 | import android.view.View;
12 | import android.view.ViewGroup;
13 | import android.widget.Button;
14 |
15 | import androidx.fragment.app.Fragment;
16 |
17 | import com.softbankrobotics.maplocalizeandmove.MainActivity;
18 | import com.softbankrobotics.maplocalizeandmove.R;
19 |
20 | public class SetupFragment extends Fragment {
21 |
22 | private static final String TAG = "MSI_SetupFragment";
23 | private MainActivity ma;
24 |
25 | /**
26 | * Inflates the layout associated with this fragment
27 | * If an application theme is set, it will be applied to this fragment.
28 | */
29 |
30 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
31 | Bundle savedInstanceState) {
32 | int fragmentId = R.layout.fragment_setup;
33 | this.ma = (MainActivity) getActivity();
34 | if (ma != null) {
35 | Integer themeId = ma.getThemeId();
36 | if (themeId != null) {
37 | final Context contextThemeWrapper = new ContextThemeWrapper(ma, themeId);
38 | LayoutInflater localInflater = inflater.cloneInContext(contextThemeWrapper);
39 | return localInflater.inflate(fragmentId, container, false);
40 | } else {
41 | return inflater.inflate(fragmentId, container, false);
42 | }
43 | } else {
44 | Log.d(TAG, "could not get mainActivity, can't create fragment");
45 | return null;
46 | }
47 | }
48 |
49 | @Override
50 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
51 | view.findViewById(R.id.button_localize_and_map).setOnClickListener((v) -> {
52 | if (!ma.robotHelper.askToCloseIfFlapIsOpened()) {
53 | ma.setFragment(new LocalizeAndMapFragment(), false);
54 | }
55 | });
56 |
57 | Button menuSaveLocations = view.findViewById(R.id.menu_save_location);
58 | menuSaveLocations.setOnClickListener((v) ->
59 | ma.setFragment(new SaveLocationsFragment(), false));
60 |
61 | view.findViewById(R.id.back_button).setOnClickListener((v) ->
62 | ma.setFragment(new MainFragment(), true));
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/app/src/main/java/com/softbankrobotics/maplocalizeandmove/Fragments/SplashFragment.java:
--------------------------------------------------------------------------------
1 | package com.softbankrobotics.maplocalizeandmove.Fragments;
2 |
3 | import android.content.Context;
4 | import android.os.Bundle;
5 |
6 | import androidx.annotation.Nullable;
7 |
8 | import android.util.Log;
9 | import android.view.ContextThemeWrapper;
10 | import android.view.LayoutInflater;
11 | import android.view.View;
12 | import android.view.ViewGroup;
13 |
14 | import androidx.fragment.app.Fragment;
15 |
16 | import com.softbankrobotics.maplocalizeandmove.MainActivity;
17 | import com.softbankrobotics.maplocalizeandmove.R;
18 |
19 | public class SplashFragment extends Fragment {
20 |
21 | private static final String TAG = "MSI_SplashFragment";
22 | private MainActivity ma;
23 |
24 | /**
25 | * Inflates the layout associated with this fragment
26 | * If an application theme is set, it will be applied to this fragment.
27 | */
28 |
29 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
30 | Bundle savedInstanceState) {
31 | int fragmentId = R.layout.fragment_splash;
32 | this.ma = (MainActivity) getActivity();
33 | if (ma != null) {
34 | Integer themeId = ma.getThemeId();
35 | if (themeId != null) {
36 | final Context contextThemeWrapper = new ContextThemeWrapper(ma, themeId);
37 | LayoutInflater localInflater = inflater.cloneInContext(contextThemeWrapper);
38 | return localInflater.inflate(fragmentId, container, false);
39 | } else {
40 | return inflater.inflate(fragmentId, container, false);
41 | }
42 | } else {
43 | Log.d(TAG, "could not get mainActivity, can't create fragment");
44 | return null;
45 | }
46 | }
47 |
48 | @Override
49 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
50 |
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/app/src/main/java/com/softbankrobotics/maplocalizeandmove/Utils/NavUtils.java:
--------------------------------------------------------------------------------
1 | package com.softbankrobotics.maplocalizeandmove.Utils;
2 |
3 | import com.aldebaran.qi.sdk.object.geometry.Quaternion;
4 |
5 | import static java.lang.Math.atan2;
6 |
7 | class NavUtils {
8 |
9 | private static final String TAG = "MSI_MapLocalizeAndMove";
10 |
11 | /**
12 | * Get the "yaw" (or "theta") angle from a quaternion (the only angle relevant for navigation).
13 | */
14 | static double getYawFromQuaternion(Quaternion q) {
15 | // yaw (z-axis rotation)
16 | double x = q.getX();
17 | double y = q.getY();
18 | double z = q.getZ();
19 | double w = q.getW();
20 | double sinYaw = 2.0 * (w * z + x * y);
21 | double cosYaw = 1.0 - 2.0 * (y * y + z * z);
22 | return atan2(sinYaw, cosYaw);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/java/com/softbankrobotics/maplocalizeandmove/Utils/PointsOfInterestView.kt:
--------------------------------------------------------------------------------
1 | package com.softbankrobotics.maplocalizeandmove.Utils
2 |
3 | import android.content.Context
4 | import android.graphics.Canvas
5 | import android.graphics.Color
6 | import android.graphics.Paint
7 | import android.graphics.PointF
8 | import android.util.AttributeSet
9 | import android.util.Log
10 | import com.softbankrobotics.dx.pepperextras.ui.ExplorationMapView
11 |
12 | class PointsOfInterestView(context: Context, attributeSet: AttributeSet): ExplorationMapView(context, attributeSet){
13 | override fun onDraw(canvas: Canvas) {
14 | super.onDraw(canvas)
15 | mapFramePosition?.let {
16 | canvas.drawCircle(it.x, it.y, poiCircleSize.toFloat(), mapFramePaint)
17 | }
18 |
19 | poiPositions?.let {
20 | for (poiPosition in it){
21 | canvas.drawCircle(poiPosition.x, poiPosition.y, poiCircleSize.toFloat(), poiPaint)
22 | }
23 | }
24 | }
25 |
26 | private val TAG = "MSI_PointsOfInterestView"
27 |
28 | // Size of the circle representing the robot
29 | private val poiCircleSize: Int = 10
30 |
31 | // Paint for the MapFrame
32 | private val mapFramePaint = Paint().apply {
33 | color = Color.BLUE
34 | style = Paint.Style.FILL
35 | }
36 |
37 | // Paint for the Poi
38 | private val poiPaint = Paint().apply {
39 | color = Color.GREEN
40 | style = Paint.Style.FILL
41 | }
42 |
43 |
44 | private var mapFramePosition : PointF? = null
45 | private var poiPositions : MutableList? = mutableListOf()
46 |
47 | fun setMapFramPosition() {
48 | // Compute the position of the robot in the View
49 | mapFramePosition = mapToViewCoordinates(0.0, 0.0)
50 | Log.i(TAG, "setMapFramPosition: x: ${mapFramePosition?.x}, y: ${mapFramePosition?.y}")
51 | postInvalidate()
52 | }
53 |
54 | fun setPoiPositions(positionsInMap: MutableList) {
55 | for (position in positionsInMap){
56 | poiPositions?.add(mapToViewCoordinates(position.x.toDouble(),position.y.toDouble()))
57 | }
58 | for (position in poiPositions!!){
59 | Log.i(TAG, "setPoiPositions: x: ${position.x}, y: ${position.y} ")
60 | }
61 | postInvalidate()
62 | }
63 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/softbankrobotics/maplocalizeandmove/Utils/Popup.java:
--------------------------------------------------------------------------------
1 | package com.softbankrobotics.maplocalizeandmove.Utils;
2 |
3 | import android.app.AlertDialog;
4 |
5 | import androidx.fragment.app.Fragment;
6 |
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.WindowManager;
10 |
11 | import com.softbankrobotics.maplocalizeandmove.MainActivity;
12 |
13 | public class Popup {
14 | public AlertDialog dialog;
15 | public View inflator;
16 | public WindowManager.LayoutParams lp;
17 |
18 | public Popup(int layout, Fragment saveLocationsFragment, MainActivity ma) {
19 | LayoutInflater inflaterPopup = saveLocationsFragment.getLayoutInflater();
20 | inflator = inflaterPopup.inflate(layout, null);
21 | AlertDialog.Builder builder = new AlertDialog.Builder(ma);
22 |
23 | setSystemUiVisibilityMode();
24 | inflator.setOnSystemUiVisibilityChangeListener(visibility -> {
25 | setSystemUiVisibilityMode(); // Needed to avoid exiting immersive_sticky when keyboard is displayed
26 | });
27 |
28 | builder.setView(inflator);
29 | dialog = builder.create();
30 |
31 | lp = new WindowManager.LayoutParams();
32 | lp.copyFrom(dialog.getWindow().getAttributes());
33 | lp.width = WindowManager.LayoutParams.MATCH_PARENT;
34 | lp.height = WindowManager.LayoutParams.MATCH_PARENT;
35 | }
36 |
37 | private void setSystemUiVisibilityMode() {
38 | int options;
39 | options = View.SYSTEM_UI_FLAG_LAYOUT_STABLE
40 | | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
41 | | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
42 | | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar
43 | | View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bar
44 | | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
45 |
46 | inflator.setSystemUiVisibility(options);
47 | }
48 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/softbankrobotics/maplocalizeandmove/Utils/Vector2theta.java:
--------------------------------------------------------------------------------
1 | package com.softbankrobotics.maplocalizeandmove.Utils;
2 |
3 | import android.os.Parcel;
4 | import android.os.Parcelable;
5 |
6 | import androidx.annotation.NonNull;
7 |
8 | import com.aldebaran.qi.sdk.builder.TransformBuilder;
9 | import com.aldebaran.qi.sdk.object.actuation.Frame;
10 | import com.aldebaran.qi.sdk.object.geometry.Quaternion;
11 | import com.aldebaran.qi.sdk.object.geometry.Transform;
12 | import com.aldebaran.qi.sdk.object.geometry.Vector3;
13 |
14 | import java.io.Serializable;
15 |
16 | public class Vector2theta implements Parcelable, Serializable {
17 | public static final Creator CREATOR = new Creator() {
18 | @Override
19 | public Vector2theta createFromParcel(Parcel in) {
20 | return new Vector2theta(in);
21 | }
22 |
23 | @Override
24 | public Vector2theta[] newArray(int size) {
25 | return new Vector2theta[size];
26 | }
27 | };
28 | private double x, y, theta;
29 |
30 | private Vector2theta(double x, double y, double theta) {
31 | this.x = x;
32 | this.y = y;
33 | this.theta = theta;
34 | }
35 |
36 | /***************** PARCELABLE REQUIREMENTS *******************/
37 |
38 | private Vector2theta(Parcel in) {
39 | x = in.readDouble();
40 | y = in.readDouble();
41 | theta = in.readDouble();
42 | }
43 |
44 | /**
45 | * Create a Vector2theta representing the translation between two frames and angle.
46 | *
47 | * @param frameOrigin the origin of the translation
48 | * @param frameDestination the end of the translation
49 | * @return the Vector2theta to go from frameOrigin to frameDestination
50 | */
51 | public static Vector2theta betweenFrames(@NonNull Frame frameDestination, @NonNull Frame frameOrigin) {
52 | // Compute the transform to go from "frameOrigin" to "frameDestination"
53 | Transform transform = frameOrigin.async().computeTransform(frameDestination).getValue().getTransform();
54 |
55 | // Extract translation from the transform
56 | Vector3 translation = transform.getTranslation();
57 | // Extract quaternion from the transform
58 | Quaternion quaternion = transform.getRotation();
59 |
60 | // Extract the 2 coordinates from the translation and orientation angle from quaternion
61 | return new Vector2theta(translation.getX(), translation.getY(), NavUtils.getYawFromQuaternion(quaternion));
62 | }
63 |
64 | /**
65 | * Return a Transform representing the translation described by this Vector2theta.
66 | *
67 | * @return the Transform
68 | */
69 | public Transform createTransform() {
70 | // this.theta is the radian angle to appy taht was serialized
71 | return TransformBuilder.create().from2DTransform(this.x, this.y, this.theta);
72 | }
73 |
74 | @Override
75 | public int describeContents() {
76 | return 0;
77 | }
78 |
79 | @Override
80 | public void writeToParcel(Parcel parcel, int i) {
81 | parcel.writeDouble(x);
82 | parcel.writeDouble(y);
83 | parcel.writeDouble(theta);
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/enter_fade_in_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
9 |
10 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/enter_fade_in_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
9 |
10 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/exit_fade_out_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
9 |
10 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/exit_fade_out_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
9 |
10 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/pulse.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
9 |
13 |
16 |
18 |
19 |
25 |
26 |
27 |
28 |
29 |
30 |
33 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/charging_sation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/drawable/charging_sation.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/dropdown_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/drawable/dropdown_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_360map_bg.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
7 |
10 |
12 |
15 |
19 |
21 |
24 |
27 |
28 |
31 |
34 |
36 |
39 |
42 |
43 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_btn_add_full.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_btn_back.xml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_btn_close.xml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_btn_del.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_btn_del_round.xml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_btn_goto.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_btn_ok.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_btn_save_down.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_btn_save_up.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
13 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_del_btn.xml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_dot_followone.xml:
--------------------------------------------------------------------------------
1 |
6 |
11 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_dot_followthree.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_dot_followtwo.xml:
--------------------------------------------------------------------------------
1 |
6 |
11 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_dot_full.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_dot_outline.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icn_goto_frame.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
14 |
16 |
17 |
23 |
24 |
25 |
26 |
27 |
28 |
31 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icn_goto_frame_error.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
14 |
17 |
21 |
25 |
29 |
31 |
32 |
38 |
39 |
40 |
41 |
42 |
43 |
46 |
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icn_goto_frame_error_update.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
14 |
17 |
21 |
25 |
29 |
31 |
32 |
38 |
39 |
40 |
41 |
42 |
43 |
46 |
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icn_goto_frame_notavailable.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
18 |
25 |
32 |
39 |
46 |
53 |
60 |
62 |
63 |
69 |
70 |
71 |
72 |
73 |
74 |
77 |
80 |
81 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icn_goto_frame_ok.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
14 |
16 |
17 |
23 |
24 |
25 |
26 |
27 |
28 |
31 |
34 |
38 |
41 |
42 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icn_goto_frame_ok_update.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
14 |
16 |
17 |
23 |
24 |
25 |
26 |
27 |
28 |
31 |
34 |
37 |
41 |
44 |
45 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icn_localize_and_map.xml:
--------------------------------------------------------------------------------
1 |
7 |
9 |
10 |
16 |
17 |
18 |
19 |
20 |
21 |
24 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icn_localize_done.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
21 |
25 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icn_localize_error.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
22 |
26 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icn_localize_robot_burgermenu.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icn_localize_robot_burgermenu_oklocation.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
13 |
16 |
19 |
21 |
22 |
28 |
29 |
30 |
31 |
32 |
33 |
36 |
40 |
44 |
48 |
52 |
56 |
60 |
63 |
64 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icn_map_positions.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
12 |
13 |
19 |
20 |
21 |
22 |
23 |
24 |
32 |
36 |
39 |
42 |
46 |
48 |
49 |
55 |
56 |
57 |
58 |
59 |
60 |
63 |
64 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icn_mapping.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
12 |
13 |
19 |
20 |
21 |
22 |
23 |
24 |
27 |
30 |
34 |
37 |
39 |
40 |
46 |
47 |
48 |
49 |
50 |
51 |
54 |
55 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icn_nolocation.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icn_productionmode.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
15 |
19 |
23 |
27 |
31 |
38 |
39 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
58 |
61 |
62 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icn_save_frames.xml:
--------------------------------------------------------------------------------
1 |
7 |
9 |
10 |
16 |
17 |
18 |
19 |
20 |
21 |
23 |
24 |
30 |
31 |
32 |
33 |
34 |
35 |
38 |
42 |
43 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icn_save_frames_ok.xml:
--------------------------------------------------------------------------------
1 |
7 |
9 |
10 |
16 |
17 |
18 |
19 |
20 |
21 |
23 |
24 |
30 |
31 |
32 |
33 |
34 |
35 |
38 |
41 |
45 |
48 |
49 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icn_setupmode.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
31 |
32 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
47 |
48 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
64 |
67 |
71 |
74 |
78 |
81 |
82 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_icn_warning.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_location.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_separation_list.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_separation_menu.xml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/spinner.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/spinner_boarder.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ui_pepper.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/drawable/ui_pepper.png
--------------------------------------------------------------------------------
/app/src/main/res/font/verdana.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/font/verdana.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/verdanab.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/font/verdanab.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/verdanai.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/font/verdanai.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/verdanaz.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/font/verdanaz.ttf
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_loading.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_localize_robot.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
25 |
26 |
27 |
43 |
44 |
61 |
62 |
76 |
77 |
92 |
93 |
104 |
105 |
116 |
117 |
130 |
131 |
145 |
146 |
147 |
148 |
149 |
150 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
20 |
21 |
40 |
41 |
60 |
61 |
74 |
75 |
92 |
93 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_production.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
20 |
21 |
40 |
41 |
58 |
59 |
76 |
77 |
87 |
88 |
103 |
104 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_save_locations.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
21 |
22 |
37 |
38 |
54 |
55 |
71 |
72 |
73 |
74 |
86 |
87 |
100 |
101 |
106 |
107 |
108 |
109 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_setup.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
20 |
21 |
40 |
41 |
60 |
61 |
74 |
75 |
85 |
86 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_splash.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_location_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
15 |
16 |
22 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_location_list_goto.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
15 |
16 |
23 |
24 |
31 |
32 |
42 |
43 |
50 |
51 |
52 |
53 |
59 |
60 |
70 |
71 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/popup_backup_locations_confirmation.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
18 |
29 |
30 |
45 |
46 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/popup_existing_or_new_map.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
28 |
29 |
41 |
42 |
59 |
60 |
72 |
73 |
91 |
92 |
101 |
102 |
103 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/popup_goto.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
22 |
23 |
34 |
35 |
44 |
45 |
52 |
53 |
54 |
64 |
65 |
75 |
76 |
88 |
89 |
90 |
99 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/popup_localized.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
18 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/popup_map_saved.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
18 |
27 |
28 |
38 |
39 |
50 |
51 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/popup_no_locations_to_load.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
18 |
32 |
33 |
44 |
45 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/popup_no_map_to_load.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
18 |
32 |
33 |
44 |
45 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_logo_framework_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_logo_framework_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/mipmap-hdpi/ic_logo_framework_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_logo_placeholder_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/mipmap-hdpi/ic_logo_placeholder_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_logo_framework_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/mipmap-mdpi/ic_logo_framework_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_logo_placeholder_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/mipmap-mdpi/ic_logo_placeholder_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_logo_framework_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/mipmap-xhdpi/ic_logo_framework_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_logo_placeholder_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/mipmap-xhdpi/ic_logo_placeholder_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_logo_framework_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/mipmap-xxhdpi/ic_logo_framework_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_logo_placeholder_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/mipmap-xxhdpi/ic_logo_placeholder_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_logo_framework_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/mipmap-xxxhdpi/ic_logo_framework_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_logo_placeholder_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/app/src/main/res/mipmap-xxxhdpi/ic_logo_placeholder_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/full_turn_with_stop.pmt:
--------------------------------------------------------------------------------
1 | [["Composed", ["Holonomic", ["Line", [0.000000000, 0.000000000]], 0, 4],["Holonomic", ["Line", [0.000000000, 0.000000000]], 0.785398, 2],["Holonomic", ["Line", [0.000000000, 0.000000000]], 0, 2],["Holonomic", ["Line", [0.000000000, 0.000000000]], 0.785398, 2],["Holonomic", ["Line", [0.000000000, 0.000000000]], 0, 2],["Holonomic", ["Line", [0.000000000, 0.000000000]], 0.785398, 2],["Holonomic", ["Line", [0.000000000, 0.000000000]], 0, 2],["Holonomic", ["Line", [0.000000000, 0.000000000]], 0.785398, 2],["Holonomic", ["Line", [0.000000000, 0.000000000]], 0, 2],["Holonomic", ["Line", [0.000000000, 0.000000000]], 0.785398, 2],["Holonomic", ["Line", [0.000000000, 0.000000000]], 0, 2],["Holonomic", ["Line", [0.000000000, 0.000000000]], 0.785398, 2],["Holonomic", ["Line", [0.000000000, 0.000000000]], 0, 2],["Holonomic", ["Line", [0.000000000, 0.000000000]], 0.785398, 2],["Holonomic", ["Line", [0.000000000, 0.000000000]], 0, 2],["Holonomic", ["Line", [0.000000000, 0.000000000]], 0.785398, 2]],0]
--------------------------------------------------------------------------------
/app/src/main/res/raw/idle.qianim:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/app/src/main/res/raw/loader.json:
--------------------------------------------------------------------------------
1 | {"v":"5.4.1","fr":24,"ip":0,"op":72,"w":340,"h":340,"nm":"icn_LOAD_360localize","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Calque 5 - copie 4/icn_localize_inprogress_loader Silhouettes 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":0,"s":[170,170,0],"e":[170,176,0],"to":[0,1,0],"ti":[0,1,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":24,"s":[170,176,0],"e":[170,164,0],"to":[0,-1,0],"ti":[0,1,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":48,"s":[170,164,0],"e":[170,170,0],"to":[0,-1,0],"ti":[0,-1,0]},{"t":73}],"ix":2},"a":{"a":0,"k":[170,170,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[18.525,-0.045],[0.045,18.25],[-18.525,0.045],[-0.045,-18.25]],"o":[[-18.526,0.043],[-0.045,-18.25],[18.526,-0.044],[0.044,18.252]],"v":[[0.119,-3.952],[-33.506,-36.917],[-0.044,-70.044],[33.582,-37.079]],"c":true},"ix":2},"nm":"Tracé 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0.04,16.132],[47.638,-0.114],[-0.116,-46.929],[-8.571,-13.165],[0,0],[0,0],[0,0],[0,0]],"o":[[-0.116,-46.929],[-47.637,0.115],[0.041,16.801],[0,0],[0,0],[0,0],[0,0],[7.892,-12.869]],"v":[[86.293,-37.204],[-0.172,-121.972],[-86.217,-36.792],[-72.597,8.807],[-72.902,8.811],[-0.308,122.087],[74.048,6.885],[73.915,6.889]],"c":true},"ix":2},"nm":"Tracé 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Fusionner les tracés 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.219999994016,0.395999983245,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[169.963,149.973],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Groupe 1","np":4,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":192,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Calque de forme 3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[170,282,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":0,"s":[80,80,100],"e":[105,105,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":24,"s":[105,105,100],"e":[60,60,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":48,"s":[60,60,100],"e":[80,80,100]},{"t":72}],"ix":6}},"ao":0,"shapes":[{"d":1,"ty":"el","s":{"a":0,"k":[50,20],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Tracé d'ellipse 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":0,"s":[0.921568632126,0.917954623699,0.917954623699,1],"e":[0.86274510622,0.86274510622,0.86274510622,1]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":24,"s":[0.86274510622,0.86274510622,0.86274510622,1],"e":[0.960784316063,0.960784316063,0.960784316063,1]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":48,"s":[0.960784316063,0.960784316063,0.960784316063,1],"e":[0.921568632126,0.917954623699,0.917954623699,1]},{"t":73}],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":192,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Calque de forme 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[170,281,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"d":1,"ty":"el","s":{"a":0,"k":[174,80],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Tracé d'ellipse 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":0,"s":[0],"e":[0]},{"i":{"x":[0.442],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p442_1_0p333_0"],"t":26.666,"s":[0],"e":[98]},{"t":60}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.5],"y":[1]},"o":{"x":[0.659],"y":[0.386]},"n":["0p5_1_0p659_0p386"],"t":0,"s":[0],"e":[100]},{"t":60}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Raccorder les tracés 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[0.847058832645,0.847058832645,0.847058832645,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":10,"ix":5},"lc":2,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false}],"ip":0,"op":192,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Calque de forme 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[170,281,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"d":1,"ty":"el","s":{"a":0,"k":[174,80],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Tracé d'ellipse 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0]},"n":["0p667_1_0p167_0"],"t":0,"s":[0],"e":[0]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":31,"s":[0],"e":[98]},{"t":70}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.5],"y":[1]},"o":{"x":[0.659],"y":[0.386]},"n":["0p5_1_0p659_0p386"],"t":0,"s":[0],"e":[100]},{"t":70}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Raccorder les tracés 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[0.466666668653,0.772549033165,0.835294127464,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false}],"ip":0,"op":192,"st":0,"bm":0},{"ddd":0,"ind":9,"ty":1,"nm":"Blanc uni 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[170,170,0],"ix":2},"a":{"a":0,"k":[170,170,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"sw":340,"sh":340,"sc":"#ffffff","ip":0,"op":192,"st":0,"bm":0}],"markers":[]}
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | #FFFFFF
8 | #000000
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #82416B
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/ic_logo_placeholder_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3C3F41
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | MapLocalize&Move
4 |
5 |
6 | Loading
7 |
8 |
9 | PRODUCTION MODE
10 | SETUP MODE
11 |
12 |
13 | Let\'s map the world
14 | LOCALIZE & MAP
15 | LOCALIZE MY ROBOT
16 |
17 |
18 | Let\'s explore the world
19 | Go to Frame
20 |
21 |
22 |
23 | Let\'s map the room
24 | Please stay away during initial mapping.
25 | Move me around the room to map.
26 | First open the Charging Flap on the back.
27 | Push me on the path you want to map in both directions.
28 | STOP & SAVE
29 |
30 |
31 | Let\'s save points of interest
32 | Save Locations
33 |
34 |
35 | Open my Charging Flap then place me where you want me to save the position.
36 | Cancel
37 | Yes
38 | Do you want to save this position?
39 | Location name
40 |
41 |
42 | Where am I ?
43 | Stay away during localization
44 | Stop
45 | Sorry, no location on memory to load
46 | Sorry, no map on memory to load.\nGo to Setup Mode and do a \"LOCALIZE & MAP\"
47 | Add Locations
48 | You are Home
49 | First, bring me home then close my Charging Flap !
50 | I need to localize
51 | Retry to localize
52 | Save Location
53 | Save Locations
54 | Do you want to exit without saving?
55 | Retry
56 | Save
57 | Saved
58 | Saving…
59 | location name X here
60 | Delete
61 | Please stay away from me during initial mapping!
62 | Please stay away from me while I localize myself!
63 | Location Reached
64 | GoTo random
65 | GoToMaxSpeed\ \ \ \
66 | GoToStraight\ \ \ \
67 | Stop random
68 | MultiplePointsInARow\ \ \ \ \
69 | GoTo Charge
70 | Extend existing map or create a new one ?
71 | Extend Map
72 | Create Map
73 | Warning : Function not available on 1.8a robot
74 | Undock
75 | GoToRouteLoop
76 | GoTo
77 | MapFrame
78 | I need to go charge myself but I am not localized!
79 | Skip
80 | Open my Charging Flap then place me on my Charging Station.
81 | Stopping Localize And Map, please stay away.
82 | Let\'s go !
83 | Full Turn
84 |
85 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/autonomousrecharge/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'kotlin-android'
3 | apply plugin: 'kotlin-android-extensions'
4 |
5 | android {
6 | compileSdkVersion 28
7 | defaultConfig {
8 | minSdkVersion 23
9 | targetSdkVersion 28
10 | versionName getVersion()
11 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
12 | }
13 | compileOptions {
14 | sourceCompatibility JavaVersion.VERSION_1_8
15 | targetCompatibility JavaVersion.VERSION_1_8
16 | }
17 | buildTypes {
18 | release {
19 | minifyEnabled false
20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
21 | }
22 | }
23 | }
24 |
25 | dependencies {
26 | // "libs" folder
27 | implementation fileTree(dir: 'libs', include: ['*.jar'])
28 |
29 | // AppCompat
30 | implementation 'androidx.appcompat:appcompat:1.2.0'
31 |
32 | // Kotlin
33 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
34 |
35 | // QiSDK
36 | api "$qisdk_group_id:qisdk:$qisdk_version"
37 | api "$qisdk_group_id:qisdk-design:$qisdk_version"
38 | }
--------------------------------------------------------------------------------
/autonomousrecharge/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/autonomousrecharge/src/main/java/com/aldebaran/qi/sdk/autonomousrecharge/AutonomousRecharge.kt:
--------------------------------------------------------------------------------
1 | package com.aldebaran.qi.sdk.autonomousrecharge
2 |
3 | import android.content.Context
4 | import android.content.Intent
5 | import android.content.IntentFilter
6 | import com.aldebaran.qi.sdk.QiContext
7 |
8 | /**
9 | * Entry point for autonomous recharge-related APIs.
10 | */
11 | object AutonomousRecharge {
12 |
13 | const val RECHARGE_PERMISSION = "com.softbankrobotics.permission.AUTO_RECHARGE"
14 | private const val DOCKING_SOON_INTENT = "com.softbankrobotics.intent.DOCKING_SOON"
15 | private const val DOCK_ACTION_NAME = "com.softbankrobotics.intent.action.AUTO_DOCK"
16 | private const val UNDOCK_ACTION_NAME = "com.softbankrobotics.intent.action.AUTO_UNDOCK"
17 | private const val RECALL_POD = "recall_pod"
18 | private val receiver = RechargeRequestReceiver()
19 |
20 | @JvmStatic
21 | fun registerReceiver(qiContext: QiContext) {
22 | receiver.qiContext = qiContext
23 | qiContext.registerReceiver(receiver, IntentFilter(DOCKING_SOON_INTENT))
24 | }
25 |
26 | @JvmStatic
27 | fun unregisterReceiver() {
28 | receiver.qiContext?.unregisterReceiver(receiver)
29 | receiver.qiContext = null
30 | }
31 |
32 | @JvmStatic
33 | fun addOnDockingSoonListener(listener: AutonomousRechargeListeners.OnDockingSoonListener) {
34 | receiver.onDockingSoonListeners.add(listener)
35 | }
36 |
37 | @JvmStatic
38 | fun removeOnDockingSoonListener(listener: AutonomousRechargeListeners.OnDockingSoonListener) {
39 | receiver.onDockingSoonListeners.remove(listener)
40 | }
41 |
42 | @JvmStatic
43 | fun removeAllOnDockingSoonListeners() {
44 | receiver.onDockingSoonListeners.clear()
45 | }
46 |
47 | /**
48 | * Sends an intent to start the Autonomous Recharge Docking activity.
49 | * @param context the [Context].
50 | * @param recallPod a boolean to indicate whether to recall the previous pod location.
51 | *
52 | * @return none
53 | */
54 | @JvmStatic
55 | fun startDockingActivity(context: Context, recallPod: Boolean? = null) {
56 | val intent = Intent(DOCK_ACTION_NAME)
57 | recallPod?.let { intent.putExtra(RECALL_POD, recallPod) }
58 | context.startActivity(intent)
59 | }
60 |
61 | /**
62 | * Sends an intent to start the Autonomous Recharge Undocking activity.
63 | * @param context the [Context].
64 | *
65 | * @return none
66 | */
67 | @JvmStatic
68 | fun startUndockingActivity(context: Context) {
69 | val intent = Intent(UNDOCK_ACTION_NAME)
70 | context.startActivity(intent)
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/autonomousrecharge/src/main/java/com/aldebaran/qi/sdk/autonomousrecharge/AutonomousRechargeListeners.kt:
--------------------------------------------------------------------------------
1 | package com.aldebaran.qi.sdk.autonomousrecharge
2 |
3 | import com.aldebaran.qi.sdk.QiContext
4 |
5 | interface AutonomousRechargeListeners {
6 |
7 | /**
8 | * Triggered when the battery is less than 3% above the low battery threshold, or when the time
9 | * is 5 minutes before the docking alarm.
10 | */
11 | interface OnDockingSoonListener {
12 | fun onDockingSoon(qiContext: QiContext)
13 | }
14 | }
--------------------------------------------------------------------------------
/autonomousrecharge/src/main/java/com/aldebaran/qi/sdk/autonomousrecharge/RechargeRequestReceiver.kt:
--------------------------------------------------------------------------------
1 | package com.aldebaran.qi.sdk.autonomousrecharge
2 |
3 | import android.content.BroadcastReceiver
4 | import android.content.Context
5 | import android.content.Intent
6 | import com.aldebaran.qi.sdk.QiContext
7 | import java.util.concurrent.CopyOnWriteArrayList
8 |
9 | class RechargeRequestReceiver(var qiContext: QiContext? = null): BroadcastReceiver() {
10 | val onDockingSoonListeners = CopyOnWriteArrayList()
11 |
12 | override fun onReceive(context: Context?, intent: Intent?) {
13 | qiContext?.let { qiContext ->
14 | onDockingSoonListeners.forEach {
15 | it.onDockingSoon(qiContext)
16 | }
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 |
5 | // Kotlin
6 | ext.kotlin_version = '1.4.20'
7 |
8 | // QiSDK
9 | ext.qisdk_group_id = 'com.aldebaran'
10 | ext.qisdk_version = '1.7.5'
11 | repositories {
12 | google()
13 | jcenter()
14 | mavenCentral()
15 |
16 | }
17 | dependencies {
18 | classpath 'com.android.tools.build:gradle:4.1.1'
19 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
20 | // NOTE: Do not place your application dependencies here; they belong
21 | // in the individual module build.gradle files
22 | }
23 | }
24 |
25 | allprojects {
26 | repositories {
27 | google()
28 | jcenter()
29 | maven { url 'https://qisdk.softbankrobotics.com/sdk/maven' }
30 | maven { url 'https://jitpack.io' }
31 | }
32 | }
33 |
34 | task clean(type: Delete) {
35 | delete rootProject.buildDir
36 | }
37 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | ## For more details on how to configure your build environment visit
2 | # http://www.gradle.org/docs/current/userguide/build_environment.html
3 | #
4 | # Specifies the JVM arguments used for the daemon process.
5 | # The setting is particularly useful for tweaking memory settings.
6 | # Default value: -Xmx1024m -XX:MaxPermSize=256m
7 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
8 | #
9 | # When configured, Gradle will run in incubating parallel mode.
10 | # This option should only be used with decoupled projects. More details, visit
11 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
12 | # org.gradle.parallel=true
13 | #Mon Aug 26 09:42:14 CEST 2019
14 | android.enableJetifier=true
15 | android.useAndroidX=true
16 | org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M"
17 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Oct 28 14:11:06 CET 2020
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/screen_shots/Anchor_points_Showroom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/screen_shots/Anchor_points_Showroom.png
--------------------------------------------------------------------------------
/screen_shots/Path1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/screen_shots/Path1.png
--------------------------------------------------------------------------------
/screen_shots/Path2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/screen_shots/Path2.png
--------------------------------------------------------------------------------
/screen_shots/Path3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/screen_shots/Path3.png
--------------------------------------------------------------------------------
/screen_shots/PathWithChargingStation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/screen_shots/PathWithChargingStation.png
--------------------------------------------------------------------------------
/screen_shots/exploMap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/screen_shots/exploMap.png
--------------------------------------------------------------------------------
/screen_shots/screen1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/screen_shots/screen1.png
--------------------------------------------------------------------------------
/screen_shots/screen3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/screen_shots/screen3.png
--------------------------------------------------------------------------------
/screen_shots/screen5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softbankrobotics-labs/maplocalizeandmove/845ece3dd73ac767e014a1916e865f9762b94944/screen_shots/screen5.png
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':autonomousrecharge'
2 | include ':app'
--------------------------------------------------------------------------------