cmvr-es/protos/cmvr/api/humanoid_robot.proto
2025-10-09 16:31:21 +08:00

54 lines
1.2 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";
message JointCmd {
string joint_name = 1; // 关节名称
double rad = 2; // 弧度
double vel = 3; // 角速度rad/s
}
message MoveJ{
message Request{
CommandHeader.Request header = 1;
repeated JointCmd cmds = 2;
double vel = 3;
double acc = 4;
}
message Response{
CommandHeader.Feedback header= 1;
}
}
// 关节状态消息
message JointState {
repeated string name = 1; // 关节名称
repeated double position = 2; // 关节位置
repeated double velocity = 3; // 可选:关节速度
repeated double effort = 4; // 可选:关节力矩
double timestamp = 5; // 可选:时间戳
}
// 返回消息
message JointResponse {
CommandHeader.Feedback header= 1;
repeated JointState state = 2;
}
// 请求消息(可选)
message JointRequest {
CommandHeader.Request header = 1;
}
service HumanoidRobotService{
rpc torqueOff(CommandHeader.Request) returns (CommandHeader.Feedback);
rpc torqueOn(CommandHeader.Request) returns (CommandHeader.Feedback);
rpc moveJ(MoveJ.Request) returns (MoveJ.Response);
rpc getJointState(JointRequest) returns (JointResponse);
}