-
Notifications
You must be signed in to change notification settings - Fork 87
temi Center
The features here need to be configured in the temi Center before they can be used.
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.
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 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.
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 |
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 |
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
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
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.
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
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
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.
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.
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
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.
package com.robotemi.sdk.face;
interface OnFaceRecognizedListener {}
-
Parameters
Parameter Type Description contactModelList List<ContactModel> Contact set corresponding to the recognized face -
Prototype
void onFaceRecognized(List<ContactModel> contactModelList);
-
Parameters
Parameter Type Description listener OnFaceRecognizedListener An instance of a class that implements this interface -
Prototype
void addOnFaceRecognizedListener(OnFaceRecognizedListener 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
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.
package com.robotemi.sdk.face;
interface OnContinuousFaceRecognizedListener {}
-
Parameters
Parameter Type Description contactModelList List<ContactModel> Contact set corresponding to the recognized face -
Prototype
void onContinuousFaceRecognized(List<ContactModel> contactModelList);
-
Parameters
Parameter Type Description listener OnContinuousFaceRecognizedListener An instance of a class that implements this interface -
Prototype
void addOnContinuousFaceRecognizedListener(OnContinuousFaceRecognizedListener 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
Set your context to implement this listener and add the override method to listen to the status of the sequence.
package com.robotemi.sdk.sequence;
interface OnSequencePlayStatusChangedListener {}
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 |
-
Parameters
Parameter Type Description status int Sequence's status -
Prototype
void onSequencePlayStatusChanged(int status);
-
Parameters
Parameter Type Description listener OnSequencePlayStatusChangedListener An instance of a class that implements this interface -
Prototype
void addOnSequencePlayStatusChangedListener(OnSequencePlayStatusChangedListener 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
Set your context to implement this listener and add the override method to listen to the status of the Greet mode.
package com.robotemi.sdk.listeners;
interface OnGreetModeStateChangedListener {}
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 |
-
Parameters
Parameter Type Description status int Greet mode's state -
Prototype
void onGreetModeStateChanged(int state);
-
Parameters
Parameter Type Description listener OnGreetModeStateChangedListener An instance of a class that implements this interface -
Prototype
void addOnGreetModeStateChangedListener(OnGreetModeStateChangedListener 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
Used for holding the contact data.
package com.robotemi.sdk.face;
class ContactModel {}
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 | Contact ID for registered user, or an UUID for visitor (Supported in 129 version). |
age | int | Age (Supported in 129 version) |
visitor | boolean | true if not a registered user. (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) |
Please refer to the sample code for more details.
Used for holding the content type, Face recognition image and map data only for now.
package com.robotemi.sdk.constants;
enum ContentType {
FACE_RECOGNITION_IMAGE,
MAP_DATA_IMAGE
}
Used for holding the sequence data.
package com.robotemi.sdk.sequence;
class SequenceModel {}
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 |
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;
}