2025-10-10 11:51:00 +08:00
|
|
|
|
syntax = "proto3";
|
2026-06-24 15:45:54 +08:00
|
|
|
|
|
2025-10-10 11:51:00 +08:00
|
|
|
|
package cmvr.api;
|
2026-06-24 15:45:54 +08:00
|
|
|
|
|
2025-10-10 11:51:00 +08:00
|
|
|
|
import "cmvr/api/common.proto";
|
2026-06-24 15:45:54 +08:00
|
|
|
|
import "cmvr/api/arm_command.proto";
|
2025-10-10 11:51:00 +08:00
|
|
|
|
|
2026-09-18 15:22:50 +08:00
|
|
|
|
// 机械臂控制服务。除特别说明外,所有接口通过请求头中的 device_id 选择机械臂。
|
2026-06-24 15:45:54 +08:00
|
|
|
|
service ArmService {
|
2026-09-18 15:22:50 +08:00
|
|
|
|
// 机械臂下电/去使能;不包含数值参数,无单位。
|
2025-10-10 11:51:00 +08:00
|
|
|
|
rpc torqueOff(CommandHeader.Request) returns (CommandHeader.Feedback);
|
2026-09-18 15:22:50 +08:00
|
|
|
|
// 机械臂上电并使能;不包含数值参数,无单位。
|
2025-10-10 11:51:00 +08:00
|
|
|
|
rpc torqueOn(CommandHeader.Request) returns (CommandHeader.Feedback);
|
2026-09-18 15:22:50 +08:00
|
|
|
|
// 清除机械臂可恢复故障;不包含数值参数,无单位。
|
2026-09-16 14:11:37 +08:00
|
|
|
|
rpc clearFault(CommandHeader.Request) returns (CommandHeader.Feedback);
|
2026-09-18 15:22:50 +08:00
|
|
|
|
// 执行关节空间点到点运动;目标角度单位为 rad。
|
2025-10-10 11:51:00 +08:00
|
|
|
|
rpc moveJ(MoveJ.Request) returns (MoveJ.Response);
|
2026-09-18 15:22:50 +08:00
|
|
|
|
// 执行 TCP 笛卡尔直线运动;位置单位为 m,姿态单位为 rad。
|
2025-10-10 11:51:00 +08:00
|
|
|
|
rpc moveL(MoveL.Request) returns (MoveL.Response);
|
2026-09-18 15:22:50 +08:00
|
|
|
|
// 查询可用基准坐标系名称;返回名称列表,无单位。
|
2026-09-16 14:11:37 +08:00
|
|
|
|
rpc ListBaseFrame(ListFrame.Request) returns (ListFrame.Response);
|
2026-09-18 15:22:50 +08:00
|
|
|
|
// 查询可用 TCP 坐标系名称;返回名称列表,无单位。
|
2026-09-16 14:11:37 +08:00
|
|
|
|
rpc ListTCPFrame(ListFrame.Request) returns (ListFrame.Response);
|
2026-09-18 15:22:50 +08:00
|
|
|
|
// 执行关节速度运动;角速度单位为 rad/s,加速度单位为 rad/s^2。
|
2025-10-10 11:51:00 +08:00
|
|
|
|
rpc speedJ(SpeedJ.Request) returns (SpeedJ.Response);
|
2026-09-18 15:22:50 +08:00
|
|
|
|
// 执行 TCP 速度运动;线速度单位为 m/s,角速度单位为 rad/s。
|
2025-10-10 11:51:00 +08:00
|
|
|
|
rpc speedL(SpeedL.Request) returns (SpeedL.Response);
|
2026-09-18 15:22:50 +08:00
|
|
|
|
// 下发单周期关节位置伺服目标;目标角度单位为 rad。
|
2026-06-24 15:45:54 +08:00
|
|
|
|
rpc servoJ(ServoJ.Request) returns (ServoJ.Response);
|
2026-09-18 15:22:50 +08:00
|
|
|
|
// 停止当前机械臂运动;不包含数值参数,无单位。
|
2026-06-24 15:45:54 +08:00
|
|
|
|
rpc stopMotion(CommandHeader.Request) returns (CommandHeader.Feedback);
|
2026-09-18 15:22:50 +08:00
|
|
|
|
// 读取关节状态;角度 rad、角速度 rad/s、力矩 N·m。
|
2025-10-10 11:51:00 +08:00
|
|
|
|
rpc getJointState(JointRequest) returns (JointResponse);
|
2026-09-18 15:22:50 +08:00
|
|
|
|
// 读取 TCP 位姿;位置单位为 m,姿态单位为 rad。
|
2025-11-03 11:44:52 +08:00
|
|
|
|
rpc getPose(GetPose.Request) returns (GetPose.Response);
|
2026-09-18 15:22:50 +08:00
|
|
|
|
// 对指定关节执行零位标定;关节名称无单位。
|
2026-02-25 09:55:53 +08:00
|
|
|
|
rpc calibrateZeroQ(CalibrateZeroQ.Request) returns (CalibrateZeroQ.Response);
|
2026-09-18 15:22:50 +08:00
|
|
|
|
// 查询两个坐标系之间的齐次变换矩阵;平移元素单位为 m。
|
2026-03-17 09:11:29 +08:00
|
|
|
|
rpc getPoseMatrix(GetPoseMatrix.Request) returns (GetPoseMatrix.Response);
|
2026-09-18 15:22:50 +08:00
|
|
|
|
// 根据关节角计算正运动学矩阵;输入角度 rad,输出平移元素 m。
|
2026-03-17 09:11:29 +08:00
|
|
|
|
rpc computeForwardKinematics(ComputeForwardKinematics.Request) returns (ComputeForwardKinematics.Response);
|
2026-09-18 15:22:50 +08:00
|
|
|
|
// 读取控制柜 Standard DI;通道索引从 0 开始,电平为布尔值。
|
|
|
|
|
|
rpc getCabinetDigitalInput(CabinetDigitalInput.Request) returns (CabinetDigitalInput.Response);
|
|
|
|
|
|
// 读取控制柜 Standard DO 及其控制器运行状态;通道索引从 0 开始。
|
|
|
|
|
|
rpc getCabinetDigitalOutput(CabinetDigitalOutput.Request) returns (CabinetDigitalOutput.Response);
|
|
|
|
|
|
// 设置控制柜 Standard DO;仅允许写入未被控制器运行状态管理的通道。
|
|
|
|
|
|
rpc setCabinetDigitalOutput(SetCabinetDigitalOutput.Request) returns (SetCabinetDigitalOutput.Response);
|
2025-10-10 11:51:00 +08:00
|
|
|
|
}
|