Skip to content

Movement

lcgao edited this page Nov 5, 2019 · 20 revisions

Overview

There are two main use cases with regards to movement. The first is the follow mode, and the second is manual motion control. The SDK provides methods that allows developers to handle both. Be With Me AKA Follow Mode tells temi to search for a person that is standing next to it, lock on it and then follow it's movement. Generally, a user would click on temi's top hard button or verbally ask temi to follow them, however, with the SDK you can trigger this feature programatically. Manual movement control, is essentially the 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.

Applications

  1. To initiate follow mode use the method beWithMe().
  2. To manually move temi using the joystick functionalities use the method skidJoy().
  3. To turn by by a specific degree use the method turnBy().
  4. To tilt temi's head to a specific angle use the method tiltAngle().
  5. To tilt temi's head to by a specific degree use the method tiltBy().
  6. To stop all movement use the method stopMovement()
  7. To listen for follow status changes add OnBeWithMeStatusChangedListener to the addOnBeWithMeStatusChangedListener method.
  8. To stop listening for follow status changes remove the listener using the removeOnBeWithMeStatusChangedListener()

Methods

Below are the details regarding the movement and follow methods you can use from SDK.

◆ Follow Mode

com.robotemi.sdk.Robot.beWithMe ( ) void

Use this method to manually invoke the follow mode. Follow mode is the state where temi searches for a person standing in front of it and once found it locks on and follows their movement until told otherwise.

Returns
  • void object
  • Exceptions
    RemoteException Failed to start beWithMe()

    ◆ Joystick

    com.robotemi.sdk.Robot.skidJoy ( float  x
    float  y
    )
    void

    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
    x float 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.
    y float 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.
    Returns
  • void object
  • Exceptions
    RemoteException Failed to skidJoy()
    Notes
  • 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(1,0) until the robot is facing the direction you want it to move to and then send the

  • ◆ Turn By

    com.robotemi.sdk.Robot.turnBy ( int  degrees ) void

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

    Parameters
    degrees int value of the degrees you want to temi's body to turn.
    Returns
  • void object
  • Exceptions
    RemoteException Failed to start turnBy()
    Notes
  • To turn left use positive degrees, to turn right use negative degrees

  • ◆ Tilt Angle

    com.robotemi.sdk.Robot.tiltAngle ( int  degrees ) void

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

    Parameters
    degrees int value of the degrees you want to temi's head to tilt to.
    Returns
  • void object
  • Exceptions
    RemoteException Failed to start tiltAngle()
    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

  • ◆ Tilt By

    com.robotemi.sdk.Robot.tiltBy ( int  degrees ) void

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

    Parameters
    degrees int value of the amount of degrees you want to tilt by.
    Returns
  • void object
  • Exceptions
    RemoteException Failed to start tiltBy()
    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.

  • ◆ Stop Movement

    com.robotemi.sdk.Robot.stopMovement ( ) void

    Use this method to manually stop temi from moving.

    Returns
  • void object
  • Exceptions
    RemoteException Failed to start stopMovement()
    Notes
  • Use this method to abort any of the actions taken by the methods above.
  • Use this method to stop go to navigation commands as well.

  • Listeners

    Below are the details regarding how to listen for movement changes.

    ◆ Follow Mode Listener

    com.robotemi.sdk.Robot.addOnBeWithMeStatusChangedListener ( OnBeWithMeStatusChangedListener  listener
    )
    void

    Use this method to add a listener for temi follow mode status changes

    Parameters
    listener A listener object of type OnBeWithMeStatusChangedListener that contains a void method onBeWithMeStatusChanged(String status) which returns a string message regarding the follow status. For more information click on the method link above.
    Returns
    void object.

    ◆ Remove Follow Mode Listener

    com.robotemi.sdk.Robot.removeOnGoToLocationStatusChangedListener ( OnBeWithMeStatusChangedListener  listener
    )
    void

    Use this method to remove a specific listener for temi follow mode changes

    Parameters
    listener The OnBeWithMeStatusChangedListener that you wish to remove from the list of be with status change listeners registered
    Returns
    void object.

    ◆ Add Go To Location Listener

    com.robotemi.sdk.Robot.addOnGoToLocationStatusChangedListener ( OnGoToLocationStatusChangedListener  listener
    )
    void

    Use this method to listen for go to navigation status changes, while temi is navigating to a specific location

    Parameters
    listener A listener object of type OnGoToLocationStatusChangedListener that contains a void method onGoToLocationStatusChanged(String location, String status, int descriptionId, String description) which contains information regarding temi's navigation to a location
    Returns
    void object.
    Notes
  • See OnGoToLocationStatusChangedListener for more information on the different navigation statuses

  • ◆ Remove Go To Location Listener

    com.robotemi.sdk.Robot.removeOnGoToLocationStatusChangedListener ( OnGoToLocationStatusChangedListener  listener
    )
    void

    Use this method to remove a specific listener for go to navigation changes

    Parameters
    listener The OnGoToLocationStatusChangedListener that you wish to remove from the list of go to listeners registered
    Returns
    void object.

    Models

    Below are the details regarding models used in location methods

    ◆ Be With Me Status Change Listener

    Interface
    com.robotemi.sdk.listeners.OnBeWithMeStatusChangedListener {
    void onBeWithMeStatusChanged ( String status )
    }

    Set your context to implement this listener and add the override method to get the latest status regarding the follow mode. Possible statuses for follow mode are (value in parenthesis is the actual string value that will be returned) :

  • ABORT("abort") - When the user or temi aborts the follow action
  • CALCULATING("calculating") - When temi gets stuck following due to an obstacle and is trying to figure its' way around it
  • SEARCH("search") - Follow mode is triggered and temi is looking for a person to follow
  • START("start") - temi has found a person and following has began
  • TRACK("track") - temi is following
  • Clone this wiki locally