xarm_set_lite6_gripper

1. Introduction

Open/close/stop the lite6 gripper.

Button:[Live Control] - [End Effector]- open/ close/ stop

2. Request & Response

{
    "cmd": "xarm_set_lite6_gripper",
    "data": {
        "op": "open"
    },
    "id": "1"
}

3. Code Example

background

op = data.get('op')
if op == 'open':
    code = GLOBAL.XArm.xarm.open_lite6_gripper()
    response(client, cmd_id, code)
elif op == 'close':
    code = GLOBAL.XArm.xarm.close_lite6_gripper()
    response(client, cmd_id, code)
elif op == 'stop':
    code = GLOBAL.XArm.xarm.stop_lite6_gripper()
    response(client, cmd_id, code)

front_end

type ofself.setLite6Gripper = (op, callback) => {
  // control lite6 gripper
  const params = window.GlobalConstant.INIT_CMD_PARAMS_COMMON_DATA();
  Object.assign(params.data, {
    op: typeof op === 'function' ? op.name : op,
  });
  self.sendCmd(window.GlobalConstant.XARM_SET_LITE6_GRIPPER, params, (dict) => {
    if (callback) {
      callback(dict);
    }
  });
}

Last updated