2025-08-22 16:57:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
syntax = "proto3";
|
|
|
|
|
|
package cmvr.api;
|
|
|
|
|
|
import "cmvr/api/common.proto";
|
|
|
|
|
|
|
|
|
|
|
|
message JointCmd {
|
2025-09-25 16:01:01 +08:00
|
|
|
|
string joint_name = 1; // 关节名称
|
|
|
|
|
|
double rad = 2; // 弧度
|
|
|
|
|
|
double vel = 3; // 角速度,rad/s
|
2025-08-22 16:57:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-09-25 16:01:01 +08:00
|
|
|
|
message Pose3D{
|
|
|
|
|
|
double x = 1;
|
|
|
|
|
|
double y = 2;
|
|
|
|
|
|
double z = 3;
|
|
|
|
|
|
double rx = 4;
|
|
|
|
|
|
double ry = 5;
|
|
|
|
|
|
double rz = 6;
|
|
|
|
|
|
}
|
2025-08-22 16:57:29 +08:00
|
|
|
|
|
2025-09-25 16:01:01 +08:00
|
|
|
|
enum RobotCartesian{
|
|
|
|
|
|
X = 0;
|
|
|
|
|
|
Y = 1;
|
|
|
|
|
|
Z = 2;
|
|
|
|
|
|
RX = 3;
|
|
|
|
|
|
RY = 4;
|
|
|
|
|
|
RZ = 5;
|
|
|
|
|
|
} ;
|
|
|
|
|
|
enum RobotJointIndexDirection{
|
|
|
|
|
|
FORWARD = 0;
|
|
|
|
|
|
BACKWARD = 1;
|
|
|
|
|
|
X_POSITIVE = 2; // X轴正向
|
|
|
|
|
|
X_NEGATIVE = 3; // X轴负向
|
|
|
|
|
|
Y_POSITIVE = 4; // Y轴正向
|
|
|
|
|
|
Y_NEGATIVE = 5; // Y轴负向
|
|
|
|
|
|
Z_POSITIVE = 6; // Z轴正向
|
|
|
|
|
|
Z_NEGATIVE = 7; // Z轴负向
|
|
|
|
|
|
ROTATE_X = 8; // 绕X轴旋转
|
|
|
|
|
|
ROTATE_Y = 9; // 绕Y轴旋转
|
|
|
|
|
|
ROTATE_Z = 10; // 绕Z轴旋转
|
|
|
|
|
|
}
|
2025-08-22 16:57:29 +08:00
|
|
|
|
message MoveJ{
|
|
|
|
|
|
message Request{
|
|
|
|
|
|
CommandHeader.Request header = 1;
|
|
|
|
|
|
repeated JointCmd cmds = 2;
|
|
|
|
|
|
double vel = 3;
|
|
|
|
|
|
double acc = 4;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message Response{
|
|
|
|
|
|
CommandHeader.Feedback header= 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-09-25 16:01:01 +08:00
|
|
|
|
message MoveL{
|
|
|
|
|
|
|
|
|
|
|
|
message Request{
|
|
|
|
|
|
CommandHeader.Request header = 1;
|
|
|
|
|
|
string ee_link = 2; //连杆名称
|
|
|
|
|
|
Pose3D targetPose = 3;
|
|
|
|
|
|
double vel = 4;
|
|
|
|
|
|
double acc = 5;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message Response{
|
|
|
|
|
|
CommandHeader.Feedback header= 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message SpeedJ{
|
|
|
|
|
|
|
|
|
|
|
|
message Request{
|
|
|
|
|
|
CommandHeader.Request header = 1;
|
|
|
|
|
|
string joint_name = 2;
|
|
|
|
|
|
double vel = 3;
|
|
|
|
|
|
double acc = 4;
|
|
|
|
|
|
RobotJointIndexDirection dir = 5;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message Response{
|
|
|
|
|
|
CommandHeader.Feedback header= 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message SpeedL{
|
|
|
|
|
|
message Request{
|
|
|
|
|
|
CommandHeader.Request header = 1;
|
|
|
|
|
|
string ee_link = 2;
|
|
|
|
|
|
double vel = 3;
|
|
|
|
|
|
double acc = 4;
|
|
|
|
|
|
RobotJointIndexDirection dir = 5;
|
|
|
|
|
|
RobotCartesian cart = 6;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message Response{
|
|
|
|
|
|
CommandHeader.Feedback header= 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-22 16:57:29 +08:00
|
|
|
|
service HumanoidRobotService{
|
|
|
|
|
|
rpc torqueOff(CommandHeader.Request) returns (CommandHeader.Feedback);
|
|
|
|
|
|
rpc torqueOn(CommandHeader.Request) returns (CommandHeader.Feedback);
|
|
|
|
|
|
rpc moveJ(MoveJ.Request) returns (MoveJ.Response);
|
2025-09-25 16:01:01 +08:00
|
|
|
|
rpc moveL(MoveL.Request) returns (MoveL.Response);
|
|
|
|
|
|
rpc speedJ(SpeedJ.Request) returns (SpeedJ.Response);
|
|
|
|
|
|
rpc speedL(SpeedL.Request) returns (SpeedL.Response);
|
|
|
|
|
|
}
|