7.14 Deployment Mode

7.14.1 Overview

A2 deployment mode currently includes features such as Silicon Delivery and brush calligraphy. At present, only APIs related to Silicon Delivery are available to help users apply deployment mode features in different scenarios.

7.14.2 Enter/Exit Silicon Delivery Mode

API Namepb:/aimdk.protocol.EmbodiedService/SwitchEmbodiedMode
OverviewEnter or exit Silicon Delivery mode
API Type HTTP JSON RPC
URLhttp://192.168.100.110:52181/rpc/aimdk.protocol.EmbodiedService/SwitchEmbodiedMode
Request Parameters
text
{
    "header": {},
    "mode": "EmbodiedTaskMode_ShopAssistant",
}
  • mode: must be set to EmbodiedTaskMode_ShopAssistant
Response
text
{
  "header": {
    "code": "0",
    "msg": "",
    "timestamp": {
      "seconds": "0",
      "nanos": 0,
      "ms_since_epoch": "1771990841418"
    },
    "task_id": "12345678",
    "type": "EmbodiedResType_Success ",
    "msg": "",
  }
}
  • task_id: task ID for this request
  • type: whether the API call succeeds. EmbodiedResType_Success indicates success, and EmbodiedResType_Failure indicates failure
Example Scriptexamples/deployment_mode/SwitchEmbodiedMode.sh
NotesWhen entering Silicon Delivery mode directly through the API, you need to manually disable `motion_player` (`examples/motion_player/disable_motion_player.sh`), otherwise motion errors may occur.

7.14.3 Place a Silicon Delivery Order

API Namepb:/aimdk.protocol.EmbodiedService/StartTask
OverviewPlace an order
API Type HTTP JSON RPC
URLhttp://192.168.100.110:52181/rpc/aimdk.protocol.EmbodiedService/StartTask
Request Parameters
text
{
    "header": {},
    "task_description": "",
    "task_params": {"bottle", "sku_snack", "delivery_give3", "NAME:SweetOrange"}
    "loop_num": 1
}
  • task_description: task description
  • task_params: four parameters in order: object-grasping prompt, grasping waypoint name, delivery waypoint name (you can obtain waypoint names through the RPC API for retrieving map topology data), and recipient name during delivery (format: `NAME:xx`). Common prompts include `toy`, `bottle`, `fruit`, `can`, `cube`, and `bread`
  • loop_num: number of loops, which can be understood as the number of orders placed
Response
text
{
  "header": {
    "code": "0",
    "msg": "",
    "timestamp": {
      "seconds": "0",
      "nanos": 0,
      "ms_since_epoch": "1771990841418"
    },
    "task_id": 12345678,
    "type": "EmbodiedResType_Success ",
    "msg": "",
  }
}
  • task_id: task ID for this request
  • type: whether the API call succeeds. EmbodiedResType_Success indicates success, and EmbodiedResType_Failure indicates failure
Example Scriptexamples/deployment_mode/StartAndControl.py
Notes

7.14.4 Control a Silicon Delivery Order

API Namepb:/aimdk.protocol.EmbodiedService/Control
OverviewControl an order
API Type HTTP JSON RPC
URLhttp://192.168.100.110:52181/rpc/pb:/aimdk.protocol.EmbodiedService/Control
Request Parameters
text
{
    "header": {},
    "task_id": 12345678,
    "type": {"bottle", "sku_snack", "delivery_give3", "NAME:SweetOrange"}
}
  • task_id: ID of the order to control
  • type: controls the current order state.
EmbodiedControlType_Pause Pause
EmbodiedControlType_Resume Resume
EmbodiedControlType_Cancel Cancel
Response
text
{
  "header": {
    "code": "0",
    "msg": "",
    "timestamp": {
      "seconds": "0",
      "nanos": 0,
      "ms_since_epoch": "1771990841418"
    },
    "task_id": "12345678",
    "type": "EmbodiedResType_Success ",
    "msg": "",
  }
}
  • task_id: task ID for this request
  • type: whether the API call succeeds. EmbodiedResType_Success indicates success, and EmbodiedResType_Failure indicates failure
Example Scriptexamples/deployment_mode/StartAndControl.py
Notes