Skip to content

temi Center

zjn0505 edited this page Nov 23, 2023 · 38 revisions

temi Center

The features here need to be configured in the temi Center before they can be used.

Sequence

Sequence, is a powerful tool with easy block building interface to achieve chained functionality.

With a few clicks, drags in the sequence editor on temi Center, user will be able to put a serial of movement, speaking, audio, video, image togeter, and play everything with one trigger event like a single click, scheduled seqeunce, etc.

From SDK, user can fetch, play and control sequences belongs to the organization.

Tour

Tour groups Sequences and resources and attaches them to locations of the robot.

It works perfectly in show room scenario that temi will play as the tour guide, leading visitors to the route, introducing places of interest, answering questions related to the places.

You create a tour for your robot by first defining the a route composed of locations, then attaching Sequences, Q&As to the route, deciding what to be played on the location and between the locations, finally you can tweak the UI of many places to that this tour will present.

Greet Mode

Greet mode is a feature that integrates many hardware and software functions on temi robot, providing a detection, recognition, greeting and guiding flow.

The configuration is also easy and powerful. It can be as complex as a concierge will do with patrolling, face recongition, sequence all in one place. Or very minimum to be used in the background to support Kiosk apps and just provide detection callbacks.

From SDK, user can monitor the status change of greet mode, and react accordingly.

Face recognition

Face recognition is used to do detection and recognizion. It can be used in greet mode, also can be running standalone by starting it from SDK.

From 129 version, under greet mode, there will be more information provided for unregistered detection, such as an UUID which supposed to be consistent across multiple sessions of greet mode, as used for first visit and re-visit detection.

The maximum size of unregistered pool is 200, it will be cleared on robot boot, or midnight if greet mode is OFF.

Local faces registration

From 1.131.2 version, other than register faces as contacts from temi center, applications with temi SDK can register their own faces. i.e. Applications can registered faces with given user id and names to temi launcher. These faces will be used when face recognition is started from SDK, meaning they will not be used in Dynamic (Greet) mode.

Face images registered to temi, will be converted into anonymous face feature data, which is a string generated by algorithm from the iamge, and cannot be reverted back to the image. The images will not be saved or used for other purpose in temi.

You only need to register a face once, and it will be extracted into feature data and saved in database for furthur usage at any time, so you don't need to register the face every time.

When doing face recogntion from SDK with local face registration, if local registered face has a better match than faces registered from temi center, then local registered user will be returned as detected user.

The registration and managment of local faces is made through content provider. There are examples in FaceActivity on how to register, query and delete faces. This page can be launched in the sample app from Resources -> Test Face Recognition.

For more infos, please check this page Local Face Registration


API Overview

Return Method Description
void startFaceRecognition() Start face recognition
void stopFaceRecognition() Stop face recognition
List<SequenceModel> getAllSequences() Get all sequences
void playSequence(String sequenceId) Play specific sequence by sequenceId
void playSequence(String sequenceId, boolean withPlayer) Play specific sequence by sequenceId and set wheather show the player panel when sequence is playing
InputStream getInputStreamByMediaKey(ContentType contentType, String mediaKey) Obtain the input stream of the file by contentType and mediaKey (currently only used to obtain the contact photo for face recognition)
List<Pair<String, String>> getSignedUrlByMediaKey(List<String> mediaKeys, int width, int height) Get the list of the pair for media key and signed URL by mediaKeys
void controlSequence(SequenceCommand sequenceCommand) Control the currently playing Sequence
int setInteractionState(Boolean on) Set interaction state as ON, to keep greet mode under interaction state.
List<TourModel> getAllTours() Get the list of tours
int playTour(String tourId) Play a tour by id
Interface Description
OnSequencePlayStatusChangedListener Sequence status changed listener
OnFaceRecognizedListener Face recognition listener
OnContinuousFaceRecognizedListener Continuous face recognition listener
OnGreetModeStateChangedListener Greet mode state changed listener
Models Description
ContactModel Contact data
SequenceModel Sequence data
ContentType Content type
SequenceCommand Sequence control command
TourModel Tour data

Methods

startFaceRecognition()

Use this method to start temi's face recognition and send the face data back to the callback method of OnFaceRecognizedListener.

  • Prototype

    void startFaceRecognition();
  • Required permissions

    Selected Kiosk (Before 129 version), Face Recognition

  • Support from

    0.10.70


stopFaceRecognition()

Use this method to stop the face recognition.

  • Prototype

    void stopFaceRecognition();
  • Required permissions

    Selected Kiosk (Before 129 version), Face Recognition

  • Support from

    0.10.70


getAllSequences()

Use this method to get all the sequences under organization that configured on temi Center.

  • Parameters

    Parameter Type Description
    tags List<String> Sequence tags(configure at temi Center), optional parameter, return all the sequences if not passed in
  • Return

    Type Description
    List<SequenceModel> All sequences list
  • Prototype

    List<SequenceModel> getAllSequences();
  • Required permissions

    Sequence

  • Support from

    0.10.70

  • Note

    This method is a time-consuming operation and is recommended to be used in a non-main thread.


playSequence()

Use this method to play a specific sequence.

  • Parameters

    Parameter Type Description
    sequenceId String ID of the sequence
  • Prototype

    void playSequence(String sequenceId);
  • Required permissions

    Sequence

  • Support from

    0.10.70


playSequence()

Use this method to play a specified sequence, and you can choose whether to display the sequence player control interface. The player control interface can pause, play, previous and next operations on the sequence.

  • Parameters

    Parameter Type Description
    sequenceId String ID of the sequence
    withPlayer boolean Show player or no
  • Prototype

    void playSequence(String sequenceId, boolean withPlayer);
  • Required permissions

    Sequence

  • Support from

    0.10.73


getInputStreamByMediaKey()

Use this method to obtain the input stream of the file by mediaKey, currently only used to obtain the contact photo for face recognition.

  • Parameters

    Parameter Type Description
    contentType ContentType Content type
    mediaKey String Media key of the file
  • Return

    Type Description
    InputStream Input stream of the file
  • Prototype

    InputStream getInputStreamByMediaKey(ContentType contentType, String mediaKey);
  • Required permissions

    None.

  • Support from

    0.10.70

  • Note

    This method is a time-consuming operation and is recommended to be used in a non-main thread.


getSignedUrlByMediaKey()

Use this method to get signed URL by mediaKeys , width , height.

  • Parameters

    Parameter Type Description
    mediaKeys List<String> List of media keys
    width int The width of the image, will return the original resource if no parameter passed
    height int The height of the image, will return the original resource if no parameter passed
  • Return

    Type Description
    List<Pair<String, String>> The list that holds the pair for media key and signed URL
  • Prototype

    List<Pair<String, String>> getSignedUrlByMediaKey(List<String> mediaKeys, int width, int height);
  • Required permissions

    None.

  • Support from

    0.10.70

  • Note

    This method is a time-consuming operation and is recommended to be used in a non-main thread.

    Exchanged signed URL may expire shortly.


controlSequence()

Use this method to control the currently playing Sequence, including stop, play, pause, previous and next operations.

  • Parameters

    Parameter Type Description
    sequenceCommand SequenceCommand Control command
  • Prototype

    void controlSequence(SequenceCommand sequenceCommand);
  • Required permissions

    Selected Kiosk (Before 129 version), Settings

  • Support from

    0.10.78


setInteractionState()

Use this method to set interaction state as ON, to keep greet mode under interaction state.

Before 130 version, greet mode interaction is decided internally by robot movement, voice conversation, etc.

Since 130 version, home screen app can keep robot at interaction phase in greet mode.

  • Parameters

    Parameter Type Description
    on Boolean true to hold it as interaction state
  • Return

    Type Description
    int -1 for failed to request, maybe robot is not ready
    0 for request succeed
    403 for current app is not selected Home screen app
  • Prototype

    int setInteractionState(Boolean on);
  • Required permissions

    Selected Kiosk.

  • Support from

    1.130.0


getAllTours()

Get the list of tours of this robot.

  • Parameters

    Parameter Type Description
    tags List<String> Tour tags(configure at temi Center), optional parameter, return all the tours of this robot if not passed in
  • Return

    Type Description
    List<TourModel> All tour list
  • Prototype

    List<TourModel> getAllTours();
  • Required permissions

    Sequence

  • Support from

    1.132.0

  • Note

    This method is a time-consuming operation and is recommended to be used in a non-main thread.


playTour()

Use this method to play a specific tour.

  • Parameters

    Parameter Type Description
    tourId String ID of the tour
  • Return

    Type Description
    int 0 ok, 403 no permission, 404 no tour matched, -1 unsupport method
  • Prototype

    int playTour(String tourId);
  • Required permissions

    Sequence

  • Support from

    1.132.0


Interfaces

OnFaceRecognizedListener

Set your context to implement this listener and add the override method to get the contact information when someone is recognized. When the recognized face has been configured in the temi Center, other information of the corresponding contact will be returned; and if it has not been configured in the temi Center, an empty ContactModel object will be returned.

Prototype

package com.robotemi.sdk.face;

interface OnFaceRecognizedListener {}

Abstract methods

  • Parameters

    Parameter Type Description
    contactModelList List<ContactModel> Contact set corresponding to the recognized face
  • Prototype

    void onFaceRecognized(List<ContactModel> contactModelList);

Method for adding listener

  • Parameters

    Parameter Type Description
    listener OnFaceRecognizedListener An instance of a class that implements this interface
  • Prototype

    void addOnFaceRecognizedListener(OnFaceRecognizedListener listener);

Method for removing listener

  • Parameters

    Parameter Type Description
    listener OnFaceRecognizedListener An instance of a class that implements this interface
  • Prototype

    void removeOnFaceRecognizedListener(OnFaceRecognizedListener listener);
  • Required permissions

    Face Recognition

  • Support from

    0.10.70


OnContinuousFaceRecognizedListener

Set your context to implement this listener and add the override method to get the contact information when someone is recognized. When the recognized face has been configured in the temi Center, other information of the corresponding contact will be returned; and if it has not been configured in the temi Center, an empty ContactModel object will be returned.

Note: Face recognition results will be issued frequently, please consider filtering part of the data as needed to achieve the desired frequency.

Prototype

package com.robotemi.sdk.face;

interface OnContinuousFaceRecognizedListener {}

Abstract methods

  • Parameters

    Parameter Type Description
    contactModelList List<ContactModel> Contact set corresponding to the recognized face
  • Prototype

    void onContinuousFaceRecognized(List<ContactModel> contactModelList);

Method for adding listener

  • Parameters

    Parameter Type Description
    listener OnContinuousFaceRecognizedListener An instance of a class that implements this interface
  • Prototype

    void addOnContinuousFaceRecognizedListener(OnContinuousFaceRecognizedListener listener);

Method for removing listener

  • Parameters

    Parameter Type Description
    listener OnContinuousFaceRecognizedListener An instance of a class that implements this interface
  • Prototype

    void removeOnContinuousFaceRecognizedListener(OnContinuousFaceRecognizedListener listener);
  • Required permissions

    Face Recognition

  • Support from

    0.10.77


OnSequencePlayStatusChangedListener

Set your context to implement this listener and add the override method to listen to the status of the sequence.

Prototype

package com.robotemi.sdk.sequence;

interface OnSequencePlayStatusChangedListener {}

Static constant

Constant Type Value Description
IDLE int 0 Finish playing
PREPARING int 1 Source preparing
PLAYING int 2 Playing
ERROR int -1 Errors occurred while playing

Abstract methods

  • Parameters

    Parameter Type Description
    status int Sequence's status
  • Prototype

    void onSequencePlayStatusChanged(int status);

Method for adding listener

  • Parameters

    Parameter Type Description
    listener OnSequencePlayStatusChangedListener An instance of a class that implements this interface
  • Prototype

    void addOnSequencePlayStatusChangedListener(OnSequencePlayStatusChangedListener listener);

Method for removing listener

  • Parameters

    Parameter Type Description
    listener OnSequencePlayStatusChangedListener An instance of a class that implements this interface
  • Prototype

    void removeOnSequencePlayStatusChangedListener(OnSequencePlayStatusChangedListener listener);
  • Required permissions

    None.

  • Support from

    0.10.70


OnGreetModeStateChangedListener

Set your context to implement this listener and add the override method to listen to the status of the Greet mode.

Prototype

package com.robotemi.sdk.listeners;

interface OnGreetModeStateChangedListener {}

Static constant

Constant Type Value Description
HOLD int 0 Idle
SEARCHING int 1 Waiting a person
PREPARING int 2 Preparing for Greet mdoe
GREETING int 3 Greeting
INTERACTION int 4 User interaction
POST_INTERACTION int 5 User left
ERROR int -1 Error occurred

Abstract methods

  • Parameters

    Parameter Type Description
    status int Greet mode's state
  • Prototype

    void onGreetModeStateChanged(int state);

Method for adding listener

  • Parameters

    Parameter Type Description
    listener OnGreetModeStateChangedListener An instance of a class that implements this interface
  • Prototype

    void addOnGreetModeStateChangedListener(OnGreetModeStateChangedListener listener);

Method for removing listener

  • Parameters

    Parameter Type Description
    listener OnGreetModeStateChangedListener An instance of a class that implements this interface
  • Prototype

    void removeOnGreetModeStateChangedListener(OnGreetModeStateChangedListener listener);
  • Required permissions

    None.

  • Support from

    0.10.79


Models

ContactModel

Used for holding the contact data.

Prototype

package com.robotemi.sdk.face;

class ContactModel {}

Attributes

Attribute Type Description
firstName String First name of contact
lastName String Last name of contact
gender String Gender
imageKey String The media key for the contact photo, Obtain the corresponding file input stream through the getInputStreamByMediaKey(String mediaKey) method.
description String Description information
userId String 1. Contact ID for registered user, for temi registered users (userType = 0), it is MD5 format e.g. d7cbcc25cc3fa002d28687ea1136324e,
2. A 24 hex-character string for contacts with only face images (userType = 1), e.g. 507fffffbcf86cd799430000
3. A 12 hex UUID for visitor (userType = 2), e.g. 3965f7ac0d8b (Supported in 129 version).
4. If not recognized, this will be a face id that remains the same for each face when it stays in the camera frame. Face id will start from 1 in each recognition session. (userType = -1),From 129 version, launcher version 17009.
5. uid when face was registered by app from SDK. (userType = 3)
age int Age (Supported in 129 version)
userType int 0: registered temi user。
1: temi contacts, unregistered temi user but with face images registered.
2: Visitor under Greet Mode, UUID shall be available.
3: SDK registered faces
-1: detected but not recognized. (Supported in 129 version)
similarity double Similarity of current detection compared to the registered user or UUID face, range from 0.7 to 1.0 (Supported in 129 version)

Sample

Please refer to the sample code for more details.


ContentType

Used for holding the content type, Face recognition image and map data only for now.

Prototype

package com.robotemi.sdk.constants;

enum ContentType {
    FACE_RECOGNITION_IMAGE,
    MAP_DATA_IMAGE
}

SequenceModel

Used for holding the sequence data.

Prototype

package com.robotemi.sdk.sequence;

class SequenceModel {}

Attributes

Attribute Type Description
id String ID of sequence
name String Name of sequence
description String Description of sequence
imageKey String The media key for the sequence photo, Obtain the corresponding signed URL through the getSignedUrlByMediaKey() method.
tags List<String> Tags of sequence

SequenceCommand

Used for holding the control command for Sequence, including stop, play, pause, next step, and previous step.

package com.robotemi.sdk.constants;

enum SequenceCommand {
    STOP,
    PLAY,
    PAUSE,
    STEP_FORWARD,
    STEP_BACKWARD;
}

TourModel

Used for holding the tour data.

Prototype

package com.robotemi.sdk.tourguide;

class TourModel {}

Attributes

Attribute Type Description
id String ID of tour
name String Name of tour
description String Description of tour
language String Language of tour
imageKey String The media key for the tour cover image, Obtain the corresponding signed URL through the getSignedUrlByMediaKey() method.
tags List<String> Tags of tour

Clone this wiki locally