You are on page 1of 94

1.

Overview
The SRD system provides a REST style Web API, which provides the following functions:
 Create, query and cancel waybills.
 Create and query the waybill sequence.
 Query the running information of the robot, change the online status of the robot, etc.
 Changing scene elements, such as disabling paths.
In this protocol, the contents of HTTP requests and responses are JSON structures. The encoding used
can be UTF-8, UTF-16 or UTF-32. Timestamps are encoded using ISO 8601; the timezone used is
UTC (Coordinated Universal Time).
The TCP port to be used for HTTP requests depends on the configuration of the SRD and is 55200 by
default. The corresponding request path for each function will be described below.
This agreement corresponds to SRD version 3.0.63 and above.
Copyright © 2012 - 2022 by Fraunhofer IML
Copyright © 2020 – 2022 Seer Group.

basic path
[ Base URL: localhost:7100/api/route ]
For example, for a program 192.168.1.100 whose , the basic path of the API
is http://192.168.1.100:7100/api/route/ .

HTTP Verbs
verb Description

GET used to get data

POST used to create data

PUT Used to modify some data

HTTP submission data description


When POST , PUT request, please make sure that the Request Content-Type is application/json type.
req.Headers.Add("Content-Type", "application/json")

HTTP status code


 200 - Success
 400 - The requested parameter is incorrect, or the necessary information is missing, please
compare the documentation
 404 - Data does not exist, or is not open
 500 - server exception
2.Waybill

3. Get the collection of waybills

ask
 Function: Get the collection of waybills
 method: GET
 Interface Description: /transportOrders
GET http://host:7100/api/route/transportOrders

Parameter introduction

name type Description

Filter the waybill by the name of the robot that is expected to


intendedVehicle string
execute the waybill

Filter the waybill by the name of the robot that actually executes
processing Vehicle string
the waybill

category string Filter the waybill based on the business type of the waybill

Filter the waybill according to the status of the waybill , and


state string
support multiple selections

pageNo. integer Page Index (Default value: 1)

pageSize integer The page contains the maximum number of waybills

regexp integer Regular expression to filter waybills by name

Example request with parameters:


GET "http://host:7100/api/route/transportOrders?intendedVehicle=test"
Example request with multiple parameters:
GET "http://host:7100/api/route/transportOrders?category=test&pageNo=1"

response
Responses Code 200
example response
{
"pageNo": 1,
"pageSize": 1,
"page": [
{
"name": "TOrder-01",
"category": "Park",
"creationTime": "2018-05-17T06:42:40.396Z",
"deadline": "2018-05-17T06:42:40.396Z",
"finishedTime": "2018-05-17T06:42:40.396Z",
"state": "RAW",
"intendedVehicle": "AMB-01",
"processingVehicle": "AMB-01",
"destinations": [
{
"locationName": "Storage-01",
"operation": "Store",
"state": "PRISTINE",
"properties": [
{
"key": "key1",
"value": "value1"
}
]
}
],
"dependencies": [
"TOrder-002"
],
"wrappingSequence": "Sequence-0001",
"dispensable": true
}
],
"total": 1
}

Parameter interpretation

name type Description Example

PageNo * integer minimum: 1 1


name type Description Example

maximum: 2147483647
page index

minimum: 1
maximum: 2147483647
pageSize * integer 1
Each page contains the number of
waybill data

minItems: 0_maxItems: 2147483647


Page * array -
waybill data page

name string The name of the waybill TOrder-01

category string Business type of waybill Park

string($date- The creation time of the waybill (UTC 2018-05-


creationTime
time) time zone) 17T06:42:40.396Z

string($date- 2018-05-
deadline Waybill cut-off time (UTC time zone)
time) 17T06:42:40.396Z

The completion time of the waybill


string _ 2018-05-
finishedTime (UTC time zone). When it is null, it
null($date-time) 17T06:42:40.396Z_
means the waybill is not completed.

state string The current status of the waybill


 RAW: Raw state, waiting to
be processed.
 ACTIVE: All destinations
of the waybill are reachable
by route, and the order is
already active.
 DISPATCHABLE: The
waybill information is
correct, the route planning
is complete, and the system
is waiting for the robot to
name type Description Example

be allocated.
 BEING_PROCESSED:
The waybill is being
executed.
 WITHDRAWN: The
waybill is being withdrawn.
 FINISHED: final state, the
waybill has been executed
successfully.
 FAILED: Final status, the
waybill has been withdrawn
and marked as failed.
 UNROUTABLE: final
state. The SRD system was
unable to route this
shipment. When this status
occurs, check the wiring
topology of the scene.

The name of the robot expected to


intendedVehicle string($nullable) AMB-01
execute this shipment

The name of the robot that actually


processing Vehicle string($nullable) AMB-01
executes this waybill

minItems: 1_maxItems: 2147483647


destinations The sequence of target workstations
contained in the waybill

locationName * string name of the workstation Storage-01

The name of the action to be


operation * string store
performed by the robot at the station

state * array Execution status of the waybill


subtask
name type Description Example

 PRISTINE: subtask in
initial state
 ACTIVE: The subtask is
active
 TRAVELLING: The robot
is in the process of going to
the target point of the
subtask
 OPERATING: The robot
has reached the target point
of the subtask and is
performing an operation
 FINISHED: The subtask is
complete
 FAILED: The subtask has
failed

minItems: 0_maxItems: 2147483647


properties string The meta attribute of the waybill
subtask

minItems: 0_maxItems: 2147483647


Waybill dependency. Before
dependencies string executing this waybill, the list of TOrder-002]
names of the waybills that have been
executed is required

The waybill sequence to which the


wrappingSequence string($nullable) Sequence-0001
waybill belongs

dispensable boolean Is it an unnecessary waybill

total * integer Total quantity of waybill data 1

Responses Code 400


example response
[
"Unknown vehicle 'AMB-01'."
]

4. Get a collection of historical waybills


ask
 Function: Get the collection of historical waybills
 method: GET
 Interface Description: /historyTransportOrders
GET "http://host:7100/api/route/historyTransportOrders"
Parameter introduction

name type Description

Filter the waybill by the name of the robot that is expected to


intendedVehicle string
execute the waybill

Filter the waybill by the name of the robot that actually executes
processing Vehicle string
the waybill

category string Filter the waybill based on the business type of the waybill

Filter the waybill according to the status of the waybill , and


state string
support multiple selections

pageNo. integer Page Index (Default value: 1)

pageSize integer The page contains the maximum number of waybills

Example request with parameters:


GET "http://host:7100/api/route/historyTransportOrders?intendedVehicle=test"
Example request with multiple parameters:
GET "http://host:7100/api/route/historyTransportOrders?category=test&pageNo=1"

response
Responses Code 200
example response
{
"pageNo": 1,
"pageSize": 1,
"page": [
{
"name": "TOrder-01",
"category": "Park",
"creationTime": "2018-05-17T06:42:40.396Z",
"deadline": "2018-05-17T06:42:40.396Z",
"finishedTime": "2018-05-17T06:42:40.396Z",
"state": "RAW",
"intendedVehicle": "AMB-01",
"processingVehicle": "AMB-01",
"destinations": [
{
"locationName": "Storage-01",
"operation": "Store",
"state": "PRISTINE",
"properties": [
{
"key": "key1",
"value": "value1"
}
]
}
],
"dependencies": [
"TOrder-002"
],
"wrappingSequence": "Sequence-0001",
"dispensable": true
}
],
"total": 1
}

Parameter interpretation

name type Description Example

minimum: 1
PageNo * integer maximum: 2147483647 1
page index

pageSize * integer minimum: 1 1


maximum: 2147483647
Each page contains the number of
name type Description Example

waybill data

minItems: 0_maxItems:
Page * array 2147483647 -
waybill data page

name string The name of the waybill TOrder-01

category string Business type of waybill Park

string($date- The creation time of the waybill 2018-05-


creationTime
time) (UTC time zone) 17T06:42:40.396Z

string($date- Waybill cut-off time (UTC time 2018-05-


deadline
time) zone) 17T06:42:40.396Z

The completion time of the waybill


string null($date- (UTC time zone). When it is null, it _ 2018-05-
finishedTime
time) means the waybill is not 17T06:42:40.396Z_
completed.

state string The current status of the waybill


- RAW: raw status, waiting to be
processed.
- ACTIVE: All destinations of the
waybill are reachable by route, and
the order is already active.
- DISPATCHABLE: The waybill
information is correct, the route
planning is completed, and the
system is waiting for the robot to
be allocated.
- BEING_PROCESSED: The
waybill is being executed.
- WITHDRAWN: The waybill is
being withdrawn.
- FINISHED: final state, the
name type Description Example

waybill has been executed


successfully.
- FAILED: Final status, the waybill
has been withdrawn and marked as
failed.
- UNROUTABLE: final state. The
SRD system was unable to route
this shipment. When this status
occurs, check the wiring topology
of the scene.

The name of the robot expected to


intendedVehicle string($nullable) AMB-01
execute this shipment

The name of the robot that actually


processing Vehicle string($nullable) AMB-01
executes this waybill

minItems: 1_maxItems:
2147483647
destinations The sequence of target
workstations contained in the
waybill

locationName * string name of the workstation Storage-01

The name of the action to be


operation * string performed by the robot at the store
station

state * array The execution status of the waybill


subtask
- PRISTINE: the subtask is in the
initial state
- ACTIVE: the subtask is in the
active state
- TRAVELLING: the robot is going
name type Description Example

to the subtask target point


- OPERATING: the robot has
reached the subtask target point
and is performing operations
- FINISHED : subtask completed
- FAILED : subtask failed

minItems: 0_maxItems:
2147483647
properties string
The meta attribute of the waybill
subtask

minItems: 0_maxItems:
2147483647
Waybill dependency. Before
dependencies string TOrder-002]
executing this waybill, the list of
names of the waybills that have
been executed is required

The waybill sequence to which the


wrappingSequence string($nullable) Sequence-0001
waybill belongs

dispensable boolean Is it an unnecessary waybill

total * integer Total quantity of waybill data 1

Responses Code 400


example response
[
"Unknown vehicle 'AMB-01'."
]

5. Get the waybill with the specified name

ask
 Function: Get the waybill with the specified name
 method: GET
 Interface Description: /transportOrders/{name}
GET "http://host:7100/api/route/transportOrders/{name}"

Parameter introduction

name type Description

name string The name of the waybill, the name of the waybill cannot be repeated

Example request with parameters:


GET "http://host:7100/api/route/transportOrders/test"

response
Responses Code 200
example response
{
"name": "TOrder-01",
"category": "Park",
"creationTime": "2018-05-17T06:42:40.396Z",
"deadline": "2018-05-17T06:42:40.396Z",
"finishedTime": "2018-05-17T06:42:40.396Z",
"state": "RAW",
"intendedVehicle": "AMB-01",
"processingVehicle": "AMB-01",
"destinations": [
{
"locationName": "Storage-01",
"operation": "Store",
"state": "PRISTINE",
"properties": [
{
"key": "key1",
"value": "value1"
}
]
}
],
"dependencies": [
"TOrder-002"
],
"wrappingSequence": "Sequence-0001",
"dispensable": true
}
404

Parameter interpretation

name type Description Example

name string The name of the waybill TOrder-01

category string Business type of waybill Park

string($date- The creation time of the waybill 2018-05-


creationTime
time) (UTC time zone) 17T06:42:40.396Z

string($date- Waybill cut-off time (UTC time 2018-05-


deadline
time) zone) 17T06:42:40.396Z

The completion time of the waybill


string null($date- (UTC time zone). When it is null, it _ 2018-05-
finishedTime
time) means the waybill is not 17T06:42:40.396Z_
completed.

state string The current status of the waybill


- RAW: raw status, waiting to be
processed.
- ACTIVE: All destinations of the
waybill are reachable by route, and
the order is already active.
- DISPATCHABLE: The waybill
information is correct, the route
planning is completed, and the
system is waiting for the robot to
be allocated.
- BEING_PROCESSED: The
waybill is being executed.
- WITHDRAWN: The waybill is
being withdrawn.
- FINISHED: final state, the
waybill has been executed
name type Description Example

successfully.
- FAILED: Final status, the waybill
has been withdrawn and marked as
failed.
- UNROUTABLE: final state. The
SRD system was unable to route
this shipment. When this status
occurs, check the wiring topology
of the scene.

The name of the robot expected to


intendedVehicle string($nullable) AMB-01
execute this shipment

The name of the robot that actually


processing Vehicle string($nullable) AMB-01
executes this waybill

minItems: 1_maxItems:
2147483647
destinations The sequence of target
workstations contained in the
waybill

locationName * string name of the workstation Storage-01

The name of the action to be


operation * string performed by the robot at the store
station

state * array The execution status of the waybill


subtask
- PRISTINE: the subtask is in the
initial state
- ACTIVE: the subtask is in the
active state
- TRAVELLING: the robot is going
to the subtask target point
name type Description Example

- OPERATING: the robot has


reached the subtask target point
and is performing operations
- FINISHED : subtask completed
- FAILED : subtask failed

minItems: 0_maxItems:
2147483647
properties string
The meta attribute of the waybill
subtask

minItems: 0_maxItems:
2147483647
Waybill dependency. Before
dependencies string TOrder-002]
executing this waybill, the list of
names of the waybills that have
been executed is required

The waybill sequence to which the


wrappingSequence string($nullable) Sequence-0001
waybill belongs

dispensable boolean Is it an unnecessary waybill

Responses Code 400


example response
[
"Unknown transport order 'TOrder-01'."
]

6. Create a new waybill with the specified name

ask
 Function: Create a new waybill with the specified name
 method:POST
 Interface Description: /transportOrders/{name}
POST "http://host:7100/api/route/transportOrders/{name}"

Parameter introduction

name type Description example

string($date- Cut-off time for executing the 2018-05-


deadline *
time) waybill (UTC time zone) 17T06:42:40.396Z

(Optional) The name of the


intendedVehicle string robot expected to execute this AMB-01
shipment

(Optional) The business type


category string Park
of the waybill

(Optional) The waybill


sequence to which the waybill
belongs. When this item is
wrappingSequence string Sequence-01
specified, the waybill will be
added to the specified
sequence

The sequence of destination


destinations * array workstations contained in the
waybill

The name of the target


locationName * string Storage 01
workstation

The name of the action to be


operation * string performed by the robot at the Load cargo
station

Meta attribute under


properties * array If not, fill it in [].
destinations

properties array Meta property of the waybill. You can not pass this
This parameter is deprecated, field, or the value of
version 3.0.127 and later, it is the field is [].
no longer recommended to use
this field, so as not to cause
unnecessary problems.

Waybill dependent. Before


executing this waybill, the list
dependencies array TOrder-002
of names of the waybills that
have been executed is required

request example
{
"deadline": "2018-05-17T06:42:40.396Z",
"intendedVehicle": "AMB-01",
"category": "-",
"wrappingSequence": "",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "Wait",
"properties": [
{
"key": "duration",
"value": "2000"
}
]
}
],
"properties":[],
"dependencies": []
}

Notice:
1. If specified intendedVehicle , will force the waybill to be assigned to this robot. If this field is
not specified, the system will automatically assign a robot to the waybill
2. If not specified category , the system will default category to "-"
3. If specified wrappingSequence , the waybill will be added to this waybill sequence. If the
specified waybill sequence does not exist, a 404 exception will be returned
response
Responses Code 200
example response
请求已成功
Responses Code 404
example response
[
"Unknown location 'Storage 01'."
]

Responses Code 409


example response
[
"Transport order 'TOrder-01' already exists."
]

Responses Code 500


example response
[
""
]

Application example

common operation

7. Set the DO signal of the car body


【Parameter Description】

type
Field Name of required Defaults Remark
data

Operation
description SetDO string yes - -
(operation)

Operational Body DO string no Set the DO state of the


properties index robot.
(properties) (indicated by Its value is a Boolean
a string) value expressed as a
string;
"true" means set the
target DO to the
triggered state;
"false" means set the
target DO to the
untriggered state.

【Example of request】
1. LOC-AP1 After letting any robot reach, trigger DO1 (its index is 1).
{
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "SetDO",
"properties": [
{
"key": "1",
"value": "true"
}
]
}
]
}

8. wait for a while


【Parameter Description】

type
Default
Field Name of required Remark
s
data

Operation
description wait string yes none -
(operation)

Operational duration string no "1000" After the robot waits for


properties this time, it ends the
(properties) waiting action.
Its value is a non-negative
integer represented as a
string.
The unit is milliseconds
(ms).

If it is "true", when the


robot is waiting, its own
inverse_angle string no "false" angle is 180° different from
the specified angle of the
location mark.

【Example of request】
1. LOC-AP1After letting any robot arrive at , wait 5 seconds.
{
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "Wait",
"properties": [
{
"key": "duration",
"value": "5000"
}
]
}
]
}

9. Wait for the DI signal from the car body


【Parameter Description】

type
Field Name of required Defaults Remark
data

Operation
description WaitKey string yes none -
(operation)

Operational The index of string yes none When the specified digital
properties the car body input reaches the target
DI value, the wait action
ends.
Its value is a Boolean
value expressed as a
(indicated by string;
a string) "true" means the desired
target DI is triggered;
"false" means the desired
target DI is not triggered.
(properties)
After the robot waits for
this time, it ends the
waiting action directly.
infinity
Its value is a non-negative
timeout string no (no
integer represented as a
timeout)
string.
The unit is milliseconds
(ms).

【Example of request】
1. LOC-AP1After having any robot reach , monitor the state of DI3 (its index is 3 ) until it is
triggered.
{
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "WaitKey",
"properties": [
{
"key": "3",
"value": "true"
}
]
}
]
}
2. LOC-AP1After having any robot arrive at , wait for DI3 (which has index 3 ) to be triggered
with a timeout of 10 seconds.
{
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "WaitKey",
"properties": [
{
"key": "3",
"value": "true"
},
{
"key": "timeout",
"value": "10000"
}
]
}
]
}

10. jacking car


The jacking car lifts the material rack (vehicle)
【Parameter Description】

type
Field
of required Defaults Remark
Name
data

Operation
description JackLoad string yes - -
(operation)

Operational Whether the jacking robot needs to


properties perform position calibration through
(properties) "identification" before performing the
recognize string no "false"
operation of lifting the rack.
"true" means recognition is required;
"false" means recognition is not required.

recfile string no none Valid if and only if the value of recognize is


"true".
When jacking a robot to perform a recognition
operation, it needs to load the name of the
recognition file from the robot,
eg shelf/s0002.shelf.
After the recognition file is connected to the
robot through RoboshopPro, it can be viewed
in "Recognition Editing" ( pull all first ), as
shown in the figure

Whether to enable the PGV sensor.


"true" means enabled;
"false" means not enabled.
use_pgv string no "false"
Before the truck is lifted to pick up the
goods, the PGV is basically no longer
used for identification.

【Example of request】
1. Let the jacking truck Jack-01go to LOC-AP1 to pick up the goods, and no identification is
required.
{
"intendedVehicle": "Jack-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "JackLoad",
"properties": []
}
]
}
2. Let the jacking truck Jack-01go to LOC-AP1 to pick up the goods, and need to load the
file s0002.shelffor identification.
{
"intendedVehicle": "Jack-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "JackLoad",
"properties": [
{
"key": "recognize",
"value": "false"
},
{
"key": "recfile",
"value": "shelf/s0002.shelf"
}
]
}
]
}

Jacking car unloading rack (vehicle)


【Parameter Description】

type
Field
of required Defaults Remark
Name
data

Operation
description JackUnload string yes none -
(operation)

Operational Whether the jacking robot


properties needs to perform position
(properties) calibration through
"identification" before
performing the operation of
lowering the rack. For details
recognize string no "false" about "identification", please
consult Xiangong Intelligent
Engineer.
"true" means recognition is
required;
"false" means recognition is
not required.

use_pgv string no "false" Whether to enable the PGV


sensor.
"true" means enabled;
"false" means not enabled.

【Request example】
Let the jacking truck Jack-01go to LOC-AP1 to release the goods, and no identification is required.
{
"intendedVehicle": "Jack-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "JackLoad",
"properties": []
}
]
}

Adjust the jacking mechanism to the specified height


【Parameter Description】

type
Field
of required Defaults Remark
Name
data

Operation
Jack
description string yes none Lift to the specified height.
Height
(operation)

Operational recognize string no "false" Whether the jacking robot


properties needs to perform position
(properties) calibration through
"identification" before
performing the operation of
jacking up the rack to the
specified height. For details
about "identification", please
consult Xiangong Intelligent
Engineer.
"true" means recognition is
required;
"false" means recognition is
not required.

Whether to enable the PGV


sensor.
use_pgv string no "false"
"true" means enabled;
"false" means not enabled.

Set the jacking height (unit:


meter).
jack_height string no none
Its value is a floating-point
number represented as a string.

[Request example]
Ask the jacking vehicle Jack-01to LOC-AP1lift the jacking mechanism to 0.5meters without
identification.
{
"intendedVehicle": "Jack-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "JackHeight",
"properties": [
{
"key": "jack_height",
"value": "0.5"
}
]
}
]
}

11. Roller car/belt car


The operation of the roller car and the belt car is the same, and the description below will be the same
with the roller car.
Roller pre-loading (pre-loading)
【Parameter Description】

type of
Field Name required Defaults Remark
data

Operation RollerPreLoad string yes none The rollers rotate and are
description ready to be loaded with
(operation) goods.

The direction in which the


rollers are ready to be
loaded with goods.
"left" means loading the
rollers from the left side of
the roller robot.
"right" means loading the
rollers from the right side
direction string yes none
of the roller robot.
"front" refers to loading
the rollers from the front
of the roller robot.
"back" refers to the
loading of goods into the
roller from the rear of the
Operational roller robot.
properties
(properties) The ID of the roller when
index number no 0 there are multiple rollers
on the robot.

Whether the robot needs


to perform position
calibration through
"identification" before
performing the operation
of preparing the roller for
recognize string no "false"
loading. For details about
"identification", please
consult Xiangong
Intelligent Engineer.
"true" means enabled;
"false" means not enabled.

【Example of request】
1. Let the single-roller Roller-01robot LOC-AP1pre-load the load, the loading point is located on
the left side of the robot, and does not need to be identified.
{
"intendedVehicle": "Roller-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "RollerPreLoad",
"properties": [
{
"key": "direction",
"value": "left"
}
]
}
]
}

Roller loading of goods (feeding)


【Parameter Description】

Field type of
required Defaults Remark
Name data

Operation
description RollerLoad string yes none -
(operation)

Operational direction string yes none The direction in which the


properties rollers are loaded with goods.
(properties) "left" means loading the
rollers from the left side of
the roller robot.
"right" means loading the
rollers from the right side of
the roller robot.
"front" refers to loading the
rollers from the front of the
roller robot.
"back" refers to the loading
of goods into the roller from
the rear of the roller robot.

The ID of the roller when


index number no 0 there are multiple rollers on
the robot.

Whether the robot needs to


perform position calibration
through "identification"
before carrying out the
operation of roller
recognize string no "false" loading. For details about
"identification", please
consult Xiangong Intelligent
Engineer.
"true" means enabled;
"false" means not enabled.

【Example of request】
1. Let the single-roller robot Roller-01carry LOC-AP1the goods. The loading point is located on
the left side of the robot and does not need to be identified.
{
"intendedVehicle": "Roller-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "RollerLoad",
"properties": [
{
"key": "direction",
"value": "left"
}
]
}
]
}

Roller unloading goods (unloading)


【Parameter Description】
type of
Field Name required Defaults Remark
data

Operation
description RollerUnload string yes none -
(operation)

Operational The direction in which the


properties roller unloads the goods.
(properties) "left" means loading the
rollers from the left side of
the roller robot.
"right" means loading the
rollers from the right side
direction string yes none of the roller robot.
"front" refers to loading the
rollers from the front of the
roller robot.
"back" refers to the loading
of goods into the roller
from the rear of the roller
robot.

The ID of the roller when


index number no 0 there are multiple rollers on
the robot.

recognize string no "false" Whether the robot needs to


perform position
calibration through
"identification" before
performing the roller
unloading operation. For
details about
"identification", please
consult Xiangong
Intelligent Engineer.
"true" means enabled;
"false" means not enabled.

【Example of request】
1. Let the single-roller Roller-01robot LOC-AP1unload the goods. The unloading point is located
on the left side of the robot and does not need to be identified.
{
"intendedVehicle": "Roller-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "RollerUnload",
"properties": [
{
"key": "direction",
"value": "left"
}
]
}
]
}

roller keeps rolling


【Parameter Description】

Field type of Default


required Remark
Name data s

Operation
Roller
description string yes none -
Roll
(operation)

Operational direction string yes none The direction in which the


properties roller rolls.
(properties) "left" means to make the
roller roll from left to right.
"right" means that the
rollers roll from right to
left.
"front" means that the roller
rolls from front to back.
"back" means to roll the
roller from the back to the
front.

【Example of request】
1. Once the single-roller robot Roller-01reaches LOC-AP1, keep the roll rolling from left to right.
{
"intendedVehicle": "Roller-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "RollerRoll",
"properties": [
{
"key": "direction",
"value": "left"
}
]
}
]
}

Double side baffles descend and keep the rollers rolling


【Parameter Description】

Field type of
required Defaults Remark
Name data

Operation The double side baffles


Roller
description string yes none descend and keep the rollers
Pass
(operation) rolling.

Operational direction string yes none The direction in which the


properties roller rolls.
(properties) "left" means to make the
roller roll from left to right.
"right" means that the
rollers roll from right to
left.
"front" means that the roller
rolls from front to back.
"back" means to roll the
roller from the back to the
front.

【Example of request】
1. After the single-roller robot Roller-01reaches LOC-AP1, lower the side baffles and keep the
roll rolling from left to right.
{
"intendedVehicle": "Roller-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "RollerPass",
"properties": [
{
"key": "direction",
"value": "left"
}
]
}
]
}

Roller stops rolling


【Parameter Description】

Field type of
required Defaults Remark
Name data

Operation The double side baffles


Roller
description string yes none descend and keep the rollers
Stop
(operation) rolling.

Operational
properties none none none none -
(properties)

【Example of request】
1. Have the single-roller Roller-01robot LOC-AP1stop turning the rolls at .
{
"intendedVehicle": "Roller-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "RollerStop",
"properties": []
}
]
}

12. forklift

Forklift pickup
【Parameter Description】

Field type of Default


required Remark
Name data s

Operation
description ForkLoad string yes none Forklift picks up cargo.
(operation)

Operational The starting height of the


properties tines before operation (unit:
(properties) m).
start_height string no none
The height of the forklift
cannot be lower than the
minimum height.

After the goods are inserted,


end_height number no none the end height of the fork
tines (unit: m).

recognize string no "false" Whether the unmanned


forklift needs to perform
position calibration through
"identification" before
performing the operation of
inserting goods. For details
about "identification", please
consult Xiangong Intelligent
Engineer.
"true" means enabled;
"false" means not enabled.

【Example of request】
1. Ask the forklift CDD14-01to LOC-AP1pick up the goods. Before picking up the 0.7goods , the
required height of the fork is 0.9meters.
{
"intendedVehicle": "CDD14-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "ForkLoad",
"properties": [
{
"key": "start_height",
"value": "0.7"
},
{
"key": "end_height",
"value": "0.9"
},
{
"key": "recognize",
"value": "false"
}
]
}
]
}

Forklift delivery
【Parameter Description】

Field type of
required Defaults Remark
Name data

Operation
description ForkUnload string yes none Forklift unloads cargo.
(operation)

Operational start_height string no none The starting height of the


properties tines before operation (unit:
m).
The height of the forklift
cannot be lower than the
minimum height.

The end height of the fork


end_height number no none tines after unloading the
cargo (unit: m).

Whether the unmanned


(properties)
forklift needs to perform
position calibration through
"identification" before
performing the operation of
recognize string no "false" unloading goods. For details
about "identification", please
consult Xiangong Intelligent
Engineer.
"true" means enabled;
"false" means not enabled.

【Example of request】
1. Let the forklift CDD14-01go to LOC-AP1unload the goods. The height of the fork before
unloading is required to be 0.35meters , and the height of the fork after unloading is required
to be 0.2meters. During the unloading process, no identification is required.
{
"intendedVehicle": "CDD14-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "ForkUnload",
"properties": [
{
"key": "start_height",
"value": "0.35"
},
{
"key": "end_height",
"value": "0.2"
},
{
"key": "recognize",
"value": "false"
}
]
}
]
}

13. Earth cow

Land cow pick up


【Parameter Description】

type
Field
of required Defaults Remark
Name
data

Operation
description ForkLoad string yes none Forklift picks up cargo.
(operation)

Whether the unmanned forklift


needs to perform position
calibration through
"identification" before
Operational performing the operation of
properties recognize string no "false" inserting goods. For details
(properties) about "identification", please
consult Xiangong Intelligent
Engineer.
"true" means enabled;
"false" means not enabled.

【Example of request】
1. Let Di Niu DN-01go to LOC-AP1pick up the goods. During the pick-up process, no
identification is required.
{
"intendedVehicle": "DN-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "ForkLoad",
"properties": [
{
"key": "recognize",
"value": "false"
}
]
}
]
}

Local cattle release goods


【Parameter Description】

type
Field Default
of required Remark
Name s
data

Operation
description ForkUnload string yes none Forklift unloads cargo.
(operation)

Whether the unmanned forklift


needs to perform position
calibration through
"identification" before
Operational performing the operation of
properties recognize string no "false" unloading goods. For details
(properties) about "identification", please
consult Xiangong Intelligent
Engineer.
"true" means enabled;
"false" means not enabled.

【Example of request】
1. Let Di Niu DN-01go to LOC-AP1unload, during the unloading process, no identification is
required.
{
"intendedVehicle": "DN-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "ForkUnload",
"properties": [
{
"key": "recognize",
"value": "false"
}
]
}
]
}
14. Cancel the waybill with the specified name

ask
 Function: cancel the waybill with the specified name
 method:POST
 Interface Description: /transportOrders/{name}/withdrawal
POST "http://host:7100/api/route/transportOrders/{name}/withdrawal"

Parameter introduction

name type Description Default

2018-05-
name * ** The name of the waybill
17T06:42:40.396Z

If yes true, the waybill will immediately reach the


FAILED final state. If the robot is traveling on
the path at this time, such revocation will affect
the system's management of traffic resources,
which will lead to unsafe traffic.
immediate boolean false
If it is false, the robot will continue to move
forward until it has completed the traffic
resources it has acquired, and then enters the
FAILED final state of the waybill. Such
revocation is traffic-safe.

If yes true, while canceling the waybill, SRD will


disableVehicle boolean change the online status of the robot executing false
the waybill toTO_BE_RESPECTED

request example
POST "http://host:7100/transportOrders/test/withdrawal?immediate=true&disableVehicle=false"

response
Responses Code 200
example response
请求已成功
Responses Code 404
example response
[
"Unknown transport order 'TOrder-01'."
]

15. Deadline for updating the waybill with the specified name

ask
 Function: Update the cut-off time of the waybill with the specified name
 method:PUT
 Interface Description: /transportOrders/{name}
PUT "http://host:7100/api/route/transportOrders/{name}/deadline"

Parameter introduction

name type Description example

name * ** The name of the waybill test

The new deadline, ISO 2018-05-


newValue * string($date-time)
8601encoded using UTC 17T06:42:40.396Z

request example
PUT "http://localhost:7100/api/route/transportOrders/test/deadline?newValue=2018-05-17T06%3A42%3A40.396Z"

“%3A”: mean “:”

Response

Responses Code 200


example response
请求已成功

Responses Code 400


example response
[
"New value should not be null."
]

Responses Code 404


example response
[
"Unknown transport order 'TOrder-01'."
]

16. Robot
1. Get the information collection of the robot

ask
 Function: Get the information collection of the robot
 method:GET
 Interface Description: /vehicles
GET "http://host:7100/api/route/vehicles"

Parameter introduction

name type Description

Screen the robot based on its business status


- UNAVAILABLE: The robot is unavailable
- IDLE: The robot is idle
- AWAITING_ORDER: The robot is waiting for a new subtask in the
procState string
waybill
- PROCESSING_ORDER: The robot is executing the waybill

response
Responses Code 200
example response
[
{
"name": "AMB-01",
"properties": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"categories": [
"groupA"
],
"energyLevelGood": "90",
"energyLevelCritical": "30",
"energyLevelFullyRecharged": "95",
"energyLevelSufficientlyRecharged": "35",
"energyLevel": "60",
"integrationLevel": "TO_BE_IGNORED",
"procState": "UNAVAILABLE",
"transportOrder": "TOrder-01",
"orderSequence": "TOrder-01",
"currentDestination": "Location-01",
"unfinishedSteps": [
"LM11 --- LM12"
],
"paused": true,
"loadDevices": [
{
"label": "basket",
"full": true
}
],
"errorInfos": [
{
"timestamp": "2018-05-17T06:42:40Z",
"count": 1,
"level": "fatal, error, warning, info, etc.",
"message": "Alarm code + alarm content "
}
],
"owner": "srd@localhost",
"isDominating": true,
"allocations": [
"LM11 --- LM12"
],
"adapterEnabled": true,
"currentPosition": "LM01",
"state": "UNKNOWN"
}
]

Parameter interpretation

Exampl
name type Description
e

AMB-
name string the name of the robot
01

properties string Robot meta properties

categories ** Types of business that robots can perform groupA

When the remaining power of the robot is less


energyLevelGood integer than this value, SRD will judge that the robot 90
can be charged when it is idle

When the remaining power of the robot is less


energyLevelCritical integer than this value, SRD will judge that the robot 30
must be charged

During the charging process of the robot, if the


energyLevelFullyRecharge
integer power is higher than this value, the SRD 95
d
judges that the robot is fully charged.

During the charging process of the robot, if the


power is higher than this value, SRD judges
energyLevelSufficientlyRec
integer that the robot can accept orders 35
harged
(dispatcher.keepRechargingUntilFullyCharged
is false in the configuration)

The remaining power value of the robot (unit:


energyLevel integer 60
integer percentage)

integrationLevel string Online status of the robot in the SRD system __


Exampl
name type Description
e

- TO_BE_IGNORED: The robot is offline, and


the SRD will not identify the location of the
robot.
- TO_BE_NOTICED: The robot is offline and
the SRD identifies the location of the robot.
- TO_BE_RESPECTED: The robot is online
but cannot accept new waybills.
- TO_BE_UTILIZED: The robot is online and
can accept and execute new waybills.

The robot's current waybill execution status


- UNAVAILABLE: Unable to execute any
waybill and task
- IDLE: Idle state
procState **
- AWAITING_ORDER: The robot is waiting
for a new subtask in the waybill
- PROCESSING_ORDER: The robot is
executing the waybill

The name of the shipment that the robot is


string($nu TOrder-
transportOrder executing. null means the robot is not
llable) 01
executing any shipments.

The name of the waybill sequence that the


string($nu TOrder-
orderSequence robot is executing. null means the robot is not
llable) 01
executing any order sequence.

The destination the robot is heading


string($nu to. Destinations may be nodes, or Locatio
currentDestination
llable) workstations. null indicates that the current n-01
robot has no destination.

The route information that the robot has not


unfinishedSteps string
completed in the waybill subtask.
Exampl
name type Description
e

paused boolean Whether the robot is paused

loadDevices string Load mechanism status of the robot

errorInfos string Robot alarm information

owner string Owner of the robot's current control rights.

is Dominating boolean Whether the robot is occupied by this system.

The site and path resources occupied by the


allocations string
robot.

Whether the dispatch enables communication


adapterEnabled boolean
to the robot.

The name of the point the robot is currently


string($nu
currentPosition occupying. null means the robot is not on any LM01
llable)
site.

The current state of the robot


- UNKNOWN: unknown state
- UNAVAILABLE: communication timed out
or disconnected
state string
- ERROR: error state
- IDLE: idle state
- EXECUTING: executing waybill
- CHARGING: charging

2. Get information about the robot with the specified name

ask
 Function: Get the information of the robot with the specified name
 method:GET
 Interface Description: /vehicles/{name}
GET "http://host:7100/api/route/vehicles/AMB-01"

Parameter introduction

name type Description

name string the name of the robot

response
Responses Code 200
example response
{
"name": "AMB-01",
"properties": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"categories": [
"groupA"
],
"energyLevelGood": "90",
"energyLevelCritical": "30",
"energyLevelFullyRecharged": "95",
"energyLevelSufficientlyRecharged": "35",
"energyLevel": "60",
"integrationLevel": "TO_BE_IGNORED",
"procState": "UNAVAILABLE",
"transportOrder": "TOrder-01",
"orderSequence": "TOrder-01",
"currentDestination": "Location-01",
"unfinishedSteps": [
"LM11 --- LM12"
],
"paused": true,
"loadDevices": [
{
"label": "basket",
"full": true
}
],
"errorInfos": [
{
"timestamp": "2018-05-17T06:42:40Z",
"count": 1,
"level": "fatal, error, warning, info, etc.",
"message": "Alarm code + alarm content "
}
],
"owner": "srd@localhost",
"isDominating": true,
"allocations": [
"LM11 --- LM12"
],
"adapterEnabled": true,
"currentPosition": "LM01",
"state": "UNKNOWN"
}

Parameter interpretation

Exampl
name type Description
e

AMB-
name string the name of the robot
01

properties string Robot meta properties

categories string Types of business that robots can perform groupA

When the remaining power of the robot is


energyLevelGood integer less than this value, SRD will judge that 90
the robot can be charged when it is idle

When the remaining power of the robot is


energyLevelCritical integer less than this value, SRD will judge that 30
the robot must be charged

During the charging process of the robot,


if the power is higher than this value, the
energyLevelFullyRecharged integer 95
SRD judges that the robot is fully
charged.

energyLevelSufficientlyRechar integer During the charging process of the robot, 35


Exampl
name type Description
e

if the power is higher than this value,


SRD judges that the robot can accept
ged orders
(dispatcher.keepRechargingUntilFullyCh
arged is false in the configuration)

The remaining power value of the robot


energyLevel integer 60
(unit: integer percentage)

Online status of the robot in the SRD


system
- TO_BE_IGNORED: The robot is
offline, and the SRD will not identify the
location of the robot.
- TO_BE_NOTICED: The robot is
integrationLevel string offline and the SRD identifies the
location of the robot.
- TO_BE_RESPECTED: The robot is
online but cannot accept new waybills.
- TO_BE_UTILIZED: The robot is
online and can accept and execute new
waybills.

The robot's current waybill execution


status
- UNAVAILABLE: Unable to execute
any waybill and task
procState string - IDLE: Idle state
- AWAITING_ORDER: The robot is
waiting for a new subtask in the waybill
- PROCESSING_ORDER: The robot is
executing the waybill

transportOrder string($nullabl The name of the shipment that the robot TOrder-
e) is executing. null means the robot is not 01
Exampl
name type Description
e

executing any shipments.

The name of the waybill sequence that


string($nullabl the robot is executing. null means the TOrder-
orderSequence
e) robot is not executing any order 01
sequence.

The destination the robot is heading


string($nullabl to. Destinations may be nodes, or Locatio
currentDestination
e) workstations. null indicates that the n-01
current robot has no destination.

The route information that the robot has


unfinishedSteps string
not completed in the waybill subtask.

paused boolean Whether the robot is paused

loadDevices string Load mechanism status of the robot

errorInfos string Robot alarm information

Owner of the robot's current control


owner string
rights.

Whether the robot is occupied by this


is Dominating boolean
system.

The site and path resources occupied by


allocations string
the robot.

Whether the dispatch enables


adapterEnabled boolean
communication to the robot.

The name of the point the robot is


string($nullabl
currentPosition currently occupying. null means the robot LM01
e)
is not on any site.
Exampl
name type Description
e

The current state of the robot


- UNKNOWN: unknown state
- UNAVAILABLE: communication
timed out or disconnected
state string
- ERROR: error state
- IDLE: idle state
- EXECUTING: executing waybill
- CHARGING: charging

Responses Code 404


example response
[
"Unknown vehicle 'AMB-01'."
]

3. Get the detail of the robot information

ask
 Function: Get the information collection of robot details. The robot details information is a
json structure, including a series of information such as the actual coordinates of the robot,
battery voltage and current, digital sensor status, and alarm status. This information does not
have a dedicated schema, and fields will be added as the Robokit version increases.
 method:GET
 Interface Description: /vehicleDetails
GET "http://host:7100/api/route/vehicleDetails"

Parameter introduction
None

response
Responses Code 200
example response
{
"DI": [false, false, false, false, false, false, false, false, false],
"angle": -3.1369,
"battery_level": 0.72,
"battery_temp": 27.0,
"blocked": false,
"brake": false,
"charging": false,
"confidence": 0.9823,
"current_map": "2020724",
"current_station": "AP146",
"dispatch_mode": 1,
"dispatch_state": 3,
"emergency": false,
"errorinfo": [
{
"code": 55001,
"count": 1,
"level": "Warning",
"message": "The robot is in the dispatching state. If you need to control, please regain control and go offline during
dispatching.",
"timestamp": "2020-09-11T18:11:15.128Z"
}
],
"map_version": "v1.0.6",
"model": "AMB-150-D",
"model_version": "v3.0.2",
"odo": 55910.419,
"pause": false,
"time": 35023398,
"today_odo": 2345.569,
"total_time": 2600814186,
"vehicle_id": "AMB1",
"version": "v3.2.6.46",
"voltage": 51.212,
"vx": -0.0,
"vy": -0.0,
"w": -0.0,
"x": -25.1966,
"y": 3.835
}

Parameter interpretation
name Description

DI DI state

the angle robot angle

battery_level Robot power

battery_temp battery temperature

blocked robot blocking state

brake Robot Brake Status

charging Robot charging status

confidence Confidence

current_map current map name

current_station current position

_Control mode_
0 = stand-alone mode
dispatch_mode
1 = dispatch
mode_2 = dispatch mode but lost connection with dispatch system_

_Robot status_
0=UNKNOWN
1=UNAVAILABLE
dispatch_state 2=ERROR
3=IDLE
4=EXECUTING
_5=CHARGING _

emergency _Emergency stop status of the robot _

error info Robot error message

map_version map version


name Description

model _model name_

model_version model version

odo total mileage

pause suspended state

time _operation hours _

today_odo _Accumulated mileage of the robot today _

total_time total running time

vehicle_id _robot name_

version Robokit program version

voltage robot voltage

vx _X direction speed _

vy _Y direction speed _

w _angle _

x X coordinate

y Y coordinate

4. Get the details of the robot with the specified name

ask
 Function: Get the information collection of robot details. The robot details information is a
json structure, including a series of information such as the actual coordinates of the robot,
battery voltage and current, digital sensor status, and alarm status. This information does not
have a dedicated schema, and fields will be added as the Robokit version increases.
 method:GET
 Interface Description: /vehicleDetails/{name}
GET "http://host:7100/api/route/vehicleDetails/AMB-01"

Parameter introduction
none

response
Responses Code 200
example response
{
"DI": [false, false, false, false, false, false, false, false, false],
"angle": -3.1369,
"battery_level": 0.72,
"battery_temp": 27.0,
"blocked": false,
"brake": false,
"charging": false,
"confidence": 0.9823,
"current_map": "2020724",
"current_station": "AP146",
"dispatch_mode": 1,
"dispatch_state": 3,
"emergency": false,
"errorinfo": [
{
"code": 55001,
"count": 1,
"level": "Warning",
"message": "The robot is in the dispatching state. If you need to control, please regain control and go offline during
dispatching.",
"timestamp": "2020-09-11T18:11:15.128Z"
}
],
"map_version": "v1.0.6",
"model": "AMB-150-D",
"model_version": "v3.0.2",
"odo": 55910.419,
"pause": false,
"time": 35023398,
"today_odo": 2345.569,
"total_time": 2600814186,
"vehicle_id": "AMB1",
"version": "v3.2.6.46",
"voltage": 51.212,
"vx": -0.0,
"vy": -0.0,
"w": -0.0,
"x": -25.1966,
"y": 3.835
}

Parameter interpretation

name Description

DI DI state

the angle robot angle

battery_level Robot power

battery_temp battery temperature

blocked robot blocking state

brake Robot Brake Status

charging Robot charging status

confidence Confidence

current_map current map name

current_station current position

_Control mode_
0 = stand-alone mode
dispatch_mode
1 = dispatch
mode_2 = dispatch mode but lost connection with dispatch system_
name Description

_Robot status_
0=UNKNOWN
1=UNAVAILABLE
dispatch_state 2=ERROR
3=IDLE
4=EXECUTING
_5=CHARGING _

emergency _Emergency stop status of the robot _

error info Robot error message

map_version map version

model _model name_

model_version model version

odo total mileage

pause suspended state

time _operation hours _

today_odo _Accumulated mileage of the robot today _

total_time total running time

vehicle_id _robot name_

version Robokit program version

voltage robot voltage

vx _X direction speed _

vy _Y direction speed _
name Description

w _angle _

x X coordinate

y Y coordinate

Responses Code 404


example response
[
"Unknown vehicle 'AMB-01'."
]

5. Get all robot state change records

ask
 Function: Obtain the information collection of all robot state changes, and the change record
information is a json structure.
 method: GET
 Interface Description: /api/event-log/vehicles
GET "http://localhost:7100/api/event-log/vehicles?pageNo=1&pageSize=2"

Parameter introduction
 pageNo: page number
 pageSize: page size, how many pieces of data each page contains
Other field queries are not supported, and the maximum page size should not exceed 5000, and the
cycle of continuously calling this interface should not be too long, and the shortest interval is about 2
seconds before calling the second time. Failure to do so may put request pressure on the system.

response
The response code is 200.
example response
{
"total": 30856,
"page": [
{
"id": "631fefec5410225c48390117",
"vehicle": "WT-CPD01",
"fromState": "UNKNOWN",
"toState": "IDLE",
"duration": 2897,
"robotTask": "",
"transportOrder": "",
"orderSequence": "",
"startOn": "2022-09-13T02:50:17.266Z",
"endOn": "2022-09-13T02:50:20.163Z"
},
{
"id": "631fefec5410225c48390118",
"vehicle": "WB-CPD03",
"fromState": "UNKNOWN",
"toState": "IDLE",
"duration": 2980,
"robotTask": "",
"transportOrder": "",
"orderSequence": "",
"startOn": "2022-09-13T02:50:17.201Z",
"endOn": "2022-09-13T02:50:20.181Z"
}
],
"pageNo": 1,
"pageSize": 2,
"pageNum": 15428
}
Response body parameter

name type Description

number
total total number of entries
type

page array type robot state array

number
pageNo. page number
type

number
pageSize page size
type

pageNum number total pages


name type Description

type

page structure analysis

name type Description

id string The unique ID of the entry, can be ignored

vehicle string robot name

fromState string initial state

toState string end state (next state)

duration number duration

robotTask string Current task ID

transportOrder string Current waybill ID

orderSequence string current sequence id

startOn string state start time

endOn string state end time

6. Obtain the statistical details of the number of robot errors

ask
 Function: Get a collection of tasks
 method:GET
 Interface Description: api/stats-error/details
GET "http://127.0.0.1:7100/api/stats-error/details?level=Year&vehicle=AMB-01&time=2021&pageSize=2&pageNo=1"

Parameter introduction
name type Description

level string Statistical time unit: Year, Month, Day, Hour

vehicle string Specify the robot name

Specify the statistical time, which should correspond to the level , such as
time string
Year => 2021, Month => 2021-01 and so on

pageNo. integer Page Index (Default value: 1)

pageSize integer The maximum number of tasks a page contains

The example
queries all tasks in January, including the selected time, with one data item per page.
GET "http://127.0.0.1:7100/api/stats-error/details?level=Year&vehicle=AMB-01&time=2021&pageSize=2&pageNo=1"
response
{
"total": 6,
"page": [
{
"code": "54025",
"message": "Motor Disable:motor,motor1",
"last": "2021-08-24T15:00:00Z",
"count": 3
},
{
"code": "52001",
"message": "robot model uninitialized",
"last": "2021-08-24T15:00:00Z",
"count": 3
}
],
"pageNo": 1,
"pageSize": 2,
"pageNum": 3
}
response parsing

name type Description

total integer total number of entries


name type Description

page array array of error details

Specify the statistical time, which should correspond to the level , such as
time string
Year => 2021, Month => 2021-01 and so on

pageNo. integer Page Index (Default value: 1)

pageSize integer The maximum number of tasks a page contains

pageNum integer total pages

page field

name type Description

code string error code

message string wrong description

last string last time

count integer Occurrences


7. Obtain the details of the cumulative error duration of the robot

ask
 Function: Get the cumulative collection of robot errors
 method:GET
 Interface Description: api/stats-error-trace
GET "http://127.0.0.1:7100/api/stats-error-trace?levels=errors&codes=52000,52010&vehicles=AMB-01,AMB-
02&startOnStart=2021-08-24&startOnEnd=2021-08-24&pageNo=1&pageSize=2"

Parameter introduction

name type Description

levels string Error levels: fatals, errors, warnings

vehicles string Specify the robot name

codes string specify error code

startOnStart string Specify start time (included)

startOnEnd string Specify an end time (inclusive)

pageNo. integer Page Index (Default value: 1)

pageSize integer page contains maximum number of bad entries

The example
queries robots AMB-01, AMB-02 on 2021-08-24 and 2021-08-25, the code is 52000, 52010 error
message, 2 pieces of data per page.
GET "http://127.0.0.1:7100/api/stats-error-trace?levels=errors&codes=52000,52010&vehicles=AMB-01,AMB-
02&startOnStart=2021-08-24&startOnEnd=2021-08-25&pageNo=1&pageSize=2"
response
{
"total": 12,
"page": [
{
"id": "612513fa6f89197fb99d696b",
"vehicle": "AMB-01",
"code": "52000",
"level": "errors",
"message": "mode is not activated",
"duration": 2698394,
"startOn": "2021-08-24T15:00:00Z",
"endOn": "2021-08-24T15:44:58.394Z"
},
{
"id": "612513fa6f89197fb99d696f",
"vehicle": "AMB-01",
"code": "52010",
"level": "errors",
"message": "robot model uninitialized, can not upload",
"duration": 2698394,
"startOn": "2021-08-24T15:00:00Z",
"endOn": "2021-08-24T15:44:58.394Z"
}
],
"pageNo": 1,
"pageSize": 2,
"pageNum": 6
}
response parsing

name type Description

total integer total number of entries

page array array of error details

pageNo. integer page index

pageSize integer Maximum number of page arrays

pageNum integer total pages

page field

name type Description

vehicle string AGV name

code string error code

level string Error levels: fatals, errors, warnings

message string wrong description


name type Description

duration integer Duration, in milliseconds

startOn string Starting time

endOn string End Time

8. Cancel the waybill that the specified robot is executing

ask
 Function: cancel the waybill being executed by the specified robot, terminate the execution
of the current waybill, but will not delete the waybill from the system and database
 method: POST
 Interface Description: /vehicles/{name}/withdrawal
POST "http://host:7100/api/route/vehicles/{name}/withdrawal"

Parameter introduction

name type Description Default

2018-05-
name * ** The name of the waybill
17T06:42:40.396Z

If yes true, the waybill will immediately reach the


FAILED final state. If the robot is traveling on the
path at this time, such revocation will affect the
system's management of traffic resources, which
immediate boolean will lead to unsafe traffic. false
If it is false, the robot will continue to move forward
until it has completed the traffic resources it has
acquired, and then enters the FAILED final state of
the waybill. Such revocation is traffic-safe.

disableVehicle boolean If yes true, while canceling the waybill, SRD will false
change the online status of the robot executing the
name type Description Default

waybill toTO_BE_RESPECTED

request example
POST "http://host:7100/vehicles/test/withdrawal?immediate=true&disableVehicle=false"

response
Responses Code 200
example response
请求已成功
Responses Code 404
example response
[
"Unknown vehicle 'AMB-01'."
]
9. Pause or resume the specified robot

ask
 Function: Pause or continue the specified robot
 method: POST
 Interface Description: /vehicles/{name}/pause
PUT "http://host:7100/api/route/vehicles/{name}/pause"

Parameter introduction

name type Description example

name * ** the name of the robot AMB-01

If yes true, suspend the specified robot; otherwise, make the


newValue * boolean
specified robot continue to run

request example
POST "http://localhost:7100/api/route/vehicles/AMB-01/pause?newValue=true"

response
Responses Code 200
example response
请求已成功
Responses Code 400
example response
[
"Parameter 'newValue' is illegal."
]
Responses Code 404
example response
[
"Unknown vehicle 'AMB-01'."
]
10. Pause or resume all bots

ask
 Function: Pause or continue all robots
 method:POST
 Interface Description: /vehicles/pause
PUT "http://host:7100/api/route/vehicles/pause"

Parameter introduction

name type Description example

If yes true, suspend the specified robot; otherwise, make the


newValue * boolean
specified robot continue to run

request example
POST "http://localhost:7100/api/route/vehicles/pause?newValue=true"

response
Responses Code 200
example response
请求已成功

Responses Code 400


example response
[
"Parameter 'newValue' is illegal."
]

11. Set the online status for the specified robot

ask
 Function: Set the online status for the specified robot
 method: PUT
 Interface Description: /vehicles/{name}/integrationLevel
PUT "http://host:7100/api/route/vehicles/{name}/integrationLevel"
Parameter introduction

name type Description example

name * ** the name of the robot AMB-01

The specified robot online status


 TO_BE_IGNORED: The robot is offline, and the SRD
will not identify the robot's location.
 TO_BE_NOTICED: The robot is offline and the SRD
newValue * ** identifies the location of the robot.
 TO_BE_RESPECTED: The robot is online but cannot
accept new waybills.
 TO_BE_UTILIZED: The robot is online and can accept
and execute new waybills.

request example
PUT "http://localhost:7100/api/route/vehicles/AMB-01/integrationLevel?newValue=TO_BE_UTILIZED"

response
Responses Code 200
example response
请求已成功
Responses Code 400
example response
[
"Parameter 'newValue' is illegal."
]
Responses Code 404
example response
[
"Unknown vehicle 'AMB-01'."
]

12. Set online status for all bots

ask
 Function: Set online status for all robots
 method:PUT
 Interface Description: /vehicles/integrationLevel
PUT "http://host:7100/api/route/vehicles/integrationLevel"
Parameter introduction

name type Description example

Specified robot online status


- TO_BE_IGNORED: The robot is offline and the SRD will not
identify the robot location.
- TO_BE_NOTICED: The robot is offline and the SRD
newValue * ** identifies the location of the robot.
- TO_BE_RESPECTED: The robot is online but cannot accept
new waybills.
- TO_BE_UTILIZED: The robot is online and can accept and
execute new waybills.

request example
PUT "http://localhost:7100/api/route/vehicles/integrationLevel?newValue=TO_BE_UTILIZED"

response
Responses Code 200
example response
请求已成功
Responses Code 400
example response
[
"Parameter 'newValue' is illegal."
]

13. Update the type of business that the robot can operate.

ask
 Function: Update the business types that the robot can operate
 method: PUT
 Interface Description: /vehicles/{NAME}/processableCategories
PUT "http://host:7100/api/route/vehicles/{NAME}/processableCategories"

Parameter introduction
name type Description example

name * ** the name of the robot AMB-01

The type of business that the robot can perform, supports


newValue * string
multiple values, separated by commas

request example
PUT "http://localhost:7100/api/route/vehicles/AMB-01/processableCategories?newValues=fork"

response
Responses Code 200
example response
请求已成功
Responses Code 400
example response
[
"Missing query parameter newValues."
]
Responses Code 404
example response
[
"Unknown vehicle 'AMB-01'."
]

14. Update the robot's "full battery threshold"

ask
 Function: Update the robot's "full battery threshold"
 method:PUT
 Interface Description: /vehicles/{NAME}/energyLevelGood
PUT "http://host:7100/api/route/vehicles/{NAME}/energyLevelGood"

Parameter introduction
name type Description example

name * ** the name of the robot AMB-01

When the robot's power is lower than this value but higher than
newValue * integer energyLevelCritical, the robot will go to the charging station to
charge when it is idle.

request example
PUT "http://localhost:7100/api/route/vehicles/AMB-01/energyLevelGood?newValue=85"

response
Responses Code 200
example response
请求已成功
Responses Code 400
example response
[
"Bad energy level."
]
Responses Code 404
example response
[
"Unknown vehicle 'AMB-01'."
]

15. Update the robot's "battery alarm threshold"

ask
 Function: Update the robot's "battery alarm threshold"
 method:PUT
 Interface Description: /vehicles/{NAME}/energyLevelCritical
PUT "http://host:7100/api/route/vehicles/{NAME}/energyLevelCritical"

Parameter introduction
name type Description example

name * ** the name of the robot AMB-01

When the power of the robot is lower than this value, the robot
newValue * integer will be forced to go to the charging station to charge after the
current business is over.

request example
PUT "http://localhost:7100/api/route/vehicles/AMB-01/energyLevelCritical?newValue=25"

response
Responses Code 200
example response
请求已成功
Responses Code 400
example response
[
"Bad energy level."
]
Responses Code 404
example response
[
"Unknown vehicle 'AMB-01'."
]

16. Update the robot's "charging to usable threshold"

ask
 Function: Update the robot's "charge to usable threshold"
 method:PUT
 Interface Description: /vehicles/{NAME}/energyLevelSufficientlyRecharged
PUT "http://host:7100/api/route/vehicles/{NAME}/energyLevelSufficientlyRecharged"

Parameter introduction
name type Description example

name * ** the name of the robot AMB-01

When the robot is charging, if the configuration file is


newValue * integer configured keepRechargingUntilFullyCharged = false, the robot can be
assigned a new waybill when it is charged to this threshold

request example
PUT "http://localhost:7100/api/route/vehicles/AMB-01/energyLevelSufficientlyRecharged?newValue=30"

response
Responses Code 200
example response
请求已成功
Responses Code 400
example response
[
"Bad energy level."
]
Responses Code 404
example response
[
"Unknown vehicle 'AMB-01'."
]

17. Update the robot's "charge to full battery threshold"

ask
 Function: Update the robot's "charge to full power threshold"
 method:PUT
 Interface Description: /vehicles/{NAME}/energyLevelFullyRecharged
PUT "http://host:7100/api/route/vehicles/{NAME}/energyLevelFullyRecharged“

Parameter introduction
name type Description example

name * ** the name of the robot AMB-01

When the robot is charging, if the configuration file is


configured keepRechargingUntilFullyCharged = true, the robot can be
assigned a new waybill when it is charged to this threshold. In
newValue * integer addition, if the configuration file is
configured parkVehicleWhenFullyCharged = true, after the robot is
charged to this threshold, it will stop charging and look for a park
point to dock.

request example
PUT "http://localhost:7100/api/route/vehicles/AMB-01/energyLevelFullyRecharged?newValue=98"

response
Responses Code 200
example response
请求已成功
Responses Code 400
example response
[
"Bad energy level."
]
Responses Code 404
example response
[
"Unknown vehicle 'AMB-01'."
]
18. Task

Get task collection


ask
 Function: Get a collection of tasks
 method:GET
 Interface Description: /api/robot-task
GET "http://127.0.0.1:7100/api/robot-task"

Parameter introduction

name type Description

id string Filter tasks by id

outOrderNo string Filter external order number, default is empty

createdOnStart string Filter tasks whose creation time is greater than or equal to this time

createdOnEnd string Filter tasks whose creation time is less than or equal to this time

pageNo. integer Page Index (Default value: 1)

pageSize integer The maximum number of tasks a page contains

The example
queries all tasks in January, including the selected time, with one data item per page.
GET "http://127.0.0.1:7100/api/robot-task?pageNo=1&pageSize=1&createdOnStart=2022-01-01&createdOnEnd=2022-
01-31"
response
{
"total": 40,
"page": [
{
"id": "6320243f1149e33d763cb664",
"def": "",
"createdOn": "2022-09-13T06:33:35.697Z",
"modifiedOn": "2022-09-13T06:34:39.266Z",
"finishedOn": "2022-09-13T06:34:39.267Z",
"duration": 63570,
"state": 1000,
"outOrderNo": null,
"persistedVariables": {},
"workTypes": [],
"workStations": [],
"priority": 0,
"noTransport": false,
"errorInfo": "",
"transports": [
{
"taskId": "6320243f1149e33d763cb664",
"routeOrderName": "6320243f1149e33d763cb666",
"category": "",
"deadline": null,
"intendedRobot": "",
"processingRobot": "WB-CPD02",
"processingRobotAssignedOn": "2022-09-13T06:33:38.800Z",
"seqId": null,
"seqStartSentOn": null,
"timeCost": 0,
"finishedOn": "2022-09-13T06:34:39.262Z",
"state": 1000,
"failReason": "",
"stages": [
{
"state": 1000,
"routeState": "FINISHED",
"location": "Check01",
"area": "",
"operation": "Wait",
"properties": "[]",
"blockReason": "",
"notice": "",
"timeCost": 63541,
"finishedOn": "2022-09-13T06:34:39.256Z"
}
]
}
]
}
],
"pageNo": 1,
"pageSize": 1,
"pageNum": 40
}
Task Basic Fields
name type Description

total integer total number of entries

page array Task information array

pageNo. integer page number

pageSize integer Quantity per page

pageNum integer total pages

page common fields

name type Description

id string task unique id

createdOn string creation time

finishedOn string End Time

duration integer Duration, unit: milliseconds

state integer Task status (0: created, 1000: successful, 1800: canceled, 2000: failed)

outOrderNo string External tracking number

transports array Robot information collection (robot information used to record tasks)

priority integer Priority (0: Normal, 10: Urgent, 30: Urgent)

Common fields of the transports structure

name type Description

routeOrderName string transport id

The name of the executed AGV (if the value is null, it


processingRobot string
means that the order has not been received yet)

processingRobotAssignedOn string Allocate AGV time


name type Description

A collection of workstations representing this transport


stages array
path

Common fields of stages structure

name type Description

location string workstation name

operation string action performed

The time it takes to complete the action on this workstation, in


timeCost integer
milliseconds

state integer stage status, 0: created; 600: executing; 1000: successful; 2000: failed.

19. waybill sequence


20. Get the waybill sequence with the specified name

ask
 Function: Get the waybill sequence with the specified name
 method:GET
 Interface Description: /orderSequences/{NAME}
GET "http://host:7100/api/route/orderSequences/{NAME}"

Parameter introduction

name type Description

The name of the waybill sequence, the name of the waybill sequence cannot be
name string
repeated

Example request with parameters:


GET "http://host:7100/api/route/orderSequences/test"

response
Responses Code 200
example response
{
"name": "Sequence-01",
"orders": [
"Order-01"
],
"complete": true,
"finished": true,
"failureFatal": true,
"finishedIndex": 0,
"category": "Park",
"intendedVehicle": "AMB-01",
"processingVehicle": "AMB-01"
}

Parameter interpretation

name type Description Example

Sequence-
name string The name of the waybill sequence
01

The name of the waybill contained in the


orders string Order-01
sequence

Whether the sequence has closed the waybill


complete boolean entry. If it is not closed, you can continue to
add new waybills

finished boolean Whether the sequence has completed

If true, after any waybill in the sequence is


canceled and reaches the FAILED final state,
failureFatal boolean
SRD will cancel all other waybills in the
sequence and close the sequence entry

The index in the sequence of the most recent


finalized waybill. When the value is -1, it
finishedIndex integer
means that the sequence has not been
executed
name type Description Example

category ** Business type of waybill sequence

The name of the robot expected to execute


intendedVehicle string($nullable) AMB-01
this waybill sequence

processing The name of the robot that actually executes


string($nullable) AMB-01
Vehicle this waybill sequence

Responses Code 400


example response
[
"Unknown order sequence 'Sequence-01'."
]

21. Create a new waybill sequence with the specified name

ask
 Function: Create a new waybill sequence with the specified name
 method:POST
 Interface Description: /orderSequences/{NAME}
POST "http://host:7100/api/route/orderSequences/{NAME}"

Waybill sequence introduction:


 Create a waybill sequence, in a sequence, the robot will execute all the waybills in turn
 When the waybill entry in the sequence is open, you can dynamically add the waybill to the
sequence (when submitting the waybill, wrappingSequencespecify the sequence to which it
belongs)
 Through POST /orderSequences/{NAME}/markComplete the interface, the waybill entry of the
sequence can be closed.
 When the robot finishes executing the last waybill in the sequence and the waybill entry of
the sequence is open, the robot will wait in place without going to any location or
performing any operations.
 When the robot finishes executing the last waybill in the sequence and the waybill entry of
the sequence is closed, the sequence will be in the final state (finished == true).
Parameter introduction
name type Description

Deprecated! (Optional) The name of the robot expected to


intendedVehicle string
execute this order sequence

category string (Optional) The overall business type in the waybill sequence

(Optional) If true, after any waybill in the sequence is


canceled and reaches the FAILED final state, SRD will
failureFatal boolean
cancel all other waybills in the sequence and close the
sequence entry

(Optional) Whether to close the waybill entry for the


complete boolean sequence. If it is not closed, you can continue to add new
waybills

The sequence of destination workstations contained in the


transports *
waybill

name * string Waybill name

order * Waybill details

string($date-
deadline * Cut-off time for executing the waybill (UTC time zone)
time)

(Optional) The name of the robot expected to execute this


intendedVehicle string
shipment

category string (Optional) The business type of the waybill

(Optional) The waybill sequence to which the waybill


wrappingSequence string belongs. When this item is specified, the waybill will be
added to the specified sequence

The sequence of destination workstations contained in the


destinations * string
waybill

locationName * string The name of the target workstation


name type Description

The name of the action to be performed by the robot at the


operation * string
station

properties * string Meta property of the waybill subtask

properties * string Meta property of waybill

Waybill dependent. Before executing this waybill, the list of


dependencies * string
names of the waybills that have been executed is required

properties * string Meta property of waybill sequence

request example
{
"intendedVehicle": "AMB-01",
"category": "Park",
"failureFatal": true,
"complete": false,
"transports": [
{
"name": "Order-01",
"order": {
"deadline": "2018-05-17T06:42:40.396Z",
"intendedVehicle": "AMB-01",
"category": "Park",
"wrappingSequence": "Sequence-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "Wait",
"properties": [
{
"key": "duration",
"value": "2000"
}
]
}
],
"properties":[],
"dependencies": []
}
],
"properties": []
}

response
Responses Code 200
example response
请求已成功
Responses Code 404
example response
[
"Unknown location 'Storage 01'."
]
Responses Code 409
example response
[
"Order sequence 'Sequence-01' already exists."
]
Responses Code 500
example response
[
"string"
]

22. Get the collection of waybill sequences

ask
 Function: Get the collection of waybill sequences
 method:GET
 Interface Description: /orderSequences/{NAME}
GET "http://host:7100/api/route/orderSequences"

Parameter introduction

name type Description

pageNo. integer Page Index (Default value: 1)

pageSize integer The page contains the maximum number of waybill sequences
name type Description

Filter the waybills by the name of the robot expected to execute the
intendedVehicle string
waybill sequence

Filter the waybills by the name of the robot that actually executed the
processing Vehicle string
waybill sequence

category string Filter the waybill by the business type of the waybill sequence

namePrefix string The name prefix of the waybill sequence

orderNamePrefix string Waybill name prefix

complete boolean Whether the waybill sequence has closed the waybill entry

If true, after any waybill in the sequence is canceled and reaches the
failureFatal boolean FAILED final state, SRD will cancel all other waybills in the
sequence and close the sequence entry

Example request with parameters:


GET "http://localhost:7100/api/route/orderSequences?pageNo=1&complete=true"

response
Responses Code 200
example response
{
"pageNo": 1,
"pageSize": 1,
"page": [
{
"name": "Sequence-01",
"orders": [
"Order-01"
],
"complete": true,
"finished": true,
"failureFatal": true,
"finishedIndex": 0,
"category": "Park",
"intendedVehicle": "AMB-01",
"processingVehicle": "AMB-01"
}
],
"total": 1
}

Parameter interpretation

name type Description Example

pageNo * integer page index

Each page contains the number of waybill


pageSize * integer
sequences

page * Waybill sequence data page

Sequence-
name string The name of the waybill sequence
01

The name of the waybill contained in the


orders string Order-01
sequence

Whether the sequence has closed the waybill


complete boolean entry. If it is not closed, you can continue to
add new waybills

finished boolean Whether the sequence has completed

If true, after any waybill in the sequence is


canceled and reaches the FAILED final state,
failureFatal boolean
SRD will cancel all other waybills in the
sequence and close the sequence entry

The index in the sequence of the most recent


finalized waybill. When the value is -1, it
finishedIndex integer
means that the sequence has not been
executed

category ** Business type of waybill sequence

intendedVehicle string($nullable) The name of the robot expected to execute AMB-01


name type Description Example

this waybill sequence

processing The name of the robot that actually executes


string($nullable) AMB-01
Vehicle this waybill sequence

total * integer The total quantity of the waybill sequence

Responses Code 400


example response
[
"Unknown vehicle 'AMB-01'."
]

23. Waybill entry to close waybill sequence

ask
 Function: Close the waybill entry of the waybill sequence, please note that once the waybill
entry of the sequence is closed, the waybill entry cannot be opened again.
 method:POST
 Interface Description: /orderSequences/{NAME}/markComplete
POST "http://host:7100/api/route/orderSequences/{NAME}/markComplete"

Parameter introduction

name type Description Default

The name of the waybill


name * ** 2018-05-17T06:42:40.396Z
sequence

request example
POST "http://host:7100/orderSequences/test/markComplete"

response
Responses Code 200
example response
请求已成功

Responses Code 404


example response
[
"Unknown order sequence 'Sequence-01'."
]

24. Cancel the waybill sequence with the specified name

ask
 Function: Close and terminate the specified waybill sequence. When there is a waybill in the
sequence being executed by the robot (especially when the robot has already loaded the
goods), please call this API with caution and give full consideration to the upper-level
business logic.
 method:POST
 Interface Description: /orderSequences/{NAME}/markComplete
POST "http://host:7100/api/route/orderSequences/{NAME}/withdrawal"

Parameter introduction

name type Description Default

2018-05-
name * ** The name of the waybill
17T06:42:40.396Z

If yes true, the waybill will immediately reach the


FAILED final state. If the robot is traveling on
the path at this time, such revocation will affect
the system's management of traffic resources,
which will lead to unsafe traffic.
immediate boolean false
If it is false, the robot will continue to move
forward until it has completed the traffic
resources it has acquired, and then enters the
FAILED final state of the waybill. Such
revocation is traffic-safe.

disableVehicle boolean If yes true, while canceling the waybill sequence, false
name type Description Default

SRD will change the online status of the robot


executing the waybill toTO_BE_RESPECTED

request example
POST "http://host:7100/orderSequences/test/withdrawal?immediate=true&disableVehicle=false"

response
Responses Code 200
example response
请求已成功
Responses Code 404
example response
[
"Unknown order sequence 'Sequence-01'."
]

25. scene element


Update the disabled state of a path
ask
 Function: Update the disabled state of the path
 method: PUT
 Interface Description: /paths/{NAME}/lock
PUT "http://host:7100/api/route/paths/{NAME}/lock“

Parameter introduction

name type Description example

name * ** path name AMB-01

The disabled state of the path, truewhen the path is


newValue * boolean
disabled

request example
PUT "http://localhost:7100/api/route/paths/LM1-LM2/lock?newValue=true"
response
Responses Code 200
example response
请求已成功

Responses Code 400


example response
[
"Param 'newValue' is missing."
]
Responses Code 404
example response
[
"Unknown path 'LM1 --- LM2'."
]

26. business layer interface


1. equipment
traffic control areas
Get information on all traffic control areas
ask
 Function: Get information of all traffic control areas
 method:GET
 Interface Description: /mutexZones/details

2. Location
Get all location information
ask
 Function: Get all location information
 method:GET
 Interface description: /store-site/_all . (root path is http://host:port/api )
GET "http://host:7100/api/store-site/_all

Parameter introduction
No parameters.
response
Responses Code 200
example response
[
{
"id": "LOC1", // 库位 ID 唯一值
"type": "PS", // 库位类型
"filled": false, // 占用状态,true 表示被占用
"content": "", // 库位上的货物信息
"locked": false, // 锁定状态,true 表示库位是被锁定的
"label": "Production line 1", // 库位的描述
"disabled": false, // 禁用状态,true 表示这个库位被禁用了,默认值为 false
"inputFailed": false, // SRD 和相关传感器的通信状态,true 表示 SRD 无法通过传感器获取库位状态。
"lockedBy": "" // 锁定当前库位的任务编号
},
{
"id": "LOC2",
"type": "PS",
"filled": false,
"content": "",
"locked": false,
"label": "Production line 2",
"disabled": false,
"inputFailed": false,
"lockedBy": ""
}
]
Parameter hint (TODO)

3. Signal Server Communication Protocol


Device Access Protocol
Field device response general data structure
class LocationDevice {
String name;
String lastAction; // last executed command, or None if none
ActionStatus lastActionStatus; ; // The execution status of the last command
Status status; // The state of the device itself

enum ActionStatus {
DONE,
EXECUTING,
FAILED
}

enum Status {
IDLE,
EXECUTING,
ERROR,
TIMEOUT
}
}

1Field device device access request


Get information about a device
GET /locationDevices/{NAME}?action=XXX
parameter:

name type Description

name string device name

action string Operation instructions can be customized

response:

Code message

200 request was successful

400 Parameter error

404 The requested object could not be found among the currently enabled devices

Content example:
{
"name" : "SIG01",
"lastAction" : "wait",
"lastActionStatus" : "DONE",
"status" : "IDLE"
}

Submit a command to the device


POST /locationDevices/{NAME}?action=XXX
parameter:
name type Description

name string device name

action string Operation instructions can be customized

response:

Code message

200 request was successful

400 Parameter error

404 The requested object could not be found among the currently enabled devices

500 The device server is faulty or abnormal

4. 2. An example of a device server providing a signal source


5. 2.1 Predefined

parameter describe

host Device server IP

actionThe name in this example , when the SRD queries the device server and the
wait response isActionStatus , it means that the waiting is over; when the returned is , it means that
it needs to continue waiting.DONEActionStatusEXECUTING

6. 2.2 The process of the robot waiting for the signal in the buffer position
1. When building a scene, the buffer bit is also a Location, and the Location needs to support
operation: Wait. The Location in the example below is temporarily named "L1".
2. In the device server, temporarily use "SIG01" to correspond to the corresponding signal at
"L1".
3. When the robot needs to wait in the buffer position, the business order (transportOrder) sent
by the host computer needs to include the following Destination
Destination:{
"locationName": "L1",
"operation": "Wait",
"properties":
[
{
"key": "device:requestAtSend",
"value": "SIG01:wait" // Inform the device server that the robot has entered the state of waiting for the signal
SIG01。
},
{
"key": "device:queryAtExecuted",
"value": "SIG01:wait" //Continuously query (interval about 1s) device server, signal SIG01 Whether it can be
released, that is, whether the robot can end the waiting 。
}
]
}
4. When the robot executes to the Destination, the scheduling server will send a request
POST "http://host:52000/devices/api/v1/locationDevices/SIG01?action=wait"
5. Then, the scheduling server will query the device server every about 1 second
GET "http://host:52000/devices/api/v1/locationDevices/SIG01?action=wait "
If the response body returned by the device server is
{
"name" : "SIG01",
"lastAction" : "wait",
"lastActionStatus" : "DONE",
"status" : "IDLE"
}
Then, the robot will think that it has received a confirmation signal and start to perform other
tasks. Otherwise, if " name", " " is inconsistent with the value in lastActionthe attribute " " , or " " is in a
state other than " ", the robot will continue to wait for the signal of the
device.device:queryLocationlastActionStatusDONE

You might also like