Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandre Roux committed Feb 25, 2020
0 parents commit 287950e
Show file tree
Hide file tree
Showing 58 changed files with 7,118 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Built application files
*.apk
*.ap_

# Files for the dex VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/

# Local configuration file (sdk path, etc)
local.properties

# Windows thumbnail db
Thumbs.db

# OSX files
.DS_Store

# Android Studio
*.iml
.idea
.gradle
build/
.navigation
captures/
output.json

# NDK
obj/
.externalNativeBuild

# Keys
keystore.properties
keys/


# Android QiSDK project config
robotsdk.xml
5 changes: 5 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Pepper Point At Authors

The Pepper Point At library was written by the Developer Experience team at Softbank Robotics Europe, Paris, December 2019.

* **Alexandre Roux** ([email protected])
19 changes: 19 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2011-2019, SoftBank Robotics Europe
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* 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.
* 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.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL SoftBank Robotics Europe BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
81 changes: 81 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Pepper Point At Library

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.


## Getting Started

### Prerequisites

A robotified project for Pepper with QiSDK. Read the [documentation](https://developer.softbankrobotics.com/pepper-qisdk) if needed.

### Running the Sample Application

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.

The sample app provides a screen representing Pepper in the middle of a room with different animal emojis displayed around him.
If you press an emoji or if you say the name of the animal it's representing, Pepper will point at its position.

Full implementation details are available to see in the project.

### Installing

[**Follow these instructions**](https://jitpack.io/#softbankrobotics-labs/pepper-point-at)

Make sure to replace 'Tag' by the number of the version of the library you want to use.


## Usage

*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.*

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)
```
QiSDK.register(this, this)
```
In the `onRobotFocusGained`, instantiate a `PointAtAnimator` object by passing it the QiContext.

```
override fun onRobotFocusGained(qiContext: QiContext) {
Log.i(TAG, "onRobotFocusGained")
pointAtAnimator = PointAtAnimator(qiContext)
}
```
You can them launch a specific `PointAtAnimation` with the following code:
```
pointAtAnimator.playPointAnimation(PointAtAnimation.MEDIUM_LEFT)
```
Here is the list of the different `PointAtAnimation`:
```
CLOSE_FRONT_LEFT
CLOSE_FRONT_RIGHT
CLOSE_MEDIUM_LEFT
CLOSE_MEDIUM_RIGHT
CLOSE_HALF_LEFT
CLOSE_HALF_RIGHT
FRONT_LEFT
FRONT_RIGHT
MEDIUM_LEFT
MEDIUM_RIGHT
HALF_LEFT
HALF_RIGHT
```
You can also ask Pepper to point at a specific `Frame`:
```
pointAtAnimator.pointAt(targetFrame)
```
Refer to this [documentation](https://android.aldebaran.com/sdk/doc/pepper-sdk/ch4_api/movement/reference/frame.html)
if you are not familiar with the concept of `Frame`


## Additional information

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.

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.
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.


## License

This project is licensed under the BSD 3-Clause "New" or "Revised" License- see the [LICENSE](LICENSE.md) file for details.
35 changes: 35 additions & 0 deletions pepper-point-at-root/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Built application files
*.apk
*.ap_

# Files for the dex VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/

# Local configuration file (sdk path, etc)
local.properties

# Windows thumbnail db
Thumbs.db

# OSX files
.DS_Store

# Android Studio
*.iml
.idea
.gradle
build/
.navigation
captures/
output.json

# NDK
obj/
.externalNativeBuild
29 changes: 29 additions & 0 deletions pepper-point-at-root/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
jcenter()
maven {
url 'https://qisdk.softbankrobotics.com/sdk/maven'
}
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
21 changes: 21 additions & 0 deletions pepper-point-at-root/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
Binary file not shown.
6 changes: 6 additions & 0 deletions pepper-point-at-root/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Thu Dec 05 16:41:19 CET 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
Loading

0 comments on commit 287950e

Please sign in to comment.