Skip to content
lcgao edited this page Dec 16, 2019 · 5 revisions

Overview

Be With Me AKA Follow Mode tells temi to search for a person that is standing next to it, lock on 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. temi also has the option to constraint follow, in this case temi tracks only on its axis using turn and tilt but with no movement.

Applications

  1. To initiate follow mode use the method beWithMe().
  2. To initiate constraint follow mode use the method constraintBeWith().
  3. To listen for follow status changes add OnBeWithMeStatusChangedListener to the addOnBeWithMeStatusChangedListener method.
  4. To stop listening for follow status changes remove the listener using the removeOnBeWithMeStatusChangedListener()
  5. To listen for constraint follow status changes add OnConstraintBeWithStatusChangedListener to the addOnConstraintBeWithStatusChangedListener method.
  6. To stop listening for constraint follow status changes remove the listener using the removeOnConstraintBeWithStatusChangedListener()

Methods

Below are the details regarding the 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()

    ◆ Constraint Follow

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

    Use this method to manually invoke the constraint follow mode. Constraint Follow mode is the state where temi searches for a person standing in front of it and once found it locks on to their movement until told otherwise. Unlike the regular follow in constraint mode temi only tilts and turns on its' axis it does not leave its' position.

    Returns
  • void object

  • Exceptions
    RemoteException constraintBeWith() error

    Listeners

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

    ◆ Add 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.removeOnBeWithMeStatusChangedListener ( 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 Constraint Follow Listener

    com.robotemi.sdk.Robot.addOnConstraintBeWithStatusChangedListener ( OnConstraintBeWithStatusChangedListener  listener
    )
    void

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

    Parameters
    listener A listener object of type OnConstraintBeWithStatusChangedListener that contains a void method onConstraintBeWithStatusChanged(boolean isConstraint) which returns a boolean value regarding the constraint status. For more information click on the method link above.
    Returns
    void object.

    ◆ Remove Constraint Follow Listener

    com.robotemi.sdk.Robot.removeOnConstraintBeWithStatusChangedListener ( OnConstraintBeWithStatusChangedListener  listener
    )
    void

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

    Parameters
    listener The OnConstraintBeWithStatusChangedListener that you wish to remove from the list of constraint follow status change listeners registered
    Returns
    void object.

    Models

    Below are the details regarding models used in Follow 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
  • OBSTACLE_DETECTED ("obstacle detected") - temi detected obstacles

  • ◆  Constraint Be With Me Status Change Listener

    Interface
    com.robotemi.sdk.listeners.onConstraintBeWithStatusChangedListener {
    void onConstraintBeWithStatusChanged ( boolean isConstraint )
    }

    Set your context to implement this listener and add the override method to get the latest status regarding the constraint follow mode. There are two possible statuses for the constraint follow mode:

  • true - temi is in constraint mode and is tracking
  • false - temi is not or is no longer in constraint mode
  • Clone this wiki locally