public class Utility
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
Utility.BlueLightMode |
static interface |
Utility.CapEventType |
static interface |
Utility.PlayAction |
static interface |
Utility.SensorType
Those types are used for SensorManager.
|
Modifier and Type | Method and Description |
---|---|
int |
followUser()
Ask robot follow the nearest user
There are two "onResult" callback during FollowUser processing:
1.
|
int |
getLastKidnapTime()
Get ths last kidnap time in milliseconds since January 1, 1970 00:00:00.0 UTC.
|
java.lang.String |
getScreenBlueLightFilterMode()
Gets the level of screen blue light filter mode
|
int |
lookAtUser(float doa)
Ask robot to look at user in robot front
|
int |
moveToBestCameraPose(int retry)
Use vision to find predict pose for Camera and move to there
Use default resolution 4096*3072
|
int |
moveToBestCameraPose(int retry,
int width,
int height)
Use vision to find predict pose for Camera and move to there
|
int |
playAction(int number)
Perform predefined actions by turning neck and wheels.
|
int |
playEmotionalAction(RobotFace face,
int playAction)
Perform robot expression and predefined action.
|
int |
resetToDefaultSetting()
Reset to default setting, include voice trigger, touch only signal,
pat on head action, daily dialogue mode, ask back action and
always listen mode.
|
boolean |
setScreenBlueLightFilterMode(java.lang.String mode)
Sets the screen blue light filter mode
|
int |
trackUser()
Ask robot track the nearest user
|
public int followUser()
public int getLastKidnapTime()
Value will return by onResult callback, Bundle result contain key "last_kidnap_time_millis" and type is long.
RobotCallback.onResult(int, int, RobotErrorCode, Bundle)
public java.lang.String getScreenBlueLightFilterMode()
public int lookAtUser(float doa)
doa
- direction of arrivalpublic int moveToBestCameraPose(int retry)
retry
- retry times for this functionpublic int moveToBestCameraPose(int retry, int width, int height)
retry
- retry times for this functionwidth
- width for resolution of platform camera in pixelsheight
- height for resolution of platform camera in pixelspublic int playAction(int number)
Utility.PlayAction
to set action number, naming with loop will be incessant replay.
Use RobotAPI.cancelCommandBySerial(int)
,
RobotAPI.cancelCommand(int)
(int)} or
RobotAPI.cancelCommandAll()
(int)} to cancel action.number
- number of predefined actionUtility.PlayAction
public int playEmotionalAction(RobotFace face, int playAction)
Utility.PlayAction
to set action number, naming with loop will be incessant replay.
Use RobotAPI.cancelCommandBySerial(int)
,
RobotAPI.cancelCommand(int)
(int)} or
RobotAPI.cancelCommandAll()
(int)} to cancel action.face
- face expression IDplayAction
- action IDDialogSystem.setExpression(RobotFace)
,
Utility.PlayAction
public int resetToDefaultSetting()
public boolean setScreenBlueLightFilterMode(java.lang.String mode)
mode
- The level of blue light filter mode. The sequence of levels is
"RdStrong", "Rd03", "Rd02", "Rd01", "RdWeak", and "DEF".
The "RdStrong" is highest level, and "DEF" is used to cancel blue
light filter mode.true
if and only if the operation succeeded.Utility.BlueLightMode
public int trackUser()