Skip to content

Navigation & Map & Floor

Location

There are two main use cases in regard to locations. The first is location management, and the second is location navigation. The SDK provides methods that allows developers to handle both.

Location management allows you to control temi's locations by saving, deleting, fetching and monitoring their changes, while location navigation allows you to send temi to one of those locations and monitor its navigation status while it's in motion.

Map

Map is a combination of:

  • Processed lidar data from ROBOX, the algorithm core of temi
  • Map elements, including locations, green paths, and virtual walls.
  • Map image, a visual abstraction of map raw data for UI presentation.

A map can be loaded, switched, backed up, and cached.

Map Id

There may be some confusion as map id is referred under its context.

When reference map on algorithm wise, e.g. MapDataModel, it has a map id which is unique across algorithm map, the one from process lidar data. This id should be only used by ROBOX as an identifier, and served no other purpose.

When (SDK) users load a map, they are using the map id idenfying the combination. e.g. MapModel. This id is generated from temi cloud service when we back up a map to cloud. Thus it can be fetched from cloud, and reloaded to the robot.

Map cache

When user backups or imports a map from UI or SDK, the map combination will be cached locally for quicker access next time. So when you switching between different maps, the large map file will not be downloaded every time. Starting from 129 version, there are methods to load map from cloud to cache, also force load map from cache.

Local map backup.

From 131 version, with SDK 1.131.3, you can backup current map to you app, and load map backup from your app to temi. The whole process can be made offline, without using temi cloud services.

Navigate to Local Map Backup section for details.

Multi-Floor

From 129 version, we offered the developer access of multifloor function from SDK. This should benefit temi robots serving in complex or dynamic cartographic environments. Once enabled, all the floor APIs can be used, also a new map editor with multifloor functions will be available in temi settings.

Every floor contains a standalone map, which has all map attributes and can be created, recreated, replaced, backed up, plus the features in multifloor of like copying map from other floor. Such operations on one floor will not affect map on other floors.

All the floors and their maps are stored locally on the robot and can be switched offline until they are deleted from the user operations in the map editor.

API Overview

ReturnMethodDescription
booleansaveLocation(String location)Save location
booleandeleteLocation(String location)Delete location
List<String>getLocations()Fetch all saved locations
voidgoTo()Send temi to a specific location
voidgoToPosition()Send temi to a specific position(coordinate)
MapDataModelgetMapData()Get the map data
voidrepose(Position position)Repositioning temi
List<MapModel>getMapList()Get the list of backed up map
StringloadMap(String mapId)Load map by map ID
StringloadMap(String mapId, boolean reposeRequired, Position position, boolean offline, boolean withoutUI)Load the map by map ID and the specific position of the target map
booleansetMultiFloorEnabled(boolean enabled)Enable/Disable Multi-floor function
booleanisMultiFloorEnabled()Check Multi-floor function
FloorgetCurrentFloor()Get current floor data
List<Floor>getAllFloors()Get all floors' data
voidloadFloor(int floorId, Position position)load target floor
PositiongetPosition()get current position
intresetMap()Reset map
intfinishMapping()Finish mapping, lock the map
intupdateMapName()Update current map name
intcontinueMapping()Continue mapping, unlock the map
intupsertMapLayer()Add or edit map layer
intdeleteMapLayer()Delete map layer
InterfaceDescription
OnLocationsUpdatedListenerLocations updated listener
OnGoToLocationStatusChangedListenerGo to location(position) status changed listener
OnDistanceToLocationChangedListenerDistance to locations changed listener
OnCurrentPositionChangedListenerCurrent position changed listener
OnReposeStatusChangedListenerListener for the status changed of repositioning
OnLoadMapStatusChangedListenerListener for the status changed of loading map
OnDistanceToDestinationChangedListenerListener for the distance left to the destination
OnLoadFloorStatusChangedListenerListener for the status of switching of floor
OnRobotDragStateChangedListenerListener for robot being dragged
OnGoToNavPathChangedListenerListener for robot navigation path
ModelDescription
PositionPosition(coordinate) in the map
MapDataModelThe map data
MapImageThe map image data
FloorThe floor data

Methods

saveLocation()

Use this method to save a new location for temi. Locate temi at the location you wish to save and give it a name, the location coordinates are extracted and passed automatically in the request.

  • Parameters

    ParameterTypeDescription
    locationStringLocation name you wish to save
  • Return

    TypeDescription
    booleantrue if save successfully, false otherwise
  • Prototype

    java
    boolean saveLocation(String location);
  • Required permissions

    None.

  • Support from

    0.10.36


deleteLocation()

Use this method to delete a saved location.

  • Parameters

    ParameterTypeDescription
    locationStringLocation name you wish to delete
  • Return

    TypeDescription
    booleantrue if delete successfully, false otherwise
  • Prototype

    java
    boolean deleteLocation(String location);
  • Required permissions

    None.

  • Support from

    0.10.44


getLocations()

Use this method to fetch a list of saved locations.

  • Return

    TypeDescription
    List<String>Locations list
  • Prototype

    java
    List\<String\> getLocations();
  • Required permissions

    None.

  • Support from

    0.10.36


goTo()

Use this method to send temi to one of your saved locations.

  • Parameters

    ParameterTypeDescription
    locationStringLocation name you wish the robot to navigate to. Use home base as location name when go back to charge.
    backwardsbooleanIf true will walk backwards to the destination. false by default. Support from 0.10.80
    noByPassbooleanIf true will disallow bypass the obstacles during go to. Pass null to follow the Settings -> Navigation Settings. Support from 0.10.80
    speedLevelSpeedLevelThe speed level of this single go to session. Pass null to start with the speed level in Settings -> Navigation Settings. Support from 0.10.80
    highAccuracyArrivalbooleanIf true , temi will try to make this go to session precisly on the pose of location, Support from 1.135.1, with 135 launcher
    noRotationAtEndbooleanIf true , temi will no rorate to the saved angle of location upon arrival, Support from 1.135.1, with 135 launcher
  • Prototype

    java
    void goTo(String location, boolean backwards, boolean noBypass, SpeedLevel speedLevel, boolean highAccuracyArrival, boolean noRotationAtEnd);
  • Required permissions

    None.

  • Support from

    0.10.36


goToPosition()

Use this method to send temi to a specific position(coordinate).

  • Parameters

    ParameterTypeDescription
    positionPositionDestination coordinate. Ignore its' attribute tiltAngle in this method. Set yaw in position to 999, will cancel the rotation upon arrival.
    backwardsbooleanIf true will walk backwards to the destination. false by default. Support from 0.10.80
    noByPassbooleanIf true will disallow bypass the obstacles during go to. Pass null to follow the Settings -> Navigation Settings. Support from 0.10.80
    speedLevelSpeedLevelThe speed level of this single go to session. Pass null to start with the speed level in Settings -> Navigation Settings. Support from 0.10.80
    highAccuracyArrivalbooleanIf true , temi will try to make this go to session precisly on the pose of location, Support from 1.135.1, with 135 launcher
  • Prototype

    java
    void goToPosition(Position position, boolean backwards, boolean noBypass, SpeedLevel speedLevel, boolean highAccuracyArrival);
  • Required permissions

    None.

  • Support from

    0.10.70


getMapData()

Use this method to get the map data.

This method currently(0.10.70) only supports relatively small map, we will support large map in the next version. <br/>(Fixed in version 0.10.71)

Newly added virtual walls, navigation paths and locations data in 0.10.74.

  • Return

    TypeDescription
    MapDataModelThe map data
  • Prototype

    java
    MapDataModel getMapData();
  • Required permissions

    Map

  • Support from

    0.10.70

  • Note

    This method is a time-consuming operation and is recommended to be used in a non-main thread. For more details please refer to the Sampe code.


repose()

Use this method to start repositioning if temi has lost his position(Caused by being lifted, dragged, etc.).

  • Parameters

    ParameterTypeDescription
    positionPositionAdded in 134 version, optional, default is null. Assign a position to repose upon
  • Prototype

    java
    void repose(Position position);
  • Required permissions

    None.

  • Support from

    0.10.72


getMapList()

Use this method to get the list of the backed up maps.

  • Return

    TypeDescription
    List<MapModel>List of maps
  • Prototype

    java
    List\<MapModel\> getMapList();
  • Required permissions

    Map

  • Support from

    0.10.74


loadMap()

Use this method to load the map by map ID.

  • Parameters

    ParameterTypeDescription
    mapIdStringID of the map backup in MapModel
  • Return

    TypeDescription
    StringRequest id. In the format of UUID, e.g. 538b44c9-fdcf-426a-9693-d72e9c0f9550. Used in onLoadMapStatusChanged callback to track load map result. Supported from 129 version, otherwise void is returned
  • Prototype

    java
    String loadMap(String mapId);
  • Required permissions

    Map

  • Support from

    0.10.74


loadMap()

Use this method to load the map by map ID and the specific position of the target map.

Only map Id is required, other parameters are optional with default values set.

  • Parameters

    ParameterTypeDescription
    mapIdStringID of the map backup in MapModel
    reposeRequiredbooleanNeed to do repose after loading map or not, default as false
    positionPositionThe position of robot on the target map to loading the map. If not set, target map will be loaded from home base. Default as null
    offlinebooleanSkip fetching the latest map data of target mapId and use local cache instead, default as false. Supported from 129 version
    withoutUIbooleanLoad the map in the background without showing any blocking UI, default as false. Supported from 129 version
  • Return

    TypeDescription
    StringRequest id. In the format of UUID, e.g. 538b44c9-fdcf-426a-9693-d72e9c0f9550. Used in onLoadMapStatusChanged callback to track load map result. Supported from 129 version, otherwise void is returned
  • Prototype

    java
    String loadMap(String mapId, boolean reposeRequired, Position position, boolean offline, boolean withoutUI);
  • Required permissions

    Map

  • Support from

    0.10.76


setMultiFloorEnabled()

Enable/Disable Multi-floor function

  • Parameters

    ParameterTypeDescription
    enabledbooleantrue to enable,false to disable
  • Return

    TypeDescription
    booleantrue if set, false if failed
  • Prototype

    java
     boolean setMultiFloorEnabled(boolean enabled);
  • Required permissions

    MAP, SETTINGS

  • Support from

    1.129.0


isMultiFloorEnabled()

Check Multi-floor function

  • Return

    TypeDescription
    booleantrue if enabled, false if not, null if Robot in not initiated
  • Prototype

    java
     boolean isMultiFloorEnabled();
  • Required permissions

    None.

  • Support from

    1.129.0


getCurrentFloor()

Get current floor data

  • Return

    TypeDescription
    FloorCurrent floor data, null if service is not initiated, or lack of permission, or no floor data
  • Prototype

    java
      Floor getCurrentFloor();
  • Required permissions

    MAP

  • Support from

    1.129.0


getAllFloors()

Get all floors' data

  • Return

    TypeDescription
    List<Floor>All floors' data, empty if service is not initiated, or lack of permission, or no floor data
  • Prototype

    java
      List\<Floor\> getAllFloors();
  • Required permissions

    MAP

  • Support from

    1.129.0


loadFloor()

load target floor

  • Parameters

    ParameterTypeDescription
    floorIdintfloor id
    positionPositionPosition in map on the target floor to be loaded from
  • Prototype

    java
      void loadFloor(int floorId, Position position);
  • Required permissions

    MAP

  • Support from

    1.129.0


getPosition()

get current position

  • Return

    TypeDescription
    PositionGet current position, will return Position(0, 0, 0, 0) if failed.
  • Prototype

    java
      Position getPosition();
  • Required permissions

    NONE

  • Support from

    1.133.0


resetMap()

Reset current map or reset all floors

  • Parameters

    ParameterTypeDescription
    allFloorbooleantrue to reset all floors
  • Return

    TypeDescription
    int0 not supported,200 succeed,400 invalid operation,403 permission required,408 timeout
  • Prototype

    java
      int resetMap(boolean allFloor);
  • Required permissions

    MAP

  • Support from

    1.134.0


finishMapping()

Finish mapping, lock the map

  • Parameters

    ParameterTypeDescription
    mapNameStringan optional map name, default as null
  • Return

    TypeDescription
    int0 not supported,200 succeed,304 map already locked, 400 invalid operation,403 permission required,408 timeout
  • Prototype

    java
      int finishMapping(String mapName);
  • Required permissions

    MAP

  • Support from

    1.134.0


updateMapName()

Update current map name

  • Parameters

    ParameterTypeDescription
    mapNameStringmap name
  • Return

    TypeDescription
    int0 not supported,200 succeed,400 invalid operation,403 permission required,429 too many requests, wait 2s
  • Prototype

    java
      int updateMapName(String mapName);
  • Required permissions

    MAP

  • Support from

    1.134.0


continueMapping()

Continue mapping, unlock the map

  • Return

    TypeDescription
    int0 not supported,200 succeed,304 map already unlocked,400 invalid operation,403 permission required,408 timeout,429 too many requests, wait 5s
  • Prototype

    java
      int continueMapping();
  • Required permissions

    MAP

  • Support from

    1.134.0


upsertMapLayer()

Add or edit map layer, if layerId exists then update, otherwise create new layer.

  • Parameters

    ParameterTypeDescription
    layerLayermap layer
  • Return

    TypeDescription
    int0 not supported,200 succeed,400 invalid operation,403 permission required,413 contains layer pose out of map
  • Prototype

    java
      int upsertMapLayer(Layer layer);
  • Required permissions

    MAP

  • Support from

    1.134.0


deleteMapLayer()

Delete map layer, only support Green path and Virtual wall.

  • Parameters

    ParameterTypeDescription
    layerIdStringmap layer id
    layerCategoryintmap layer category
  • Return

    TypeDescription
    int0 not supported,200 succeed,400 invalid operation,403 permission required,404 target layer doesn't exist
  • Prototype

    java
      int deleteMapLayer(String layerId, int LayerCategory);
  • Required permissions

    MAP

  • Support from

    1.134.0

Interfaces

OnLocationsUpdatedListener

Set your context to implement this listener and add the override method to get the list of saved locations every time it changes.

Prototype

java
package com.robotemi.sdk.listeners;

interface OnLocationsUpdatedListener {}

Abstract methods

  • Parameters

    ParameterTypeDescription
    locationsList<String>All saved locations list
  • Prototype

    java
    abstract void onLocationsUpdated(List\<String\> locations)

Method for adding listener

  • Parameters

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

    java
    void addOnLocationsUpdatedListener(OnLocationsUpdatedListener listener);

Method for removing listener

  • Parameters

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

    java
    void removeOnLocationsUpdatedListener(OnLocationsUpdatedListener listener);
  • Support from

    0.10.36


OnGoToLocationStatusChangedListener

Set your context to implement this listener and add the override method to get navigation information regarding temi's go to location action.

Prototype

java
package com.robotemi.sdk.listeners;

interface OnGoToLocationStatusChangedListener {}

Static constants

ConstantTypeValueDescription
STARTString"start"Navigation to the location has started
CALCULATINGString"calculating"Calculating the route to the location
GOINGString"going"Calculated the route and is on its' way
COMPLETEString"complete"Arrived at the desired location
ABORTString"abort"Navigation aborted
REPOSINGString"reposing"Reposing during the navigation

Abstract methods

  • Parameters

    ParameterTypeDescription
    locationStringThe name of the location temi is navigating to
    statusStringNavigation status
    descriptionIdintNumerical code that reflects the description of the status
    descriptionStringVerbose more informative description of the navigation status (Such as obstacle info)
  • DescriptionId 对应内容

    DescriptionIdDescription
    500"Complete"
    0"Abort General"
    1003"Abort no movement"
    1004"Abort timeout"
    1005"Abort by user"
    1006"Abort out of map bounds"
    1060"Path Plan"
    2000"Obstacle"
    2001"Ground Obstacle"
    2002"Hight Obstacle"
    2003"Lidar Obstacle"
    2004"Front Obstacle"
    2005"Back Obstacle"
    2006"Abyss Obstacle"
    2007"Virtual Wall Obstacle"
    2008"Cliff Detected"
    2009"Stuck Wheel"
    1020- 1050"Calculating"
    5000- 5021"Calculating"
    10007"Going"
    10008"Path Planing" // Added in 134 version
    10009"Docking" // Added in 134 version
    -"Unknown"
  • Prototype

    java
    void onGoToLocationStatusChanged(String location, String status, int descriptionId, String description);

Method for adding listener

  • Parameters

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

    java
    void addOnGoToLocationStatusChangedListener(OnGoToLocationStatusChangedListener listener);

Method for removing listener

  • Parameters

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

    java
    void removeOnGoToLocationStatusChangedListener(OnGoToLocationStatusChangedListener listener);
  • Support from

    0.10.36


OnDistanceToLocationChangedListener

Set your context to implement this listener and add the override method to get the distances to saved locations.

Prototype

java
package com.robotemi.sdk.navigation.listener;

interface OnDistanceToLocationChangedListener {}

Abstract methods

  • Parameters

    ParameterTypeDescription
    distancesMap<String, Float>A key-value pair collection with String type key(location name) and Float type value(distance)
  • Prototype

    java
    void onDistanceToLocationChanged(Map\<String, Float\> distances);

Method for adding listener

  • Parameters

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

    java
    void addOnDistanceToLocationChangedListener(OnDistanceToLocationChangedListener listener);

Method for removing listener

  • Parameters

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

    java
    void removeOnDistanceToLocationChangedListener(OnDistanceToLocationChangedListener listener);
  • Support from

    0.10.70


OnCurrentPositionChangedListener

Set your context to implement this listener and add the override method to get current position information.

Prototype

java
package com.robotemi.sdk.navigation.listener;

interface OnCurrentPositionChangedListener {}

Abstract methods

  • Parameters

    ParameterTypeDescription
    positionPositionCurrent position
  • Prototype

    java
    void onCurrentPositionChanged(Position position);

Method for adding listener

  • Parameters

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

    java
    void addOnCurrentPositionChangedListener(OnCurrentPositionChangedListener listener);

Method for removing listener

  • Parameters

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

    java
    void removeOnCurrentPositionChangedListener(OnCurrentPositionChangedListener listener);
  • Support from

    0.10.70


OnReposeStatusChangedListener

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

Prototype

java
package com.robotemi.sdk.navigation.listener;

interface OnReposeStatusChangedListener {}

Static constant

All constants here are only for the status of repositioning.

ConstantTypeValueDescription
IDLEint0Idle
REPOSE_REQUIREDint1Ready to reposition
REPOSING_STARTint2Reposition started
REPOSING_GOINGint3Repositioning
REPOSING_COMPLETEint4Reposition completed
REPOSING_OBSTACLE_DETECTEDint5Obstacle detected during repositioning
REPOSING_ABORTint6Reposition abort

Abstract methods

  • Parameters

    ParameterTypeDescription
    statusintStatus of reposition
    descriptionStringDescription of status
  • Prototype

    java
    void onReposeStatusChanged(int status, String description);

Method for adding listener

  • Parameters

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

    java
    void addOnReposeStatusChangedListener(OnReposeStatusChangedListener listener);

Method for removing listener

  • Parameters

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

    java
    void removeOnReposeStatusChangedListener(OnReposeStatusChangedListener listener);
  • Support from

    0.10.72


OnLoadMapStatusChangedListener

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

Prototype

java
package com.robotemi.sdk.map;

interface OnLoadMapStatusChangedListener {}

Static constant

All constants here are only for the status of loading map.

ConstantTypeValueDescription
COMPLETEint0Complete
STARTint1Start
ERROR_UNKNOWNint1000Unknown error
ERROR_ABORT_FROM_ROBOXint2000Abort by Robox
ERROR_ABORT_ON_NOT_CHARGINGint2001Loading without charging
ERROR_ABORT_BUSYint2002temi is on another blocking task
ERROR_ABORT_ON_TIMEOUTint3000Timeout
ERROR_PB_STREAM_FILE_INVALIDint4000Invalid PB file
ERROR_GET_MAP_DATAint5000Get error while getting map data from remote

Abstract methods

  • Parameters

    ParameterTypeDescription
    statusintStatus of loading map
    requestIdStringRequest id obtained from loadMap(), Supported from 129.
  • Prototype

    java
    void onLoadMapStatusChanged(int status, String requestId);

Method for adding listener

  • Parameters

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

    java
    void addOnLoadMapStatusChangedListener(OnLoadMapStatusChangedListener listener);

Method for removing listener

  • Parameters

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

    java
    void removeOnLoadMapStatusChangedListener(OnLoadMapStatusChangedListener listener);
  • Support from

    0.10.74

OnDistanceToDestinationChangedListener

Set your context to implement this listener and add the override method to get the distance to the destination.

Prototype

java
package com.robotemi.sdk.navigation.listener;

interface OnDistanceToDestinationChangedListener {}

Abstract methods

  • Parameters

    ParameterTypeDescription
    locationStringLocation name of the destination
    distancefloatDistance to the destination
  • Prototype

    java
    void onDistanceToDestinationChanged(location: String, distance: Float);

Method for adding listener

  • Parameters

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

    java
    void addOnDistanceToDestinationChangedListener(OnDistanceToDestinationChangedListener listener);

Method for removing listener

  • Parameters

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

    java
    void removeOnDistanceToDestinationChangedListener(OnDistanceToDestinationChangedListener listener);
  • Support from

    0.10.80

OnLoadFloorStatusChangedListener

Set your context to implement this listener and add the override method to get the status for loading.

Prototype

java
package com.robotemi.sdk.map;

interface OnLoadFloorStatusChangedListener {}

Abstract methods

  • Parameters

    ParameterTypeDescription
    statusint0 complete1 start-1 error
  • Prototype

    java
    void onLoadFloorStatusChanged(int status);

Method for adding listener

  • Parameters

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

    java
    void addOnLoadFloorStatusChangedListener(OnLoadFloorStatusChangedListener listener);

Method for removing listener

  • Parameters

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

    java
    void removeOnLoadFloorStatusChangedListener(OnLoadFloorStatusChangedListener listener);
  • Support from

    1.129.0

OnRobotDragStateChangedListener

A callback to notify robot is being dragged when itself is not in a movement state.

Prototype

java
package com.robotemi.sdk.listeners;

interface OnRobotDragStateChangedListener {}

Abstract methods

  • Parameters

    ParameterTypeDescription
    isDraggedBooleantrue being dragged
  • Prototype

    java
    void onRobotDragStateChanged(Boolean isDragged);

Method for adding listener

  • Parameters

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

    java
    void addOnRobotDragStateChangedListener(OnRobotDragStateChangedListener listener);

Method for removing listener

  • Parameters

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

    java
    void removeOnRobotDragStateChangedListener(OnRobotDragStateChangedListener listener);
  • Support from

    1.130.1

OnGoToNavPathChangedListener

A callback to notify robot‘s path plan on navigation.

Prototype

java
package com.robotemi.sdk.listeners;

interface OnGoToNavPathChangedListener {}

Abstract methods

  • Parameters

    ParameterTypeDescription
    pathList<LayerPose>The path from current postion to destination
  • Prototype

    java
    void onGoToNavPathChanged(List\<LayerPose\> path);

Method for adding listener

  • Parameters

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

    java
    void addOnGoToNavPathChangedListener(OnGoToNavPathChangedListener listener);

Method for removing listener

  • Parameters

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

    java
    void removeOnGoToNavPathChangedListener(OnGoToNavPathChangedListener listener);
  • Support from

    1.134.0

Models

Position

Used to hold the position information.

Prototype

java
package com.robotemi.sdk.navigation.model;

class Position {}

Attributes

AttributeTypeDescription
xfloatPosition coordinate x
yfloatPosition coordinate y
yawfloatWill be round to [-π, π], 0 degree is the direction of robot when map is reset on home base
tiltAngleintHead tilt angle

MapDataModel

Used to hold the map data.

Prototype

java
package com.robotemi.sdk.map;

class MapDataModel {}

Attributes

AttributeTypeDescription
mapImageMapImageThe map image data
mapIdStringMap ID, this is the identifier of map data, which is different from id in MapModel, which is used to identify map backups
mapInfoMapInfoMap information
virtualWallsList<Layer>Layer collection of virtual walls
greenPathsList<Layer>Layer collection of navigation paths
locationsList<Layer>Layer collection of locations
mapNameStringCurrent map name (added in 130 version)

MapImage

Used to hold the map image data.

Prototype

java
package com.robotemi.sdk.map;

class MapImage {}

Attributes

AttributeTypeDescription
typeIdString-
rowsintThe size of the rows of the map data matrix
colsintThe size of the columns of the map data matrix
dtString-
dataList<Integer>The one-dimensional array converted from map data matrix

MapInfo

Used to hold the map information.

Prototype

java
package com.robotemi.sdk.map;

class MapInfo {}

Attributes

AttributeTypeDescription
heightintheight
widthintwidth
originXfloatOrigin coordinate x
originYfloatOrigin coordinate y
resolutionfloatResolution

Layer

Used to hold the map layer data.

Prototype

java
package com.robotemi.sdk.map;

class Layer {}

Attributes

AttributeTypeDescription
layerCreationUTCintTimestamp of creating the layer
layerCategoryintLayer category
layerIdStringLayer ID
layerThicknessfloatLayer thickness
layerStatusintLayer status
layerPosesList<LayerPose>Coordinate collection of the layer
layerDirectionintDirection of virtual wall layer, value can be -1, 0, 1. Added in 1.132.1 version.
layerDataStringString data of layer, added in 1.133.0 version to support MapEraser layer.

LayerPose

Used to hold the coordinate data that make up the map layer.

Prototype

java
package com.robotemi.sdk.map;

class LayerPose {}

Attributes

AttributeTypeDescription
xfloatCoordinate x
yfloatCoordinate y
thetafloat-

MapDataModelKt

Prototype

java
package com.robotemi.sdk.map;

class MapDataModelKt {}

Static constant

Layer category
ConstantTypeValueDescription
GREEN_PATHint0Navigation path
VIRTUAL_WALLint3Virtual wall
LOCATIONint4Location
MAP_ERASERint6Map eraser
Layer status
ConstantTypeValueDescription
STATUS_CURRENTint0
STATUS_UPDATEint1
STATUS_ADD_POSEint2
STATUS_DELETEint3

MapModel

Used to hold the map information of the backed up map list.

Prototype

java
package com.robotemi.sdk.map;

class MapModel {}

Attributes

AttributeTypeDescription
idStringID of the map backup
nameStringName of the map

Floor

Used to hold the information of the floor.

Prototype

java
package com.robotemi.sdk.map;

class Floor {}

Attributes

AttributeTypeDescription
idStringID of the floor
nameStringName of the floor
mapIdStringmapId of the floor, this is the one from MapDataModel
locationsList <Location>locations on the floor