CmvrControlStation/protos/cmvr/api/arm_service.proto

78 lines
5.7 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto3";
package cmvr.api;
import "cmvr/api/common.proto";
import "cmvr/api/arm_command.proto";
// 机械臂控制服务。除特别说明外,所有接口通过请求头中的 device_id 选择机械臂。
service ArmService {
// 机械臂下电/去使能;不包含数值参数,无单位。
rpc torqueOff(CommandHeader.Request) returns (CommandHeader.Feedback);
// 机械臂上电并使能;不包含数值参数,无单位。
rpc torqueOn(CommandHeader.Request) returns (CommandHeader.Feedback);
// 清除机械臂可恢复故障;不包含数值参数,无单位。
rpc clearFault(CommandHeader.Request) returns (CommandHeader.Feedback);
// 执行关节空间点到点运动;目标角度单位为 rad。
rpc moveJPose(MoveJPose.Request) returns (MoveJPose.Response);
rpc moveJ(MoveJ.Request) returns (MoveJ.Response);
// 执行所选坐标系下的绝对TCP目标直线运动,位置m、姿态rad;不接受增量目标。
rpc moveL(MoveL.Request) returns (MoveL.Response);
// 查询可用基准坐标系名称;返回名称列表,无单位。
rpc ListBaseFrame(ListFrame.Request) returns (ListFrame.Response);
// 查询可用 TCP 坐标系名称;返回名称列表,无单位。
rpc ListTCPFrame(ListFrame.Request) returns (ListFrame.Response);
// 执行关节速度运动;角速度单位为 rad/s,加速度单位为 rad/s^2。
rpc speedJ(SpeedJ.Request) returns (SpeedJ.Response);
// 执行 TCP 速度运动;线速度单位为 m/s,角速度单位为 rad/s。
rpc speedL(SpeedL.Request) returns (SpeedL.Response);
// 下发单周期关节位置伺服目标;目标角度单位为 rad。
rpc servoJ(ServoJ.Request) returns (ServoJ.Response);
// 停止当前机械臂运动;不包含数值参数,无单位。
rpc stopMotion(CommandHeader.Request) returns (CommandHeader.Feedback);
// 查询机械臂 SDK 自动识别的型号、自由度、关节名及默认坐标系。
rpc GetArmInfo(GetArmInfo.Request) returns (GetArmInfo.Response);
// 读取关节状态;角度 rad、角速度 rad/s、力矩 N·m。
rpc getJointState(JointRequest) returns (JointResponse);
// 一次性读取完整机械臂运行状态、关节状态及 TCP 位姿。
rpc getRobotState(GetRobotState.Request) returns (GetRobotState.Response);
// 读取 TCP 位姿;位置单位为 m,姿态单位为 rad。
rpc getPose(GetPose.Request) returns (GetPose.Response);
// 对指定关节执行零位标定;关节名称无单位。
rpc calibrateZeroQ(CalibrateZeroQ.Request) returns (CalibrateZeroQ.Response);
// 查询两个坐标系之间的齐次变换矩阵;平移元素单位为 m。
rpc getPoseMatrix(GetPoseMatrix.Request) returns (GetPoseMatrix.Response);
// 根据关节角计算正运动学矩阵;输入角度 rad,输出平移元素 m。
rpc computeForwardKinematics(ComputeForwardKinematics.Request) returns (ComputeForwardKinematics.Response);
// 执行机械臂厂商扩展 JSON 命令;当前用于 AUBO 控制柜 Standard DI/DO。
rpc ExecuteJsonCommand(JsonDeviceCommand.Request) returns (JsonDeviceCommand.Feedback);
// 进入拖动示教模式;仅支持具备该能力的机械臂。
rpc EnterTeachingMode(CommandHeader.Request) returns (CommandHeader.Feedback);
// 开始记录实际关节轨迹到服务端 CSV。
rpc StartTrajectoryRecording(StartTrajectoryRecording.Request) returns (StartTrajectoryRecording.Response);
// 完成示教:停止轨迹记录并退出拖动示教模式。
rpc CompleteTeaching(CommandHeader.Request) returns (CommandHeader.Feedback);
// 单独停止轨迹记录,不退出拖动示教模式。
rpc StopTrajectoryRecording(CommandHeader.Request) returns (CommandHeader.Feedback);
// 单独退出拖动示教模式,不停止轨迹记录。
rpc ExitTeachingMode(CommandHeader.Request) returns (CommandHeader.Feedback);
// 查询 CSV 轨迹及当前录制状态,不启动采样或运动。
rpc ListRecordedTrajectories(ListRecordedTrajectories.Request) returns (ListRecordedTrajectories.Response);
// 按请求的速度、加速度、加加速度限值平滑运动到轨迹起点;必须退出示教且已使能。
rpc MoveToTrajectoryStart(ReplayRecordedTrajectory.Request) returns (ReplayRecordedTrajectory.Response);
// 同步回放;必须先到达起点,结束后返回。取消请求会停止运动。
rpc ReplayRecordedTrajectory(ReplayRecordedTrajectory.Request) returns (ReplayRecordedTrajectory.Response);
// 以下记录保存在服务端程序目录 data/user_coordinates/<device_id>/coordinates.json。
// Three-point SDK calibration only; no persistence, TCP write or movement.
rpc CalibrateUserCoordinateSystem(UserCoordinateSystemCommand.Request) returns (UserCoordinateSystemCommand.Response);
rpc CreateUserCoordinateSystem(UserCoordinateSystemCommand.Request) returns (UserCoordinateSystemCommand.Response);
rpc GetUserCoordinateSystem(UserCoordinateSystemCommand.Request) returns (UserCoordinateSystemCommand.Response);
rpc ListUserCoordinateSystems(UserCoordinateSystemCommand.Request) returns (UserCoordinateSystemCommand.Response);
rpc UpdateUserCoordinateSystem(UserCoordinateSystemCommand.Request) returns (UserCoordinateSystemCommand.Response);
rpc DeleteUserCoordinateSystem(UserCoordinateSystemCommand.Request) returns (UserCoordinateSystemCommand.Response);
// 实际调用 setWorkObjectData + setTcpOffset,并在服务端记住当前选择。
// MoveL 通过 SDK Math 将所选工件系目标转换至 Base;提交前中和原生 WorkObject,避免重复变换。
// 不运动、不写示教器命名配置库;SDK 工件系无完整回读,重连/服务重启后应重新应用。
rpc ApplyUserCoordinateSystem(UserCoordinateSystemCommand.Request) returns (UserCoordinateSystemCommand.Response);
}