Skip to content

Movement

Movement control or in the case of the SDK manual movement control, is essentially a set of methods used in temi's telepresence that allow the user to manually control temi's movement. These movements are explained in further details below.

API Overview

ReturnMethodDescription
voidskidJoy(float x, float y, boolean smart)Manually move temi
voidturnBy(int degrees, float speed)Turn by by a specific degree
voidtiltAngle(int degrees, float speed)Tilt temi's head to a specific angle
voidtiltBy(int degrees, float speed)Tilt temi's head to by a specific degree
voidstopMovement()Stop all movement
booleanpatrol(List<String> locations, boolean nonsotp, int times, int waiting)Patrol
InterfaceDescription
OnRobotLiftedListenerRobot lifted listener
OnMovementVelocityChangedListenerVelocity changed of movement listener
OnMovementStatusChangedListenerStatus changed listener of movement(skidJoy, turnBy) listener

Methods

skidJoy()

Use this method to manually navigate temi on its' axis in a similat fashion to the way it's done in the video call.

  • Parameters

    ParameterTypeDescription
    xfloatfloat value of distance to cover on temi's x axis. The range of values is from 1-(-)1, where 1 is a complete step forward and -1 is complete step backwards on the axis.
    yfloatfloat value of distance to cover on temi's y axis. The range of values is from 1-(-)1, where 1 is a complete step forward and -1 is complete step backwards on the axis.
    smartbooleanBypass obstacles while moving, supported from version 0.10.79
  • Prototype

    java
    void skidJoy(float x, float y);
  • Required permissions

    None.

  • Support from

    0.10.36

  • Recommendation

    • Use the graph below to better understand temi's axis.
    • It's best to use the values 1 and -1 as since values in between will not be noticeable to the untrained eye.
    • It's recommended to give a buffer of at least 500 milliseconds between each command for the best outcome.
    • Backwards speed is lower than forward's since there are less sensors and we want to reduce the risk of damage.

  • Examples

    • Forward - robot.skidJoy(1,0) for how long as you want it to move forward.
    • Left - robot.skidJoy(0,1) until the robot is facing the direction you want it to move to

turnBy()

Use this method to manually turn temi's body by a certain degree.

  • Parameters

    ParameterTypeDescription
    degreesintThe degrees you want to temi's body to turn.
    speedfloat[Optional parameter] The coefficient of the maximum speed, the value range is 0~1. Support from 0.10.77.
  • Prototype

    java
    void turnBy(int degrees, float speed);
  • Required permissions

    None.

  • Support from

    0.10.36


tiltAngle()

Use this method to manually tilt temi's head to a certain degree.

  • Parameters

    ParameterTypeDescription
    degreesintThe degrees you want to temi's head to tilt to.
    speedfloat[Optional parameter] The coefficient of the maximum speed, the value range is 0~1. Support from 0.10.77.
  • Prototype

    java
    void tiltAngle(int degrees, float speed);
  • Required permissions

    None.

  • Support from

    0.10.36

  • Notes

    • Take into account that the tilt range is from -25 degrees which means temi is looking all the way down until +55 degrees which means it's looking all the way up.
    • 0 degrees means temi is looking straight ahead.

tiltBy()

Use this method to manually tilt temi's head by a certain degree.

  • Parameters

    ParameterTypeDescription
    degreesintThe amount of degrees you want to tilt by
    speedfloat[Optional parameter] The coefficient of the maximum speed, the value range is 0~1. Support from 0.10.77.
  • Prototype

    java
    void tiltBy(int degrees, float speed);
  • Required permissions

    None.

  • Support from

    0.10.36

  • Notes

    • Take into account that the tilt range is from -25 degrees which means temi is looking all the way down until +55 degrees which means it's looking all the way up.
    • 0 degrees means temi is looking straight ahead.
    • It's recommended to use this method to make small tilt adjustments and not big ones, if you want temi to make bigger adjustments use tiltAngle() instead.

stopMovement()

Use this method to manually stop temi from moving.

  • Prototype

    java
    void stopMovement();
  • Notes

    • Use this method to abort any of the actions taken by the methods above.
    • Use this method to stop navigation commands as well.

patrol()

Use this method to patrol between locations.

  • Parameters

    ParameterTypeDescription
    locationsList<String>at least 3 valid locations, can be duplicated. Home base will be ignored and should not be included.
    nonstopboolean[Optional parameter] if set as true, it will just arrive at the position of location, without tilt and turn, and then immediately head to next location. default as false
    timesint[how many times should it go on the route. 0: infinite, 1: once, and so on.
    waitingint[Optional parameter] If [nonstop] is false, the time in seconds it should wait on each location. Range from 3 - 60, default is 3
  • Return

    TypeDescription
    booleantrue if patrol is executed.
  • Prototype

    java
    boolean patrol(List<String> locations, boolean nonsotp, int times, int waiting);
  • Required permissions

    None.

  • Support from

    1.129.1

Interfaces

OnRobotLiftedListener

Set your context to implement this listener and add the override method to perceive whether the robot is lifted.

Prototype

java
package com.robotemi.sdk.listeners;

interface OnRobotLiftedListener {}

Abstract methods

  • Parameters

    ParameterTypeDescription
    isLiftedbooleantrue means robot is lifted, false otherwise
    reasonString-
  • Prototype

    java
    void onRobotLifted(boolean isLifted, String reason);

Method for adding listener

  • Parameters

    ParameterTypeDescription
    listenerOnRobotLiftedListenerAn instance of a class that implements this interface
  • Prototype

    java
    void addOnRobotLiftedListener(OnRobotLiftedListener listener);

Method for removing listener

  • Parameters

    ParameterTypeDescription
    listenerOnRobotLiftedListenerAn instance of a class that implements this interface
  • Prototype

    java
    void removeOnRobotLiftedListener(OnRobotLiftedListener listener);
  • Support from

    0.10.70


OnMovementVelocityChangedListener

Set your context to implement this listener and add the override method to listen to the velocity changes of movement.

Prototype

java
package com.robotemi.sdk.listeners;

interface OnMovementVelocityChangedListener {}

Abstract methods

  • Parameters

    ParameterTypeDescription
    velocityfloatVelocity of movement, the unit is m/s
  • Prototype

    java
    void onMovementVelocityChanged(float velocity);

Method for adding listener

  • Parameters

    ParameterTypeDescription
    listenerOnMovementVelocityChangedListenerAn instance of a class that implements this interface
  • Prototype

    java
    void addOnMovementVelocityChangedListener(OnMovementVelocityChangedListener listener);

Method for removing listener

  • Parameters

    ParameterTypeDescription
    listenerOnMovementVelocityChangedListenerAn instance of a class that implements this interface
  • Prototype

    java
    void removeOnMovementVelocityChangedListener(OnMovementVelocityChangedListener listener);
  • Support from

    0.10.77


OnMovementStatusChangedListener

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

Prototype

java
package com.robotemi.sdk.listeners;

interface OnMovementStatusChangedListener {}

Static constant

ConstantTypeValueDescription
TYPE_SKID_JOYString"skidJoy"Movement type - skidJoy
TYPE_TURN_BYString"turnBy"Movement type - turnBy
STATUS_STARTString"start"Movement started
STATUS_GOINGString"going"Moving
STATUS_OBSTACLE_DETECTEDString"obstacle detected"Obstacle detected during the movement
STATUS_NODE_INACTIVEString"node inactive"Node inactive
STATUS_CALCULATINGString"calculating"Calculating
STATUS_COMPLETEString"complete"Movement completed
STATUS_ABORTString"abort"Movement abort

Abstract methods

  • Parameters

    ParameterTypeDescription
    typeStringMovement type
    statusStringMovement status
  • Prototype

    java
    void onMovementStatusChanged(String type, String status);

Method for adding listener

  • Parameters

    ParameterTypeDescription
    listenerOnMovementStatusChangedListenerAn instance of a class that implements this interface
  • Prototype

    java
    void addOnMovementStatusChangedListener(OnMovementStatusChangedListener listener);

Method for removing listener

  • Parameters

    ParameterTypeDescription
    listenerOnMovementStatusChangedListenerAn instance of a class that implements this interface
  • Prototype

    java
    void removeOnMovementStatusChangedListener(OnMovementStatusChangedListener listener);
  • Support from

    0.10.77