Robot Task Event Callback
Overview
- You need to provide a callback URL registered with Orion to receive timely notifications of changes in the execution status of your robot tasks when the task status changes.
- Robot task execution status callbacks depend on the robot's task execution status reporting. If the Orion server cannot receive reports from the robot side (such as due to poor network connectivity), callbacks cannot be completed.
- Due to the asynchronous and parallel nature of callbacks, and factors such as the response time of your callback URL, Orion cannot guarantee the timing of callbacks.
Callback URL Requirements
- The callback URL can be an HTTP or HTTPS address, but HTTPS is recommended.
- The callback URL must support POST requests, as we will use the POST method for requests.
- The callback URL can carry parameters, but the concatenated parameters must not exceed 1KB in length.
Callback Timing
- The callback will occur immediately when an event (i.e., event_type) is triggered for a task.
- Different tasks have different event callbacks, please refer to the Task and Event List.
Callback Request
Callback Request Protocol
Callback Request Method | POST |
---|---|
Callback Request Content-Type | Your callback URL needs to support the following 2 Content-Types simultaneously
|
Callback Timeout | 5 seconds, if the response time exceeds 5 seconds, the callback will be abandoned and not retried. |
Callback Request Body Parameters
Parameter | Type | Description |
---|---|---|
open_appid | string | App ID of the authorized account. |
open_code | string | Callback authentication code issued by Orion, used for the recipient to identify our legitimate request after receiving the callback request, rather than an unauthorized request from outside Orion. The length of the authentication code is 32 bytes. The authentication code must not be disclosed to third parties. |
robot_sn | string | Robot SN |
ov_corpid | string | Enterprise ID. |
task_id | string | Unique ID of the task. |
task_type | string | Type of task, please refer to the Task and Event List. |
event_type | string | Type of task event, different task types have different event types, please refer to the Task and Event List. |
task_data | jsonString | Additional data of the task, in JSON object string format, may be an empty string, for example: {"pos_name":"Table A01"}. Different task types have different additional data, please refer to the Task and Event List. |
event_data | jsonString | Additional data of the task event, in JSON object string format, may be an empty string, for example: {"pos_name":"Table A01"}. Different event types of different task types have different additional data, please refer to the Task and Event List. |
Callback Request cURL Example
curl --location 'https://your_domain.com/your_callback_url' \ --form 'open_appid=test_appid' \ --form 'open_code=b317979b11292276e0a1b49a08953dec' \ --form 'robot_sn=test_sn' \ --form 'ov_corpid=test_ov_corpid' \ --form 'task_id=85b35e3b5fc452a0f7a6d2a60d9edb9b' \ --form 'task_type=meals_deliver_task-deliver' \ --form 'event_type=te_arrived' \ --form 'task_data={"pos_name":"Table A01"}' \ --form 'event_data={"pos_name":"Table A01"}'
Callback Response
Callback Response HTTP Status Code | 200 |
---|
Task and Event List
Task Types (task_type)
Task Type | Description |
---|---|
meals_deliver_task-deliver | Meal delivery to table task. Delivering one meal to one table is considered as one meal delivery to table task. |
meals_deliver_task-return | Return journey task for meal delivery. The return journey task after completing a meal delivery to table task is considered as one meal delivery return journey task. |
Task Event Types (event_type)
Task Type | Task Name | Task Event Type | Event Description |
---|---|---|---|
meals_deliver_task-deliver | Meal delivery to table task | te__start | Execution starts. Please note that this event_type contains two underscores _. |
te_arrived | Arrived at destination. Please note that this event_type contains only one underscore _. | ||
meals_deliver_task-return | Return journey task | te__start | Execution starts. Please note that this event_type contains two underscores _. |
te__end | Execution ends. Please note that this event_type contains two underscores _. |
Task Additional Data (task_data)
Additional data (task_data) for different task event types (event_type) under each task type (task_type)
Task Type | Task Event Type | Task Additional Data (task_data) |
---|---|---|
meals_deliver_task-deliver | te__start | None |
te_arrived | { "pos_name" : "Table A01" // Destination point name } |
|
meals_deliver_task-return | te__start | { "pos_name" : "Table A01" // Destination point name } |
te_arrived | Same as above |
Task Event Additional Data (event_data)
Additional data (event_data) for different task event types (event_type) under each task type (task_type)
Task Type | Task Event Type | Task Event Additional Data (event_data) |
---|---|---|
meals_deliver_task-deliver | te__start | None |
te_arrived | { "pos_name" : "Table A01" // Destination point name } |
|
meals_deliver_task-return | te__start | None |
te_arrived |