API 说明 ============================ inovance 工控机主控支持的 API ++++++++++++++++++++++++++++++++++++++++++ +--------+-------------------------+----------+ | 指令号 | 命令 | 支持情况 | +========+=========================+==========+ | 100 | 获取机械臂程序版本号 | 支持 | +--------+-------------------------+----------+ | 101 | 发送速度数据 | 支持 | +--------+-------------------------+----------+ | 102 | 发送加速度数据 | 支持 | +--------+-------------------------+----------+ | 103 | 发送圆滑过渡参数 | 支持 | +--------+-------------------------+----------+ | 104 | 发送工具坐标系(TCP)参数 | 支持 | +--------+-------------------------+----------+ | 105 | 设置数字量输出 | 支持 | +--------+-------------------------+----------+ | 106 | SetJointsMovej | 支持 | +--------+-------------------------+----------+ | 107 | SetCartMovel | 支持 | +--------+-------------------------+----------+ | 108 | SetJoinsMovel | 支持 | +--------+-------------------------+----------+ | 109 | SetCartMovej | 支持 | +--------+-------------------------+----------+ | 110 | MovejSequence | 支持 | +--------+-------------------------+----------+ | 111 | MovelSequence | 支持 | +--------+-------------------------+----------+ | 112 | SetJointsMovejDo | 不支持 | +--------+-------------------------+----------+ | 113 | SetCartMovelDo | 不支持 | +--------+-------------------------+----------+ | 114 | SetJointsMovelDo | 不支持 | +--------+-------------------------+----------+ | 115 | SetJointsMovejGroupDo | 不支持 | +--------+-------------------------+----------+ | 116 | SetCartMovelGroupDo | 不支持 | +--------+-------------------------+----------+ | 117 | SetJointsMovelGroupDo | 不支持 | +--------+-------------------------+----------+ | 118 | MovelUntil | 支持 | +--------+-------------------------+----------+ | 119 | 获取数字量输入状态 | 支持 | +--------+-------------------------+----------+ | 120 | 获取数字量输出状态 | 支持 | +--------+-------------------------+----------+ | 121 | 获取模拟量输入口数值 | 不支持 | +--------+-------------------------+----------+ | 122 | 获取机械臂当前角度 | 支持 | +--------+-------------------------+----------+ | 123 | 获取机械臂当前位姿 | 支持 | +--------+-------------------------+----------+ | 200 | 机械臂后台发送状态 | 支持 | +--------+-------------------------+----------+ inovance 机械臂主控支持的 API +++++++++++++++++++++++++++++++++++ .. function:: xyzSwitchAPP(app_name, err_code) :noindex: 切换应用 :param app_name: 应用名称 :return: err_code 为 0表示成功 .. function:: xyzSwitchFlow(flow_name, err_code) :noindex: 切换工件 :param flow_name: 流图名称 :return: err_code 为 0表示成功 .. function:: xyzSwitchTool(tool_name, err_code) :noindex: 切换工具 :param tool_name: 工具名称 :return: err_code 为 0表示成功 .. function:: xyzReqCapImg(vision_service_id,err_code,cap_img_token) :noindex: 请求拍照 :param vision_service_id: 视觉服务 id :return: err_code 为 0表示成功 cap_img_token 返回的 token .. function:: xyzGetCapImg(cap_img_token, err_code) :noindex: 获取拍照结果 :param cap_img_token: 请求拍照时返回的 token :return: err_code 为 0表示成功 .. function:: xyzCapImg(vision_service_id, err_code) :noindex: 拍照 :param vision_service_id: 需要进行拍照操作的工作空间id :return: err_code 为 0表示成功 .. function:: xyzReqGraspPose(ws_id, err_code, grasp_pose_token) :noindex: 请求抓取位姿 :param ws_id: 需要获取抓取点位的工作空间id :return: err_code 为 0表示成功 grasp_pose_token: 返回的用于获取目标点位时使用的token .. function:: xyzGetGraspPose(grasp_pose_token, err_code, grasp_pose, grasp_pose_num, pipeline_num, register_num) :noindex: 获取抓取位姿 :param grasp_pose_token: 求抓取目标点位时返回的token :return: err_code 为 0表示成功 grasp_pose: 抓取位姿 grasp_pose_num: 可供抓取的点数量 pipeline_num: pipeline文件number register_num: 用到的注册文件的注册number .. function:: xyzReqObjPose(ws_id, err_code, obj_pose_token) :noindex: 请求物体位姿 :param ws_id: 需要获取物体位姿的工作空间id :return: err_code 为 0表示成功 obj_pose_token: 返回的用于物体位姿识别的token .. function:: xyzGetObjPose(obj_pose_token, err_code, obj_pose, obj_pose_num, obj_pose_type) :noindex: 获取物体位姿 :param obj_pose_token: 请求物体位姿时得到的token :return: err_code 为 0表示成功 obj_pose: 物体位姿 obj_pose_num: 物体数量 obj_pose_type: 当前返回的物体 pose 类型 .. function:: xyzResetTask(err_code) :noindex: 重置视觉 :param ws_id: 需要重置的任务id :return: err_code 为 0表示成功 .. function:: xyzSendCurrentJoints(err_code) :noindex: 发送机械臂当前角度:j1~j6: 机械臂当前的角度信息,如果机械臂轴数小于6轴,则需要对应位置补零,依旧发送六个数。 :return: err_code 为 0表示成功 .. function:: xyzSendCurrentCartPose(err_code) :noindex: 发送机械臂法兰当前位姿 :return: err_code 为 0表示成功 .. function:: xyzSendCurrentExtJoints() :noindex: 暂不支持。 发送机械臂当前扩展轴位置:j1~j6: 机械臂当前扩展轴的角度信息,如果扩展轴数不足6的,需要补零后发送六个数。 :return: err_code 为 0表示成功 .. function:: xyzReqPick() :noindex: 暂不支持。 请求pick动作规划 :return: err_code 为 0表示成功 .. function:: xyzReqPlace() :noindex: 暂不支持。 请求place动作规划 :return: err_code 为 0表示成功 .. function:: xyzReqPickPlace(ws_id,err_code) :noindex: 请求pick和place规划 :param ws_id: 需要抓取的工作空间id :return: err_code 为 0表示成功 .. function:: xyzGetPickin(ws_id,err_code,pipeline_num,register_num,num,wp_type,pos) :noindex: 获取取料入框轨迹 :param ws_id: 规划空间id,默认填 0 :return: err_code 为 0表示成功 pipeline_num pipeline文件number register_num 用到的注册文件的注册number num 轨迹点数 wp_type 姿态数组 pos 轨迹点数组 .. function:: xyzGetPickout(ws_id,err_code,pipeline_num,register_num,num,wp_type,pos) :noindex: 获取取料出框轨迹 :param ws_id: 规划空间id,默认填 0 :return: err_code 为 0表示成功 pipeline_num pipeline文件number register_num 用到的注册文件的注册number num 轨迹点数 wp_type 姿态数组 pos 轨迹点数组 .. function:: xyzGetPlacein(ws_id,err_code,pipeline_num,register_num,num,wp_type,pos) :noindex: 获取放料入框轨迹 :param ws_id: 规划空间id,默认填 0 :return: err_code 为 0表示成功 pipeline_num pipeline文件number register_num 用到的注册文件的注册number num 轨迹点数 wp_type 姿态数组 pos 轨迹点数组 .. function:: xyzGetPlaceout(ws_id,err_code,pipeline_num,register_num,num,wp_type,pos) :noindex: 获取放料出框轨迹 :param ws_id: 规划空间id,默认填 0 :return: err_code 为 0表示成功 pipeline_num pipeline文件number register_num 用到的注册文件的注册number num 轨迹点数 wp_type 姿态数组 pos 轨迹点数组 .. function:: xyzSwitchStrat(strategy_name, err_code) :noindex: 请求切换策略 :param strategy_name: 策略名称 :return: err_code 为 0表示成功 .. function:: xyzUpdateTotePose(err_code, tote_pose) :noindex: 料箱重定位 :return: err_code 为 0表示成功 tote_pose: 料箱位姿 .. function:: xyzUpdateObjPoseOnHand(err_code) :noindex: 工件在上手的二次定位 :return: err_code 为 0表示成功 .. function:: xyzUpdateObjPoseToHand(err_code, pipeline_num, register_num, num, wp_type, pos) :noindex: 工件不在手上的二次定位 :return: err_code 为 0表示成功 pipeline_num pipeline文件number register_num 用到的注册文件的注册number num 轨迹点数 wp_type 姿态数组 pos 轨迹点数组 .. function:: xyzGetObjPoseType(err_code, obj_pose_type) :noindex: 获取工件姿态类型 :return: err_code 为 0表示成功 obj_pose_type: 工件姿态类型 .. function:: xyzResetPalletStatus(err_code) :noindex: 重置工业码垛状态 :return: err_code 为 0表示成功 .. function:: xyzSwitchItem(ws_id, item_codename, err_code) :noindex: 切换工件 :param ws_id: 工作空间id :param item_codename: 工件名称 :return: err_code 为 0表示成功 .. function:: xyzCalculateGraspPose(ws_id,err_code, grasp_pose, grap_pose_num, pipeline_num, register_num) :noindex: 计算抓取位姿 :param ws_id: 工作空间id :return: err_code 为 0表示成功 grasp_pose 抓取位姿 grap_pose_num 可供抓取的点数量 pipeline_num pipeline文件number register_num 用到的注册文件的注册number .. function:: xyzCalculateObjPose(ws_id, err_code, obj_pose, obj_pose_num, obj_pose_type) :noindex: 计算物体位姿 :param ws_id: 工作空间id :return: err_code 为 0表示成功 obj_pose 物体位姿 obj_pose_num 物体数量 obj_pose_type 当前返回的物体 pose 类型