TRON 2 DOCS
产品文档/TRON 2/SDK · 外设与数字资产
TRON 2 · 使用与开发

外设 · Revo 2 灵巧手

适用条件见本页各节

4.4.1.2 响应:response_set_limx_2fclaw_cmd

{
  "accid": "DACH_TRON2A_001",
  "title": "response_set_limx_2fclaw_cmd",
  "timestamp": 1672373633989,
  "guid": "746d937cd8094f6a98c9577aaf213d98",
  "data": {
    "result": "success"  // success: 成功, fail_motor: 电机错误,
  }
}

4.4.1.3 消息推送:无

4.4.2 获取夹爪状态信息

4.4.2.1 请求:request_get_limx_2fclaw_state

{
  "accid": "DACH_TRON2A_001",
  "title": "request_get_limx_2fclaw_state",
  "timestamp": 1672373633989,
  "guid": "746d937cd8094f6a98c9577aaf213d98",
  "data": {
  }
}

4.4.2.2 响应:response_get_limx_2fclaw_state

返回夹爪状态信息

{
  "accid": "DACH_TRON2A_001",
  "title": "response_get_limx_2fclaw_state",
  "timestamp": 1672373633989,
  "guid": "746d937cd8094f6a98c9577aaf213d98",
  "data": {
      "timestamp": 1672373633989, // 表示数据时戳,单位为毫秒
      
      "left_opening": 50,  // 开口度,0-100,无量纲(0对应最小闭合,100对应张开到最大)
      "left_speed": 50,    // 夹爪速度,0~100 无量纲(数值越大速度越快)
      "left_force": 50,   //力,夹爪夹持力,0~100 无单位(数值越大力越大)
      
      "right_opening": 50,  // 开口度,0-100,无量纲(0对应最小闭合,100对应张开到最大)
      "right_speed": 50,    // 夹爪速度,0~100 无量纲(数值越大速度越快)
      "right_force": 50,   //力,夹爪夹持力,0~100 无单位(数值越大力越大)
      
      "result": "success"  // success: 成功, fail_motor: 电机错误
  }
}

4.4.2.3 消息推送:无

4.4 强脑 Revo 2 灵巧手(基础版)

4.4.1.1 灵巧手控制指令

4.4.1.1.1 请求:request_set_brainco2_hand_cmd
{
  "accid": "DACH_TRON2A_001",
  "title": "request_set_brainco2_hand_cmd",
  "timestamp": 1672373633989,
  "guid": "746d937cd8094f6a98c9577aaf213d98",
  "data": {
      // 左手:
      // 索引从0-5分别对应:拇指尖、拇指根、食指、中指、无名指、小指
      // left_mode: 控制模式
      //            0:退出控制
      //            1:位置时间模式, 必须指定 left_pos、left_time 的值
      //            2:位置速度模式, 必须指定 left_pos、left_vel 的值
      //           3:力控模式, 必须指定 left_current 的值
      // left_pos: 每个手指的目标位置, 单位为rad
      //           范围分别为0-1.0297、0-1.5707、0-1.4137、0-1.4137、0-1.4137、0-1.4137
      // left_vel: 每个手指的目标速度, 单位为rad/s
      //           范围分别为0-2.5367、0-2.6180、0-2.2689、0-2.2689、0-2.2689、0-2.2689
      // left_current: 每个手指的目标电流, 单位为mA, 范围为±1000mA
      // left_time: 每个手指的控制时间, 单位为ms, 范围为1-2000ms
      
      "left_mode": 1,
      "left_pos": [0.5, 0.5, 0.5, 0.5, 0.5, 0.5],
      "left_vel": [0.5, 0.5, 0.5, 0.5, 0.5, 0.5],
      "left_current": [500, 500, 500, 500, 500, 500],
      "left_time": [1000, 1000, 1000, 1000, 1000, 1000],
      
      // 右手:
      // 索引从0-5分别对应:拇指尖、拇指根、食指、中指、无名指、小指
      // right_mode: 控制模式
      //            0:退出控制
      //            1:位置时间模式, 必须指定 right_pos、right_time 的值
      //            2:位置速度模式, 必须指定 right_pos、right_vel 的值
      //            3:力控模式, 必须指定 right_current 的值
      // right_pos: 每个手指的目标位置, 单位为rad
      //           范围分别为0-1.0297、0-1.5707、0-1.4137、0-1.4137、0-1.4137、0-1.4137
      // right_vel: 每个手指的目标速度, 单位为rad/s
      //           范围分别为0-2.5367、0-2.6180、0-2.2689、0-2.2689、0-2.2689、0-2.2689
      // right_current: 每个手指的目标电流, 单位为mA, 范围为±1000mA
      // right_time: 每个手指的控制时间, 单位为ms, 范围为1-2000ms
      
      "right_mode": 1,
      "right_pos": [0.5, 0.5, 0.5, 0.5, 0.5, 0.5],
      "right_vel": [0.5, 0.5, 0.5, 0.5, 0.5, 0.5],
      "right_current": [500, 500, 500, 500, 500, 500],
      "right_time": [1000, 1000, 1000, 1000, 1000, 1000]
  }
}

4.4.1.1.2 响应:response_set_brainco2_hand_cmd

{
  "accid": "DACH_TRON2A_001",
  "title": "response_set_brainco2_hand_cmd",
  "timestamp": 1672373633989,
  "guid": "746d937cd8094f6a98c9577aaf213d98",
  "data": {
    "result": "success"  // success: 成功, fail_motor: 电机错误, fail_invalid_cmd: 非法指令
  }
}

4.4.1.1.3 控制示例


{
  "accid": "DACH_TRON2A_069",
  "title": "request_set_brainco2_hand_cmd",
  "timestamp": 1672373633989,
  "guid": "746d937cd8094f6a98c9577aaf213d98",
  "data": {
          "left_mode": 1,
      "left_pos": [0.5, 0.5, 0.5, 1, 0.5, 0.5],
      "left_vel": [0.5, 0.5, 0.5, 0.5, 0.5, 0.5],
      "left_current": [500, 500, 500, 500, 500, 500],
      "left_time": [1000, 1000, 1000, 1000, 1000, 1000],

      "right_mode": 1,
      "right_pos": [0.5, 0.5, 0.5, 0.5, 0.5, 0.5],
      "right_vel": [0.5, 0.5, 0.5, 0.5, 0.5, 0.5],
      "right_current": [500, 500, 500, 500, 500, 500],
      "right_time": [1000, 1000, 1000, 1000, 1000, 1000]
  }
}

4.4.1.2 获取灵巧手状态

4.4.1.2.1 请求:request_get_brainco2_hand_state

{
  "accid": "DACH_TRON2A_001",
  "title": "request_get_brainco2_hand_state",
  "timestamp": 1672373633989,
  "guid": "746d937cd8094f6a98c9577aaf213d98",
  "data": {
  }
}

4.4.0.2.2 响应:response_get_brainco2_hand_state

{
  "accid": "DACH_TRON2A_001",
  "title": "response_get_brainco2_hand_state",
  "timestamp": 1672373633989,
  "guid": "746d937cd8094f6a98c9577aaf213d98",
  "data": {
      "timestamp": 1672373633989,
      "left_mode": 1,
      "left_pos": [0.5, 0.5, 0.5, 0.5, 0.5, 0.5],
      "left_vel": [0.5, 0.5, 0.5, 0.5, 0.5, 0.5],
      "left_current": [500, 500, 500, 500, 500, 500],
      "left_time": [1000, 1000, 1000, 1000, 1000, 1000],
      "right_mode": 1,
      "right_pos": [0.5, 0.5, 0.5, 0.5, 0.5, 0.5],
      "right_vel": [0.5, 0.5, 0.5, 0.5, 0.5, 0.5],
      "right_current": [500, 500, 500, 500, 500, 500],
      "right_time": [1000, 1000, 1000, 1000, 1000, 1000]
  }
}
继续阅读数字资产 · URDF