-
Notifications
You must be signed in to change notification settings - Fork 2
AXSDK1_0_en
Welcome to the journey of robot development. Based on the AutoXing robot SDK, you can quickly achieve comprehensive control of the robot and create your own robot. This document mainly describes how to develop a robot application using the JavaScript language.
Related operations with the map data and position of the robot itself, such as map switching and localization.
Provides interfaces for robot motion control, status retrieval, and related parameter settings.
The control interfaces for robot-associated hardware devices, such as sprayers (for disinfection robots), box doors (for delivery robots), and LED strip control.
Provides control interfaces for robot task operations.
Provides APIs for web-based map display and editing.
All SDKs are provided in the form of Node.js modules. It requires developers to have a certain understanding of Node.js and JavaScript. If you have not worked with Node.js and JavaScript before, please read the official documentation of Node.js and JavaScript:
Developing robot applications requires a Node.js environment and an IDE tool.
The compilation and debugging tools for the robot application are developed based on Node.js. To use them properly, you need to configure the Node.js runtime environment.
Download and install the Node.js runtime environment according to your actual situation: https://nodejs.org/en/download/
The development of robot applications is done using the JavaScript language. We recommend using WebStorm or Visual Studio Code for development.
# npm i -save-dev @autoxing/robot-js-sdk
The SDK must be initialized before it can be used. The following is an example of SDK initialization code:
import { AXRobot, AppMode } from "@autoxing/robot-js-sdk";
// Create an instance of AXRobot
const axRobot = new AXRobot("<appId>", "<appSecret>", AppMode.WAN_APP);
// Initialize the AXRobot instance
const successed = await axRobot.init();
if (successed) {
try {
// Connect to a specific robot
const res = await axRobot.connectRobot({
robotId: "<robotId>"
});
console.log("connect success: " + res.robotId);
// do something with robot
} catch(err) {
console.log(err.errText)
}
} else {
// Initialization failed
}
- appId - Application ID, can be obtained from relevant operators
- appSecret - Data request secret key, can be obtained from relevant operators
The SDK must be initialized before it can be used. The following is an example of SDK customization code:
import { AXRobot, AppMode } from "@autoxing/robot-js-sdk";
// Create a customized instance of AXRobot
const axRobot = new AXRobot("<appId>", "<appSecret>", AppMode.WAN_APP, "<serverUrl>", "<websocketUrl>");
// Initialize the AXRobot instance
const successed = await axRobot.init();
if (successed) {
try {
// Connect to a specific robot
const res = await axRobot.connectRobot({
robotId: "<robotId>"
});
console.log("connect success: " + res.robotId);
// do something with robot
} catch(err) {
console.log(err.errText)
}
} else {
// Initialization failed
}
- appId - Application ID, can be obtained from relevant operators
- appSecret - Data request secret key, can be obtained from relevant operators
- serverUrl - Customization server address
- websocketUrl - Customization websocket address - Optional
- Note:
- 1: Use SDK version v1.0.74 or above
- 2: If only serverUrl is provided but websocketUrl is not, the websocketUrl will be automatically generated based on the serverUrl
- Example: http://127.0.0.1:8080/ -> ws://127.0.0.1:8080/、https://127.0.0.1:8080/ -> wss://127.0.0.1:8080/
- 3: If websocketUrl is provided, the provided url will be used
Define a map container in your HTML file:
...
<div id="map" style="width:100%;height:500px;"></div>
...Initialize the map:
import { AXRobot, AppMode } from "@autoxing/robot-js-sdk";
// Create an instance of AXRobot
const axRobot = new AXRobot("<appId>", "<appSecret>", AppMode.WAN_APP);
const success = await axRobot.init();
if (success) {
// Create the map
const axMap = axRobot.createMap("map"); // map is the id of the HTML container tag
// Set the area of the map to display
axMap.setAreaMap("<areaId>"); // areaId is the map area identifier
// do something with mapinit() -> {Promise.<boolean>}
Initialize the instance
Return value Promise.<boolean>
Whether the initialization is successful
-
true- Success -
false- Failure
Example
import { AXRobot, AppMode } from "@autoxing/robot-js-sdk";
const axRobot = new AXRobot("<appId>", "<appSecret>", AppMode.WAN_APP);
const successed = await axRobot.init();
if (successed) {
// Initialization succeeded
...
} else {
// Initialization failed
...
}destroy() -> {void}
Destroy the robot operation instance.
Parameters
None
Returns
None
Example
...
axRobot.destroy();
...connectRobot(req) -> {Promise}
Connects to the robot.
Parameters
| Name | Data Type | Description |
|---|---|---|
req |
ReqConnect | Connection parameters |
Return Promise
None
Example
// Initialize robot operation instance
...
try {
const res = await axRobot.connectRobot({
robotId: "<robotId>"
});
console.log("Connect success: " + res.robotId);
// do something
} catch(err) {
console.log(err.errText);
}getVersion() -> {string}
Get the version number of the SDK.
Parameters
None
Return Value string
A string representing the SDK version number.
Example
const version = axRobot.getVersion();
console.log(version);setLanguage(language) -> {Promise.<boolean>}
Set the language
Parameters
| Name | Type | Description |
|---|---|---|
language |
number | Language identifier 1 - Simplified Chinese 2 - English 3 - Traditional Chinese 4 - Japanese 5 - Korean |
Returns Promise.<boolean>
Whether the operation is successful
-
true- Success -
false- Failure
Example
...
success := await axRobot.setLanguage(1);
if (success) {
...
} else {
...
}
...createMap(containerId, backgroundColor opt) -> {Promise.<AXMap>}
Create a map.
Parameters
| Name | Data Type | Description | Remarks |
|---|---|---|---|
containerId |
string | HTML tag ID of the map container | |
backgroundColor |
string | Optional; background color of the map | "#eeeeee" |
glyphs |
string | Optional; font library for the map | 1: For web platforms, you can use http, https, or relative paths 2: For non-web platforms, you must use http or https |
Return Value Promise.<AXMap>
Map instance
Example
...
const map = await axRobot.createMap("map", "#eeeeee");
...resetMap(areaId) -> {Promise.<boolean>}
Resets the robot's map area.
Parameters
| Name | Data Type | Description |
|---|---|---|
areaId |
string | Map area identifier |
Return Value Promise.<boolean>
Indicates if the setting was successful.
-
true- Success -
false- Failure
Example
...
const success = await axRobot.resetMap("<areaId>");
...resetPose(mapPose) -> {Promise.<boolean>}
Reset the robot's pose.
Parameters
| Name | Data type | Description | Remarks |
|---|---|---|---|
mapPose |
MapPose | Pose | |
isChargingPose |
boolean | Optional; If it's a charging dock pose |
Default is a charging dock pose false: The current robot pose, true: Charging dock pose
|
Return Value Promise.<boolean>
Whether the setup is successful.
-
true- Success -
false- Failure
Example
...
const success = await resetPose({
areaId: "<areaId>",
x: 0,
y: 0,
yaw: 0
});
...updateMap() -> {Promise.<boolean>}
Update the robot's map data.
Parameters
None
Returns Promise.<boolean>
Whether the update was successful or not.
-
true- Success -
false- Failure
Example
...
const success = await axRobot.updateMap();
...getPlaceList() -> {any}
Function to get the list of current regional sites.
Parameters
None
Return value any
List of sites.
Example
...
const list = axRobot.getPlaceList();
...getPoiList(req) -> {Promise.<any>}
Get a list of sites.
Parameters
| Name | Data Type | Description |
|---|---|---|
req |
RequestParam | Request parameters |
Return value Promise.<any>
Site list
Example
...
const result = await getPoiList({
robotId: "<robotId>"
});
console.log(result.count); // Total number of POIs that meet the criteria
console.log(result.list); // Site list
result.list.forEach(poi => {
console.log(poi.areaId); // Identifier of the area where the site is located
console.log(poi.buildingId); // Identifier of the building where the site is located
console.log(poi.businessId); // Identifier of the business to which the site belongs
console.log(poi.floor); // Floor where the site is located
console.log(poi.id); // Identifier of the site
console.log(poi.name); // Name of the site
console.log(poi.type); // Type of the site
console.log(poi.coordinates); // Site coordinates in the format [x, y]; e.g., [13.411045089526397, -6.95027412476179]
console.log(poi.yaw); // Angle value of the site's orientation, in degrees
});
...getRobotOwnCharges() -> {Promise.<any>}
Get a list of charging stations bound to the robot.
Parameters
None
Returns Promise.<any>
Charging station list
Example
...
const charges = await axRobot.getRobotOwnCharges();
console.log(charges.count); // Number of charging stations
console.log(charges.list); // Charging station list
charges.list.forEach(chargingPile => {
console.log(chargingPile.areaId); // Identifier of the area where the charging station is located
console.log(chargingPile.buildingId); // Identifier of the building where the charging station is located
console.log(chargingPile.businessId); // Identifier of the business to which the charging station belongs
console.log(chargingPile.floor); // Floor where the charging station is located
console.log(chargingPile.id); // Identifier of the charging station
console.log(chargingPile.name); // Name of the charging station
console.log(chargingPile.coordinate); // Coordinates of the charging station in the format [x, y]; e.g., [13.411045089526397,-6.95027412476179]
console.log(chargingPile.yaw); // Orientation angle of the charging station in degrees
});
...getEffectiveAreaList() -> {Promise.<any>}
Get the list of effective areas.
Parameters
None
Return value Promise.<any>
| Field Name | Type | Description |
|---|---|---|
status |
number | Response status code 200 - Success 400 - Parameter error 500 - Internal server error |
message |
string | Response status description |
data |
object | Response data |
data.effective |
array | List of effective areas - real floor |
data.ineffective |
array | List of ineffective areas - real floor |
data.effectiveFloorNames |
array | List of effective areas - display floor |
data.ineffectiveFloorNames |
array | List of ineffective areas - display floor |
{
"status": 200,
"message": "ok",
"data": {
"effective": [-1, 1, 3],
"ineffective": [-2, 2, 5, 6, 7],
"effectiveName": [-1, 1, 3],
"ineffectiveName": [-2, 2, 5, 6, 7]
}
}
Example
...
const result = await getEffectiveAreaList();
// do something
...getAreaList() -> {Promise.<any>}
Get the list of areas.
Parameters
None
Return value Promise.<any>
List of areas.
Example
...
const result = await axRobot.getAreaList();
const data = result.data
console.log(data.count); // Number of map areas
console.log(data.list); // List of map areas
data.list.forEach(area => {
console.log(area.id); // Area identifier
console.log(area.buildingId); // Building identifier that the area belongs to
console.log(area.businessId); // Business identifier that the area belongs to
console.log(area.name); // Area name
console.log(area.floor); // Area floor
console.log(area.createTime); // Area creation time
});
...getBusinessId(mode) -> {Promise.<string>}
Get the business identifier of the robot
Parameters
| Name | Type | Description |
|---|---|---|
mode |
number | Optional; robot mode |
Return value Promise.<string>
Business identifier
Example
...
const businessId = await axRobot.getBusinessId();
...getAreaPic(areaId) -> {Promise.<any>}
Get the picture of the area map.
Parameters
| Name | Data Type | Description |
|---|---|---|
areaId |
string | Area identifier |
Return value Promise.<any>
Data stream of the area map picture.
Example
...
const mapData = await axRobot.getAreaPic("<areaId>");
...setEnableTrack(enable) -> void
Enables or disables tracking of the robot's map trajectory (requires map display).
Parameters
| Name | Data Type | Description |
|---|---|---|
enable |
boolean | Whether to track robot trajectory |
Return Value
None
Example
...
axRobot.setEnableTrack(true);
...beginControl() -> {void}
Starts the control of robot movement.
Parameters
None
Return Value
None
Example
...
axRobot.beginControl();
...endControl() -> {void}
Close the robot's movement control.
Parameters
None
Returns
None
Example
...
axRobot.endControl();
...motionFor(type) -> {void}
Robot motion control.
Parameters
| Name | Data type | Description |
|---|---|---|
type |
MotionType | The type of motion |
Return value
None
Example
...
axRobot.motionFor(MotionType.Forward);
...motionControl(linearVelocity, angularVelocity) -> {void}
Controls the movement of the robot.
Parameters
| Name | Data Type | Description |
|---|---|---|
linearVelocity |
number | Linear velocity |
angularVelocity |
number | Angular velocity |
Return Value
None
Example
...
axRobot.motionControl(0.1, 0.2);
...setEmergency(type) -> {void}
Set the robot to emergency stop status.
Parameters
| Name | Data Type | Description |
|---|---|---|
type |
EmergencyType | The emergency stop method. |
Return Value
None
Example
...
axRobot.setEmergency(EmergencyType.Start); // Enter emergency stop status
...
axRobot.setEmergency(EmergencyType.Stop); // End emergency stop status
...moveTo(pose) -> {void}
The robot moves to the specified position
Parameters
| Name | Data Type | Description |
|---|---|---|
pose |
Pose | Pose |
Return Value
None
Example
...
axRobot.moveTo({
x: 0,
y: 0,
yaw: 0
});
...goHome(pose) -> {Promise.<boolean>}
Controls the robot to return to the charging pile.
Parameters
| Name | Data Type | Description |
|---|---|---|
pose |
Pose | Pose |
Return Value Promise.<boolean>
Whether the operation is successful.
-
true- Success -
false- Failure
Example
...
axRobot.goHome({
x: 0,
y: 0,
yaw: 0
});
...subscribeRealState(listener) -> {void}
Subscribe to real-time status of the robot.
Parameters
| Name | Data Type | Description |
|---|---|---|
listener |
OnRobotListner | Callback function for subscribing to real-time robot status. |
Return value
None
Example
...
axRobot.subscribeRealState({
onStateChanged: state => {
console.log(state.isManualMode); // Whether the robot is in manual mode
console.log(state.isTasking); // Whether the robot is executing a task
console.log(state.isCharging); // Whether the robot is charging
console.log(state.isRemoteMode); // Whether the robot is in remote control mode
console.log(state.battery); // Current battery level (percentage)
console.log(state.robotId); // Robot identifier
console.log(state.speed); // Current speed (m/s)
console.log(state.areaId); // Current area ID
console.log(state.isEmergencyStop); // Whether the robot is in emergency stop state
console.log(state.x); // x component of the position coordinates
console.log(state.y); // y component of the position coordinates
console.log(state.yaw); // Current angle (radians)
console.log(state.locQuality); // Current localization quality (0-100)
console.log(state.hasObstruction); // Whether there is currently an obstruction
console.log(state.errors); // Error codes
console.log(state.isGoHome); // Whether the robot is currently returning to the home base for charging
console.log(state.timestamp); // Timestamp of the robot status
// do something
}
});
...getState() -> {Promise.<any>}
Get the current status of the robot.
Parameters
None
Returns Promise.<any>
The current status of the robot.
Example
...
const state = await axRobot.getState();
console.log(state.isManualMode); // Whether it is in manual mode
console.log(state.isTasking); // Whether it is executing a task
console.log(state.isCharging); // Whether it is charging
console.log(state.isRemoteMode); // Whether it is in remote control mode
console.log(state.battery); // Current battery level (percentage)
console.log(state.robotId); // Robot identifier
console.log(state.speed); // Current speed (m/s)
console.log(state.areaId); // Current area ID
console.log(state.isEmergencyStop); // Whether it is in emergency stop mode
console.log(state.x); // x component of position coordinate
console.log(state.y); // y component of position coordinate
console.log(state.yaw); // Current angle (radians)
console.log(state.locQuality); // Current localization quality (0-100)
console.log(state.hasObstruction); // Whether there is currently an obstruction
console.log(state.errors); // Error codes
console.log(state.isGoHome); // Whether it is currently returning to the charging dock
console.log(state.timestamp); // Timestamp of the robot's status
// do something
...setSpeed(speed) -> {Promise.<boolean>}
Set the speed of the robot's movement.
Parameters
| Name | Data Type | Description |
|---|---|---|
speed |
number | Movement speed, in m/s |
Returns Promise.<boolean>
Whether the operation is successful.
-
true- Success -
false- Fail
Example
...
const success = await axRobot.setSpeed(0.5);
...setVolume(volume, mode) -> {Promise.<boolean>}
Set the volume of the robot.
Parameters
| Name | Type | Description |
|---|---|---|
volume |
number | Volume level, range 0~100 |
mode |
number | Execution mode 1 - Upper computer 2 - Chassis |
Returns Promise.<boolean>
Indicates whether the setting was successful.
-
true- Success -
false- Failure
Example
...
const success = await axRobot.setVolume(50, 1);
...stopPlayAudio(mode) -> {Promise.<boolean>}
Stop playing the background music.
Parameters
| Name | Type | Description |
|---|---|---|
mode |
number | 1 - PC 2 - Chassis |
Return Promise.<boolean>
Whether the operation is successful or not.
- true - Successful
- false - Failed
Example
...
const success = await axRobot.stopPlayAudio(1);
...setPlayAudio(playAudio) -> {Promise.<boolean>}
Set audio playback.
Parameters
| Name | Type | Description |
|---|---|---|
playAudio |
PlayAudio | Audio playback |
Return value Promise.<boolean>
Whether it is successful
- true - success
- false - failure
Example
...
let playAudio = {
mode: 1,
url: "",
audioId: "38001",
volume: 10,
interval: -1,
num: 1,
duration: 5
}
const success = await axRobot.setPlayAudio(playAudio);
...removeWheelOverload() -> {Promise.<boolean>}
Clears the wheel overload.
Parameters
None
Returns Promise.<boolean>
Whether the operation is successful.
- true - Success
- false - Failure
Example
...
const success = await axRobot.removeWheelOverload();
...getRobotId() -> {string}
Get the identifier of the currently connected robot.
Parameters
None
Return Value string
Robot ID
Example
...
const robotId = axRobot.getRobotId();
...restartRobot() -> {Promise.<boolean>}
Restart the robot.
Parameters
None
Returns Promise.<boolean>
-
true- Success -
false- Failure
Example
...
const success = await axRobot.restartRobot();
...setGlobalPosition() -> {Promise.<boolean>}
Set the global position of the robot.
Parameters
None
Returns Promise.<boolean>
Set whether it is reliable.
-
true- Reliable -
false- Unreliable
Example
...
const success = await axRobot.setGlobalPosition();
...setServerInfos(serverInfo) -> {Promise.<boolean>}
Set the server information that the robot connects to.
Parameters
| Name | Type | Description |
|---|---|---|
serverInfo |
ServerInfo | Server information |
Return Value Promise.<boolean>
Whether the operation is successful
- true - success
- false - failure
Example
...
let serverInfo = {
ip: "http://127.0.0.1:8080/",
type: -1,
offline: 0
}
const success = await axRobot.setServerInfos(serverInfo);
...setWifi(ssId, password) -> {Promise.<boolean>}
Set the WiFi for the robot chassis.
Parameters
| Name | Type | Description |
|---|---|---|
ssId |
string | WiFi name |
password |
string | Password |
Returns Promise.<boolean>
Indicates whether the operation was successful.
- true - Success
- false - Failure
Example
...
const success = await axRobot.setWifi("test-wifi", "123456");
...setRouteMode(mode) -> {Promise.<boolean>}
Set the internet mode of the robot.
Parameters
| Name | Type | Description |
|---|---|---|
mode |
number | Network type 0: Headshell supplied network 1: Chassis WiFi supplied network 2: Chassis 4G supplied network 3: Chassis supplied network |
Return Value Promise.<boolean>
Whether it is successful
- true - Success
- false - Failed
Example
...
const success = await axRobot.setRouteMode(0);
...getRouteMode() -> {Promise.<string>}
Get the network mode of the robot.
Parameters
None
Returns Promise.<string>
Network mode
Example
const mode = await axRobot.getRouteMode();
console.log(mode);
- Note: Possible return values: etho_first: "Head WiFi for internet access"/"Head 4G for internet access" (depending on whether the head is connected to WiFi), wlan0_first: "Chassis WiFi for internet access", usbo_first: "Chassis 4G for internet access"
Method
openSprayer(gear) → {Promise.<boolean>}
Open the sprayer.
Parameters
| Name | Type | Description |
|---|---|---|
gear |
number | Gear level |
Return value Promise.<boolean>
Whether it is successful
-
true- Successful -
false- Failed
Example
...
const success = await axRobot.openSprayer("<gear>");
...closeSprayer() → {Promise.<boolean>}
Close the sprayer.
Return value Promise.<boolean>
Whether it is successful
-
true- Successful -
false- Failed
Example
...
const success = await axRobot.closeSprayer();
...Method
openBoxDoor(doorIds, mode) → {Promise.<boolean>}
Open the box door.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
doorIds |
number[] | Yes | List of door numbers, values range from 1 to 4. |
mode |
number | No | Execution mode: 1=upper computer, 2=chassis; default value: 1. |
Return value Promise.<boolean>
Whether the operation is successful.
-
true- Success -
false- Failure
Example
...
// Open door 1
const success = await axRobot.openBoxDoor([1], 1);
...closeBoxDoor(doorIds, mode) → {Promise.<boolean>}
Close the box door.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
doorIds |
number[] | Yes | List of door numbers, values range from 1 to 4. |
mode |
number | No | Execution mode: 1=upper computer, 2=chassis; default value: 1. |
Return value Promise.<boolean>
Whether the operation is successful.
-
true- Success -
false- Failure
Example
...
// Close door 2
const success = await axRobot.closeBoxDoor([2], 1);
...Method
openLightBelt(lightBelt) → {Promise.<boolean>}
Open the light belt.
Parameters
| Name | Type | Description |
|---|---|---|
lightBelt |
LightBelt | Gear |
Return value Promise.<boolean>
Whether the operation is successful
-
true- Successful -
false- Failed
Example
...
let lightBelt = {
mode: 1,
color: LightColor.Green,
indexs: [
{ index: 0, num: 6 }
]
}
const success = await axRobot.openLightBelt(lightBelt);
...closeLightBelt(lightBelt) → {Promise.<boolean>}
Close the light belt.
Parameters
| Name | Type | Description |
|---|---|---|
lightBelt |
LightBelt | Gear |
Return value Promise.<boolean>
Whether the operation is successful
-
true- Successful -
false- Failed
Example
...
let lightBelt = {
mode: 1,
color: LightColor.Green,
indexs: [
{ index: 0, num: 6 }
]
}
const success = await axRobot.closeLightBelt(lightBelt);
...Method
subscribeTaskState(listener) -> {void}
Subscribe to task state.
Parameters
| Name | Type | Description |
|---|---|---|
listener |
OnTaskListener | Task state callback |
Return value void
Example
...
axRobot.subscribeTaskState({
onTaskChanged: (state: any) => {
console.log(state.actType); // Task state action type 1000 - Task start 14 - Departure 16 - Arrival 40 - Waiting for interaction 1001 - Task completed
console.log(state.data); // Specific task state data
}
});
...Method
startTask(task) -> {Promise.<boolean>}
Starts executing a task.
Parameters
| Name | Type | Description |
|---|---|---|
task |
TaskInfo | Task information |
Return value Promise.<boolean>
Whether the task was successful or not
-
true- Success -
false- Failure
Example
...
let task = {
name: "Multi-point delivery",
runNum: 1,
taskType: 2,
runType: 21,
pts: [
{
x: 0.11,
y: 1.22,
yaw: 89,
areaId: "xxxxxxxxxxxxxx",
type: -1,
ext: {},
stepActs: [
{
type: ActionType.PlayAudio,
data: {...}
},
...
]
},
...
]
}
const success = await axRobot.startTask(task);
...Method
pauseTask() -> {Promise.<boolean>}
Pause the task that is currently being executed.
Return value Promise.<boolean>
Success indicator
-
true- success -
false- failure
Example
...
const success = await axRobot.pauseTask();
...Method
continueTask() -> {Promise.<boolean>}
Continue the task that is currently paused, primarily for tasks involving human-computer interaction.
Returns Promise.<boolean>
Success status
-
true- Success -
false- Failed
Example
...
const success = await axRobot.continueTask();
...Method
cancelTask() -> {Promise.<boolean>}
Cancel the currently executing task.
Returns Promise.<boolean>
Success status
-
true- Success -
false- Failed
Example
...
const success = await axRobot.cancelTask();
...resumeTask() -> {Promise.<boolean>}
Resume a task.
Parameters
None
Return Value
Whether the execution was successful
- true - success
- false - failure
Example
...
const success = await resumeTask();
...getCurrentTask() -> {Promise.<any>}
Get information about the current task being executed.
Returns Promise.<any>
| Name | Type | Description |
|---|---|---|
task |
any | Task information |
Example
...
let task = await axRobot.getCurrentTask();
console.log(task.isCancel); // Whether the task is canceled
console.log(task.runType); // Run type; 0 - scheduled killing, 1 - temporary killing, 20 - quick delivery, 21 - multi-point delivery, 22 - lead, 23 - cruise, 24 - return, 25 - return to charging station
console.log(task.businessId); // Business identifier to which the task belongs
console.log(task.robotId); // Robot identifier
console.log(task.buildingId); // Building identifier
console.log(task.isExcute); // Whether it has been executed
console.log(task.taskType); // Task type; 0 - killing, 1 - return to charging station, 2 - restaurant
console.log(task.taskPts); // Task node information, please refer to the instructions for starting the task for details
console.log(task.createTime); // Task creation time
console.log(task.runNum); // Number of task runs
console.log(task.name); // Task name
console.log(task.busiType); // Business type
console.log(task.isDel); // Whether it has been deleted
console.log(task.taskId); // Task identifier
...updateTask(taskId, pts) -> {Promise.<boolean>}
Update a task.
Parameters
| Name | Type | Description |
|---|---|---|
taskId |
string | Task identifier |
pts |
Array | List of task points; refer to the taskPts parameter used to start executing the task |
Return Value Promise.<boolean>
Whether the update is successful
-
true- Success -
false- Failure
Example
...
const success = await axRobot.updateTask("<taskId>", <pts>);
...Method
restartTask(taskId) -> {Promise.<boolean>}
Restart a paused or finished task.
Parameters
| Name | Type | Description |
|---|---|---|
taskId |
string | Task ID |
Return value Promise.<boolean>
Whether it is successful
-
true- Success -
false- Failure
Example
...
const success = await axRobot.restartTask("<taskId>");
...saveCruise(cruiseInfo) -> {Promise<boolean>}
This function sets or updates a cruise route.
Parameters
| Name | Type | Description |
|---|---|---|
cruiseInfo |
CruiseInfo | Information of the cruise route |
Return value Promise.<boolean>
Whether the operation is successful:
- true - Success
- false - Failure
Example
...
let cruiseInfo = {
id: 12,
name: "test-cruise",
businessId: "",
sites: [{
poiId: "6423afdb1162805312f27a75",
poiName: "test-poi"
}],
remark: ""
}
const success = await axRobot.saveCruise(cruiseInfo);
...getCruises() -> {Promise<any>}
Get cruises.
Parameters
| Name | Type | Description |
|---|---|---|
businessId |
string | Optional; Business identifier |
Returns Promise.<any>
| Name | Type | Description |
|---|---|---|
result |
any | Cruise information |
Example
...
const result = await axRobot.getCruises(cruiseInfo);
console.log(result.status)
console.log(result.data)
let cruise = result.data[0]
console.log(cruise.id)
console.log(cruise.name)
console.log(cruise.businessId)
console.log(cruise.sites)
...deleteCruise(ids) -> {Promise<boolean>}
Deletes a cruise route.
Parameters
| Name | Type | Description |
|---|---|---|
ids |
number[] | Collection of cruise route identifiers |
Returns Promise.<boolean>
Whether the operation is successful.
- true - Success
- false - Failure
Example
...
const success = await axRobot.deleteCruise(ids);
...syncCruiseCloud(businessId) -> {Promise<boolean>}
Synchronize cruise routes to the cloud.
Parameters
| Name | Type | Description |
|---|---|---|
businessId |
string | Business ID |
Return Value: Promise.<boolean>
Whether the operation is successful.
- true - Success
- false - Failure
Example
...
const success = await axRobot.syncCruiseCloud(businessId);
...syncCruiseLocal() -> {Promise<boolean>}
Uploads local cruise routes to the cloud.
Parameters
None
Returns Promise.<boolean>
Whether the upload was successful.
- true - Success
- false - Failure
Example
...
const success = await axRobot.syncCruiseLocal();
...setAreaMap(areaId) -> {void}
Set the area map
Parameters
| Name | Data Type | Description |
|---|---|---|
areaId |
string | Map area ID |
Return value
None
Example
...
axMap.setAreaMap("<areaId>");
...setMapCenter(coordinates) -> {void}
Set the map center point
Parameters
| Name | Data Type | Description |
|---|---|---|
coordinates |
array | Center point coordinates [x, y] |
Return value
None
Example
...
axMap.setMapCenter([0, 0]);
...zoomTo(zoom) -> {void}
Set the map zoom level
Parameters
| Name | Data Type | Description |
|---|---|---|
zoom |
number | Map zoom level, value range 0~22 |
Return value
None
Example
...
axMap.zoomTo(10);
...fly(coordinates) -> {void}
Fly the map to a specific point
Parameters
| Name | Data Type | Description |
|---|---|---|
coordinates |
array | Target point coordinates [x, y] |
Return value
None
Example
...
axMap.fly([0, 0]);
...getCurrentPointPosition(featureId) -> {object}
Get the current selected point's pose
Parameters
| Name | Data Type | Description |
|---|---|---|
featureId |
string | Point ID |
Return value object
Pose information
-
x- x component of the coordinates -
y- y component of the coordinates -
yaw- orientation angle
Example
...
const pose = axMap.getCurrentPointPosition("<featureId>");
console.log(pose); // {x:1, y: 2, yaw: 3}
...getFeature(id) -> {object}
Get feature information by ID
Parameters
| Name | Data Type | Description |
|---|---|---|
id |
string | Feature ID |
Return value object
Feature information; structure reference https://geojson.org/
Example
...
const feature = axMap.getFeature("<featureId>");
...getPlaceList() -> {any}
Get all location points
Parameters
None
Return value any
List of location points; structure reference https://geojson.org/
Example
...
const list = axMap.getPlaceList();
...setClickMapCallback(callback) -> {void}
Set the callback function for clicking on the map
Parameters
| Name | Data Type | Description |
|---|---|---|
callback |
function | Callback function |
Return value
None
Example
...
axMap.setClickMapCallback(val => {
console.log(val.type); // Always 'LayerPoint'
console.log(val.data); // Element that is clicked, data structure reference to GeoJSON
});
...setSelectedFeatures(featureId) -> {void}
Select the features in the map based on IDs
Parameters
| Name | Data Type | Description |
|---|---|---|
featureId |
string | Feature ID, multiple feature IDs are separated by comma |
Return value
None
Example
...
axMap.setSelectedFeatures("<featureId>");
...addPoint(coordinates, properties opt) -> {string}
Add a point to the map.
Parameters
| Name | Data Type | Description |
|---|---|---|
coordinates |
number[] | Point coordinates [x, y] |
properties |
object | Optional; custom attributes |
Return value string
Feature identifier of the added point.
Example
...
axMap.addPoint([0, 0], {
name: "test", // Name
color: "#f00", // Color
radius: 2, // Radius, in pixels
yaw: 0, // Orientation angle
enableSelect: true // Whether to allow selection
});
...addLine(coordinates, properties opt) -> {string}
Add a line to the map.
Parameters
| Name | Data Type | Description |
|---|---|---|
coordinates |
array[] | Array of coordinates on the line |
properties |
object | Optional; custom attributes |
Return value string
Feature identifier of the added line.
Example
...
axMap.addLine([[0, 0], [10, 10]], {
color: "#f00", // Color
width: 2, // Width, in pixels
dash: 'dash' // Dashed line
});
...addMarker(imgSrc, coordinates, yaw) -> {any}
Add a marker to the map.
Parameters
| Name | Data Type | Description |
|---|---|---|
imgSrc |
string | Image URL |
coordinates |
number[] | Coordinates [x, y] |
yaw |
number | Orientation angle |
Return value any
Marker object.
Example
...
const marker = axMap.addMarker("<imgSrc>", [0, 0], 0);
...setMarkerProperties(marker, coordinates, yaw) -> {void}
Set marker properties.
Parameters
| Name | Data Type | Description |
|---|---|---|
marker |
any | Marker object |
coordinates |
number[] | New coordinates [x, y] |
yaw |
number | New orientation angle |
Return value
None
Example
...
axMap.setMarkerProperties(marker, [1, 1], 0);
...removeMarker(marker) -> {void}
Remove a marker from the map.
Parameters
| Name | Data Type | Description |
|---|---|---|
marker |
any | Marker object |
Return value
None
Example
...
axMap.removeMarker(marker);
...clearAreaMap() -> {void}
Clears the area map.
Parameters
None
Returns
None
Example
...
axMap.clearAreaMap();
...clearFeature() -> {void}
Clears the map data.
Parameters
None
Returns
None
Example
...
axMap.clearFeature();
...deleteFeature(id) -> {void}
Deletes the feature with the specified ID.
Parameters
| Name | Data Type | Description |
|---|---|---|
id |
string | Feature ID |
Returns
None
Example
...
axMap.deleteFeature("<featureId>");
...editPose(coordinates, properties opt) -> {void}
Sets the current pose position.
Parameters
| Name | Data Type | Description |
|---|---|---|
coordinates |
array | Coordinates [x, y] |
properties |
object | Optional; custom properties |
Returns
None
Example
...
axMap.editPose([0, 0]);
...endEditPose() -> {object}
Cancels setting the current pose position.
Parameters
None
Returns object
The edited pose.
Example
...
const post = axMap.endEditPose();
...beautifyMapImg(imgUrl, obstacle, throughArea, other) -> {Promise.<string>}
Beautify map image
Parameters
| Name | Data Type | Description |
|---|---|---|
imgUrl |
string | Source image URL |
obstacle |
object | Obstacle RGBA color value Example: {r: 42, g:124, b:128, a:255}
|
throughArea |
object | Through area RGBA color value |
other |
object | Other area RGBA color value |
Return value Promise.<string>
The URL of the beautified image
Example
...
const newImg = await axMap.beautifyMapImg("<imgUrl>", {...}, {...}, {...});
...project(coordinates) -> {array.<number>}
Convert map coordinates to pixel offset
Parameters
| Name | Data Type | Description |
|---|---|---|
coordinates |
array | Map coordinates [x, y] |
Return value array.<number>
The converted pixel offset
Example
...
const pixel = axMap.project([0, 0]);
...destroy() -> {void}
Destroy the map object
Parameters
None
Return value
None
Example
...
axMap.destroy();
...getStatisticsTotal() -> {Promise<any>}
This method retrieves the total statistics data.
Parameters
| Name | Type | Description |
|---|---|---|
statisticsTotal |
StatisticsTotal |
Returns Promise.<any>
| Name | Type | Description |
|---|---|---|
result |
any | The statistics information |
Example
...
const result = await axRobot.getStatisticsTotal(statisticsTotal);
console.log(result)
...getSingleTaskStatistics() -> {Promise<any>}
Get statistics for a single task.
Parameters
| Name | Type | Description |
|---|---|---|
singleTaskStatistics |
SingleTaskStatistics |
Return Type Promise.<any>
| Name | Type | Description |
|---|---|---|
result |
any | Statistics information |
Example
...
const result = await axRobot.getSingleTaskStatistics(singleTaskStatistics);
console.log(result)
...getTaskStatistics() -> {Promise<any>}
Get task statistics
Parameters
| Name | Type | Description |
|---|---|---|
taskStatistics |
TaskStatistics | The task statistics |
Return value Promise.<any>
| Name | Type | Description |
|---|---|---|
result |
any | Statistics information |
Example
...
const result = await axRobot.getTaskStatistics(taskStatistics);
console.log(result)
...Action type for tasks.
Enumeration
| Value | Description |
|---|---|
ActionType.None |
None |
ActionType.PlayAudio |
Play audio Parameters |
ActionType.OpenDoor |
Open the door Parameters |
ActionType.Pause |
Pause the action Parameters |
ActionType.GearOperation |
Gear operation Parameters |
ActionType.StopAudio |
Stop playing audio Parameters |
ActionType.OpenLight |
Turn on the lights Parameters |
ActionType.CloseLight |
Turn off the lights Parameters |
ActionType.TaskStart |
Start the task Parameters |
ActionType.TaskEnd |
End the task Parameters |
Play audio action parameters
Properties
| Name | Data Type | Description |
|---|---|---|
audioId |
string | Optional; Local audio resource identifier, default is the file name |
url |
string | Optional; Online URL for the audio |
volume |
number | Volume; 0~100 |
mode |
number | Execution mode; 1 - Execute on the computer 2 - Execute on the chassis |
interval |
number | Interval time for loop playback; unit: seconds -1 means play only once |
num |
number | Optional; Number of times to play |
duration |
number | Optional; Total play time; unit: seconds If the num parameter is set at the same time, the num parameter will be followed |
channel |
number | Play channel; 1 - Normal music 2 - Background music The chassis does not support multi-channel playback |
Example
{
"type": ActionType.PlayAudio,
"data": {
"audioId": "3111001",
"volume": 50,
"mode": 1,
"interval": 20,
"num": 10,
"channel": 1
}
}Stop playing audio action parameters
Properties
| Name | Data Type | Description |
|---|---|---|
mode |
number | Execution mode; 1 - Execute on the computer 2 - Execute on the chassis |
channel |
number | Play channel; 1 - Normal music 2 - Background music The chassis does not support multi-channel playback |
Example
{
"type": ActionType.StopAudio,
"data": {
"mode": 1,
"channel": 1
}
}Open door action parameters
Properties
| Name | Data Type | Description |
|---|---|---|
mode |
number | Execution mode; 1 - Execute on the computer 2 - Execute on the chassis |
doorIds |
number[] | Compartment number; from top to bottom, left to right, 1,2,3,4 |
Example
{
"type": ActionType.OpenDoor,
"data": {
"mode": 1,
"doorIds": [1]
}
}Close door action parameters
Properties
| Name | Data Type | Description |
|---|---|---|
mode |
number | Execution mode; 1 - Execute on the computer 2 - Execute on the chassis |
doorIds |
number[] | Compartment number; from top to bottom, left to right, 1,2,3,4 |
Example
{
"type": ActionType.CloseDoor,
"data": {
"mode": 1,
"doorIds": [1]
}
}Pause action parameters
Properties
| Name | Data Type | Description |
|---|---|---|
pauseTime |
number | Pause time, unit: seconds 0 means no pause |
Example
{
"type": ActionType.Pause,
"data": {
"pauseTime": 20
}
}Sprayer operation action parameters
Properties
| Name | Data Type | Description |
|---|---|---|
subType |
number | Sprayer action parameters; 0: Turn off the sprayer, 1-5 set the gear, open the sprayer |
Example
{
"type": ActionType.GearOperation,
"data": {
"subType": 2
}
}Open light strip action parameters
Properties
| Name | Data Type | Description |
|---|---|---|
mode |
number | Execution mode; 1 - Execute on the computer 2 - Execute on the chassis |
color |
LightColor | Light strip color |
indexs |
LightIndex | Optional; segmented display, up to 4 segments |
Example
{
"type": ActionType.OpenLight,
"data": {
"mode": 1,
"color": LightColor.Green,
"indexs": [
{
"index": 0,
"num": 10
}
]
}
}Close light strip action parameters
Properties
| Name | Data Type | Description |
|---|---|---|
mode |
number | Execution mode; 1 - Execute on the computer 2 - Execute on the chassis |
indexs |
LightIndex | Optional; segmented display, up to 4 segments |
Example
{
"type": ActionType.OpenLight,
"data": {
"mode": 1,
"indexs": [
{
"index": 0,
"num": 10
}
]
}
}Start task action parameters
Properties
| Name | Data Type | Description |
|---|---|---|
taskId |
string | Task ID |
Example
{
"type": ActionType.TaskStart,
"data": {
"taskId": "152afafb-a682-4d3c-934a-1099b3aa35e3"
}
}Task end action parameters
Properties
| Name | Data Type | Description |
|---|---|---|
taskId |
string | Task ID |
Example
{
"type": TaskType.TaskEnd,
"data": {
"taskId": "b4ddea09-2448-4db5-a580-47ae763f9693"
}
}Action node information
Properties
| Name | Data Type | Description |
|---|---|---|
type |
ActionType | Action type |
data |
object | Action parameters |
Robot emergency stop mode
Enumeration
| Value | Description |
|---|---|
EmergencyType.Stop |
Robot exits emergency stop state |
EmergencyType.Start |
Robot enters emergency stop state |
Light Strip Control
Properties
| Name | Data Type | Description |
|---|---|---|
mode |
number | Execution mode, 1-PC, 2-chassis |
color |
LightColor | Light strip color, see LightColor |
indexs |
LightIndex[] | Array of segmented light strips |
Light strip color.
Enumeration:
| Value | Description |
|---|---|
LightColor.Red |
Red color |
LightColor.Green |
Green color |
LightColor.Blue |
Blue color |
LightColor.Yellow |
Yellow color |
Segmented LED strip
Properties
| Name | Data Type | Description |
|---|---|---|
index |
number | Index of LED beads |
num |
number | Number of LED beads |
Map pose
Properties
| Name | Data Type | Description |
|---|---|---|
areaId |
string | Map area identifier |
Inherits from
Robot motion type
Enumeration
| Value | Description |
|---|---|
MotionType.Forward |
Robot moves forward, no obstacle avoidance |
MotionType.Back |
Robot moves backward, no obstacle avoidance |
MotionType.TurnLeft |
Robot turns left, no obstacle avoidance |
MotionType.TurnRight |
Robot turns right, no obstacle avoidance |
MotionType.Cancel |
Robot stops moving |
MotionType.Auto |
Robot in auto mode |
MotionType.Manual |
Robot in manual mode |
Callback for subscribing to robot status changes
Properties
| Name | Data Type | Description |
|---|---|---|
onStateChange |
function | Callback for state change of the robot |
Task status subscription callback
Properties
| Name | Data Type | Description |
|---|---|---|
onTaskChanged |
function | Task status change callback |
| Value | Type Name |
|---|---|
1 |
Fast Food |
2 |
Beverage Shop |
3 |
Others |
4 |
Company |
5 |
Residential |
6 |
Elevator |
7 |
Gate |
8 |
Automatic Door |
9 |
Charging Station |
10 |
Staging Point |
11 |
Table Number |
12 |
Private Room |
13 |
Bar Counter |
14 |
Takeaway Area |
15 |
Service Window |
16 |
Lobby |
17 |
Restaurant |
18 |
Store |
19 |
Reception |
20 |
House Number |
22 |
Workstation Number |
21 |
Room Number |
23 |
Container Shipping Point |
24 |
Container Staging Point |
25 |
Waypoint |
26 |
Disinfection Point |
28 |
Waiting Area |
29 |
Dispatch Point |
30 |
Delivery Station |
Position and orientation of an object.
Properties
| Name | Data Type | Description |
|---|---|---|
x |
number | The x component of the position coordinate |
y |
number | The y component of the position coordinate |
yaw |
number | Orientation in radians |
angle |
number | Optional; Orientation in degrees |
Pagination request parameters
Properties
| Name | Data Type | Description |
|---|---|---|
pageSize |
number | Number of records per page |
pageNum |
number | Page number for pagination |
Request parameters
Properties
| Name | Data Type | Description |
|---|---|---|
robotId |
string | Robot identifier |
businessId |
string | Optional; Business identifier |
areaId |
string | Optional; Map area identifier |
type |
number | Optional; POI type; reference:POI Type |
page |
RequestPage | Optional; Result pagination parameters |
properties |
object | Optional; POI filtering properties |
Task Information
Properties
| Name | Data Type | Description |
|---|---|---|
name |
string | Name of the task |
robotId |
string | Identifier of the robot |
runNum |
number | Number of times the task has been executed Default is 1; 0 indicates infinite loop |
taskType |
number | Type of the task 0 - Disinfection and Killing 1 - Return and Charging 2 - Restaurant |
runType |
number | Type of execution 0 - Scheduled disinfection 1 - Ad hoc disinfection 20 - Quick food delivery 21 - Multiple location food delivery 22 - Guiding 23 - Cruising 24 - Return 25 - Charging point |
curPt |
TaskPoint | Current position of the robot |
taskPts |
TaskPoint[] | List of task points |
backPt |
TaskPoint | Optional; the point to return to after the task is completed |
Task node information
Attributes
| Name | Data Type | Description |
|---|---|---|
areaId |
string | Identifier of the map area where the task node is located |
x |
number | x component of the coordinates of the task node |
y |
number | y component of the coordinates of the task node |
yaw |
number | Orientation of the task node; unit: degrees |
type |
number | POI type; refer to POI Type |
ext |
object | Optional; custom extension information for the task node |
stepActs |
BaseAction[] | Optional; list of actions for the task node |
Example
{
"x": 0.11,
"y": 1.22,
"yaw": 89,
"areaId": "xxxx",
"type": -1,
"ext": {...},
"stepActs": [...]
}Chassis fault codes
| Value | Description |
|---|---|
| 0 | Invalid value |
| 1001 | Planning node not running |
| 1002 | Occupancy_grid_server node not running |
| 1003 | Map_server node not running |
| 1004 | Cartographer_occupancy_grid_node node not running |
| 1005 | No obstacle map /maps/5cm message received in over 1 second |
| 1006 | Tracking_ctrl node not running (deprecated) |
| 1007 | Stuck during motion |
| 1008 | No significant progress in distance during motion, potentially stuck |
| 2001 | Wheel node not running |
| 2002 | Wheel overload |
| 2003 | Left wheel malfunction |
| 2004 | Right wheel malfunction |
| 2005 | Wheel_state message frequency abnormal |
| 2006 | Wheel drive reported an error |
| 2007 | Wheel loss of control alarm |
| 2008 | Wheel severe skidding |
| 2009 | Wheel control startup error |
| 2501 | Wheel skidding |
| 3001 | Odom node not running |
| 3002 | Odom message frequency abnormal |
| 4001 | Imu node not running |
| 4002 | Imu message frequency abnormal |
| 4003 | Imu angular velocity abnormal (deprecated) |
| 4004 | Vertical angle abnormal, possible rollover |
| 4005 | Imu trembling in place |
| 4006 | Imu spinning in place |
| 4007 | Imu reconnection |
| 4008 | Tilt angle extremely large, high probability of falling |
| 4501 | Imu not calibrated |
| 5001 | Lidar node not running |
| 5002 | Lidar message frequency abnormal |
| 5003 | Lidar scan frequency sustained abnormality, generally over 1 second interval |
| 5004 | Lidar_perception_node node not running |
| 5005 | Exception sending command to lidar |
| 5501 | Lidar scan frequency momentarily abnormal (deprecated) |
| 6003 | Insufficient storage space |
| 6001 | Very high load average in the last minute |
| 6002 | CPU average usage over 90% in the last 10 seconds |
| 6004 | Core temperature exceeds threshold |
| 6005 | Memory usage significantly exceeds threshold |
| 6006 | eMMC wear severe |
| 6007 | Network interruption between head and shell |
| 6008 | Critical system file configuration error |
| 6009 | High disk write volume |
| 6502 | Insufficient storage space |
| 6501 | High load average in the last minute |
| 6503 | Memory usage exceeds threshold |
| 6505 | Bootup time synchronization failure (deprecated) |
| 6504 | CPU average usage over 80% in the last 10 seconds |
| 6506 | System time inconsistent with internet time |
| 6507 | Bootup script execution failure |
| 6508 | eMMC wear severe |
| 7001 | Positioning node not running |
| 7002 | Unreliable positioning quality |
| 7003 | Abnormal /slam/state message frequency |
| 7004 | Lidar determines unreliable positioning quality |
| 8001 | Baseboard node not running |
| 8002 | Battery_state message frequency abnormal |
| 8003 | Extremely low battery level |
| 8004 | Battery board malfunction |
| 8005 | Inconsistent charging status reported by charging flakes and batteries |
| 8006 | Motor current exceeds threshold |
| 8501 | Low battery level |
| 9001 | /detectors node for charging pile/elevator door state recognition not running |
| 9002 | Bluetooth node not running |
| 9003 | Emergency stop button pressed |
| 9004 | Switch to manual mode |
| 9005 | Switch to remote control mode |
| 9006 | /sensor_manager_node node not running |
| 9007 | Bottom sensor node /bottom_sensor_pack_node not running |
| 9008 | /ax_platform_monitor node not running |
| 9009 | /monitor_watcher node not running |
| 9010 | Startup parameter configuration error |
| 9011 | Program crash detected |
| 9012 | Optical flow frequency abnormal |
| 9013 | Heatmap node not running |
| 9501 | Debug node open |
| 9502 | .params.yaml exists in ax-cache, this configuration file is deprecated |
| 9503 | Optical flow hardware detected but not configured to be used |
| 10001 | No touch signal detected after exceeding retry attempts on charging pile |
| 10002 | Charging base not recognized |
| 10003 | No current received for a long time after touch exceeds retry attempts |
| 11001 | camera_node Juyou node not running |
| 11002 | /depth_camera/forward message frequency abnormal (deprecated) |
| 11003 | /depth_camera/downward message frequency abnormal (deprecated) |
| 11004 | /depth_camera/forward reported an error (deprecated) |
| 11005 | /depth_camera/downward reported an error (deprecated) |
| 11006 | Unable to find depth camera hardware (deprecated) |
| 11007 | Juyou depth camera reported an error |
| 11008 | Unable to find RGB camera hardware |
| 11009 | /rgb_camera_node node not running |
| 11010 | RGB camera other error |
| 11011 | ihawk_node node not running |
| 11012 | ihawk depth camera reported an error |
| 11013 | ihawk depth camera depth value abnormal, possible obstruction (reserved) |
| 11501 | Depth camera not calibrated |
Total statistical data information
Attributes
| Name | Data Type | Description |
|---|---|---|
startTime |
number | Start time, in milliseconds, starting from 00:00:00 of the current day, with a maximum duration of one month |
endTime |
number | End time, in milliseconds, ending at 11:59:59 of the current day |
busIds |
string[] | Optional, collection of business IDs |
deviceIds |
string[] | Optional, collection of robot SNs |
dataItems |
string[] | Required data items: mileage - Total mileage duration - Total duration taskMileage - Task mileage taskDuration - Task duration chargingCount - Number of charging times errCount - Chassis error count locerrCount - Positioning loss count warnCount - Warning count dryBurnCount - Dry burn count obstructCount - Obstruction count taskCancelCount - Task cancellation count taskCount - Task count taskFinishCount - Task completion count taskPauseCount - Task pause count disinfectCount - Disinfection count onSprayCount - Times of turning on spray sprayMileage - Spraying mileage remoteCount - Remote control count low10BatCount - Number of times battery is less than 10% low20BatCount - Number of times battery is less than 20% emergencyCount - Emergency stop count gohomeCount - Return to charging pile count manualCount - Manual count dispatchCount - Dispatch count modspeedCount - Speed modification count |
Example
{
"startTime": 1682870400000,
"endTime": 1685548799000,
"dataItems": ["taskDuration","taskMileage","mileage","duration","taskCount"]
}Single task statistics information
Properties
| Name | Data Type | Description |
|---|---|---|
taskId |
string | Task ID |
fields |
string[] | Required data items mileage - Mileage cStartTime - Start time cEndTime - End time disinfect - Disinfection details taskFinishCount - Task completion count taskPauseCount - Task pause count taskCancelCount - Task cancel count |
Example
{
"taskId": "322751f4-1c00-45c2-bcf3-0e42aa9fa2c4",
"fields": [
"cStartTime",
"cEndTime",
"mileage",
"disinfect",
"taskCancelCount",
"errCount",
"taskFinishCount",
"taskPauseCount"
]
}Task statistics information
Attributes
| Name | Data type | Description |
|---|---|---|
startTime |
number | Start time, in milliseconds, starting from 00:00:00 of the current day, with a maximum duration of one month |
endTime |
number | End time, in milliseconds, ending at 11:59:59 of the current day |
type |
number | Task type: 0 - Disinfection 1 - Return to dock 2 - Delivery 3 - Summon Default -1 All tasks |
Example
{
"startTime": 1682870400000,
"endTime": 1685548799000,
"type": -1
}Enum
| Name | Data Type | Description |
|---|---|---|
id |
number | cruise Id |
name |
string | cruise Name |
businessId |
string | business Id |
sites |
[]CruisePoi | cruise poi |
remark |
string | remark |
Enum
| Name | Data Type | Description |
|---|---|---|
poiId |
string | poi Id |
poiName |
string | poi Name |
Server Info
Attributes
| Name | Data Type | Description |
|---|---|---|
ip |
string | address |
type |
number | server type 0: privatization 1: international version -1: close privatization or international version |
offline |
number | 0: not purely offline 1: purely offline |
test