Giter VIP home page Giter VIP logo

softbankrobotics-labs / pepper-interaction-sample Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 6.0 253 KB

This application demonstrates a minimal interaction flow for Pepper using the QiSDK, aimed at being a useful starting point for various interactive applications.

License: BSD 3-Clause "New" or "Revised" License

Java 100.00%
pepper-robot pepper-qisdk java human-robot-interaction state-machine sample-app human-perception

pepper-interaction-sample's Introduction

Interaction Sample

This application demonstrates a minimal interaction flow for Pepper using the QiSDK, aimed at being a useful starting point for various interactive applications.

Interaction State Machine

Pepper alternates between three states:

  • Idle state (Pepper doesn't do anything)
  • Attract state, when Pepper sees a human from afar (in this example, Pepper just says "hey there")
  • Engaged state, when a human is near enough to engage conversation; in this case Pepper starts a simple QiChat dialogue.

The Engaged State is slightly "sticky", in that it will not exit unless nobody has been seen for five seconds (that time can be tweaked).

In addition, Pepper's current state will be displayed at the bottom of the tablet:

Screenshot

Extending the State Machine

The project contains a more generic state machine framework making it easy to add states, and change their behavior.

Each state can be associated to:

  • A Behavior object, that will run while this state is active and stop when it's finished (for example, say something, or run a chat)
  • A Fragment, that will be displayed on Pepper's tablet as long as that state is active

It is easy to add or change behaviors and fragments, or to add new states - all that is defined in InteractionStateMachine, which contains the core logic of the flow.

Two helper classes may be of interest (and could be re-used in other projects, to have a clean interaction flow):

  • HumanInterestTracker, that provides an interested "Human" object, defined by a human whose intentionState is "INTERESTED" or "SEEKING_ENGAGEMENT"
  • HumanEngager, that, when active, will automatically create an EngageHuman action with the recommendedHumanToEngage

See The documentation on Human Perception for more details on the functions used i those.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.