Skip to content

7.14 Deployment Mode

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.

API Name pb:/aimdk.protocol.EmbodiedService/SwitchEmbodiedMode
Overview Enter or exit Silicon Delivery mode
API Type HTTP JSON RPC
URL http://192.168.100.110:52181/rpc/aimdk.protocol.EmbodiedService/SwitchEmbodiedMode
Request Parameters
{
    "header": {},
    "mode": "EmbodiedTaskMode_ShopAssistant",
}
  • mode: must be set to EmbodiedTaskMode_ShopAssistant
Response
{
  "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 Script examples/deployment_mode/SwitchEmbodiedMode.sh
Notes When 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.
API Name pb:/aimdk.protocol.EmbodiedService/StartTask
Overview Place an order
API Type HTTP JSON RPC
URL http://192.168.100.110:52181/rpc/aimdk.protocol.EmbodiedService/StartTask
Request Parameters
{
    "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
{
  "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 Script examples/deployment_mode/StartAndControl.py
Notes
API Name pb:/aimdk.protocol.EmbodiedService/Control
Overview Control an order
API Type HTTP JSON RPC
URL http://192.168.100.110:52181/rpc/pb:/aimdk.protocol.EmbodiedService/Control
Request Parameters
{
    "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
{
  "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 Script examples/deployment_mode/StartAndControl.py
Notes