xarm_move_step_over
Last updated
To stop the arm immediately.
{
"cmd": "xarm_move_step_over",
"id":"1"
}
/
code=0->success;
code!=0->Failed, refer to xarm_api_code;
if direction == 'position-x-increase' or direction == 'position-x-decrease':
self._xarm_sync_tcp(0)
x = GLOBAL.XArm.xarm_position_step if direction == 'position-x-increase' else -GLOBAL.XArm.xarm_position_step
if isMoveTool:
code = GLOBAL.XArm.xarm.set_tool_position(x=x, speed=tcp_speed)
else:
code = GLOBAL.XArm.xarm.set_position(x=x, relative=True, speed=tcp_speed)
moveStep(direction, isLoop) {
window.CommandsRobotSocket.moveStep({ 'direction': direction, 'isLoop': isLoop, 'isMoveTool': this.isToolCoord });
},
moveStep = (data, callback) => {
const params = window.GlobalConstant.INIT_CMD_PARAMS_COMMON_DATA();
Object.assign(params.data, data);
Object.assign(params.data, {
mode: self.model.robot.state.info.xarm_mode,
});
self.sendCmd(window.GlobalConstant.MOVE_STEP_START, params, (dict) => {
if (callback) {
callback(dict);
}
});
}
Last updated