Open/close/stop the lite6 gripper.
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)
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);
}
});
}