Skip to content

Commit 287950e

Browse files
author
Alexandre Roux
committed
v1.0.0
0 parents  commit 287950e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+7118
-0
lines changed

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Built application files
2+
*.apk
3+
*.ap_
4+
5+
# Files for the dex VM
6+
*.dex
7+
8+
# Java class files
9+
*.class
10+
11+
# Generated files
12+
bin/
13+
gen/
14+
15+
# Local configuration file (sdk path, etc)
16+
local.properties
17+
18+
# Windows thumbnail db
19+
Thumbs.db
20+
21+
# OSX files
22+
.DS_Store
23+
24+
# Android Studio
25+
*.iml
26+
.idea
27+
.gradle
28+
build/
29+
.navigation
30+
captures/
31+
output.json
32+
33+
# NDK
34+
obj/
35+
.externalNativeBuild
36+
37+
# Keys
38+
keystore.properties
39+
keys/
40+
41+
42+
# Android QiSDK project config
43+
robotsdk.xml

AUTHORS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Pepper Point At Authors
2+
3+
The Pepper Point At library was written by the Developer Experience team at Softbank Robotics Europe, Paris, December 2019.
4+
5+
* **Alexandre Roux** (aroux@softbankrobotics.com)

LICENSE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2011-2019, 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+
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7+
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8+
* Neither the name of the SoftBank Robotics Europe nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9+
10+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
11+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
12+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
13+
DISCLAIMED. IN NO EVENT SHALL SoftBank Robotics Europe BE LIABLE FOR ANY
14+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
15+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
17+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
19+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Pepper Point At Library
2+
3+
This Android Library will help you make Pepper point at a nearby position by running a specific animation or by giving a Frame to point at.
4+
5+
6+
## Getting Started
7+
8+
### Prerequisites
9+
10+
A robotified project for Pepper with QiSDK. Read the [documentation](https://developer.softbankrobotics.com/pepper-qisdk) if needed.
11+
12+
### Running the Sample Application
13+
14+
The project comes complete with a sample project. You can clone the repository, open it in Android Studio, and run this directly onto a Robot.
15+
16+
The sample app provides a screen representing Pepper in the middle of a room with different animal emojis displayed around him.
17+
If you press an emoji or if you say the name of the animal it's representing, Pepper will point at its position.
18+
19+
Full implementation details are available to see in the project.
20+
21+
### Installing
22+
23+
[**Follow these instructions**](https://jitpack.io/#softbankrobotics-labs/pepper-point-at)
24+
25+
Make sure to replace 'Tag' by the number of the version of the library you want to use.
26+
27+
28+
## Usage
29+
30+
*This README assumes some standard setup can be done by the user, such as initialising variables or implementing code in the correct functions. Refer to the Sample Project for full usage code.*
31+
32+
Initialise the QiSDK in the onCreate. If you are unsure how to do this, refer to the QiSDK tutorials [here](https://qisdk.softbankrobotics.com/sdk/doc/pepper-sdk/ch1_gettingstarted/starting_project.html)
33+
```
34+
QiSDK.register(this, this)
35+
```
36+
In the `onRobotFocusGained`, instantiate a `PointAtAnimator` object by passing it the QiContext.
37+
38+
```
39+
override fun onRobotFocusGained(qiContext: QiContext) {
40+
Log.i(TAG, "onRobotFocusGained")
41+
pointAtAnimator = PointAtAnimator(qiContext)
42+
}
43+
```
44+
You can them launch a specific `PointAtAnimation` with the following code:
45+
```
46+
pointAtAnimator.playPointAnimation(PointAtAnimation.MEDIUM_LEFT)
47+
```
48+
Here is the list of the different `PointAtAnimation`:
49+
```
50+
CLOSE_FRONT_LEFT
51+
CLOSE_FRONT_RIGHT
52+
CLOSE_MEDIUM_LEFT
53+
CLOSE_MEDIUM_RIGHT
54+
CLOSE_HALF_LEFT
55+
CLOSE_HALF_RIGHT
56+
FRONT_LEFT
57+
FRONT_RIGHT
58+
MEDIUM_LEFT
59+
MEDIUM_RIGHT
60+
HALF_LEFT
61+
HALF_RIGHT
62+
```
63+
You can also ask Pepper to point at a specific `Frame`:
64+
```
65+
pointAtAnimator.pointAt(targetFrame)
66+
```
67+
Refer to this [documentation](https://android.aldebaran.com/sdk/doc/pepper-sdk/ch4_api/movement/reference/frame.html)
68+
if you are not familiar with the concept of `Frame`
69+
70+
71+
## Additional information
72+
73+
When asking the library to point at a specific `Frame`, the library will define if it is close to Pepper or not to run the right `PointAtAnimation`. A "close" `Frame` is closer than 3 meters from Pepper.
74+
75+
For instance, if the library is asked to point at a `Frame` that is one meter directly to the left of Pepper, the `PointAtAnimation` CLOSE_HALF_LEFT will be played.
76+
But if the library is asked to point at a `Frame` that is ten meters away directly to the left of Pepper, the `PointAtAnimation` HALF_LEFT will be played.
77+
78+
79+
## License
80+
81+
This project is licensed under the BSD 3-Clause "New" or "Revised" License- see the [LICENSE](LICENSE.md) file for details.

pepper-point-at-root/.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Built application files
2+
*.apk
3+
*.ap_
4+
5+
# Files for the dex VM
6+
*.dex
7+
8+
# Java class files
9+
*.class
10+
11+
# Generated files
12+
bin/
13+
gen/
14+
15+
# Local configuration file (sdk path, etc)
16+
local.properties
17+
18+
# Windows thumbnail db
19+
Thumbs.db
20+
21+
# OSX files
22+
.DS_Store
23+
24+
# Android Studio
25+
*.iml
26+
.idea
27+
.gradle
28+
build/
29+
.navigation
30+
captures/
31+
output.json
32+
33+
# NDK
34+
obj/
35+
.externalNativeBuild

pepper-point-at-root/build.gradle

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
3+
buildscript {
4+
ext.kotlin_version = '1.3.50'
5+
repositories {
6+
google()
7+
jcenter()
8+
}
9+
dependencies {
10+
classpath 'com.android.tools.build:gradle:3.5.3'
11+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
12+
// NOTE: Do not place your application dependencies here; they belong
13+
// in the individual module build.gradle files
14+
}
15+
}
16+
17+
allprojects {
18+
repositories {
19+
google()
20+
jcenter()
21+
maven {
22+
url 'https://qisdk.softbankrobotics.com/sdk/maven'
23+
}
24+
}
25+
}
26+
27+
task clean(type: Delete) {
28+
delete rootProject.buildDir
29+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Project-wide Gradle settings.
2+
# IDE (e.g. Android Studio) users:
3+
# Gradle settings configured through the IDE *will override*
4+
# any settings specified in this file.
5+
# For more details on how to configure your build environment visit
6+
# http://www.gradle.org/docs/current/userguide/build_environment.html
7+
# Specifies the JVM arguments used for the daemon process.
8+
# The setting is particularly useful for tweaking memory settings.
9+
org.gradle.jvmargs=-Xmx1536m
10+
# When configured, Gradle will run in incubating parallel mode.
11+
# This option should only be used with decoupled projects. More details, visit
12+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13+
# org.gradle.parallel=true
14+
# AndroidX package structure to make it clearer which packages are bundled with the
15+
# Android operating system, and which are packaged with your app's APK
16+
# https://developer.android.com/topic/libraries/support-library/androidx-rn
17+
android.useAndroidX=true
18+
# Automatically convert third-party libraries to use AndroidX
19+
android.enableJetifier=true
20+
# Kotlin code style for this project: "official" or "obsolete":
21+
kotlin.code.style=official
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Thu Dec 05 16:41:19 CET 2019
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-5.4.1-all.zip

0 commit comments

Comments
 (0)