-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmotor.proto
69 lines (61 loc) · 1.96 KB
/
motor.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
syntax = "proto3";
package lebai.motor;
import "google/protobuf/empty.proto";
// 电机运行模式
enum MotorMode {
// 位置环
POSITION = 0;
// 扭矩环
TORQUE = 1;
// 速度环
SPEED = 2;
}
// 伺服参数
message ServoParam {
double position_kp = 1 [json_name = "position_kp"];
double speed_kp = 2 [json_name = "speed_kp"];
double speed_it = 3 [json_name = "speed_it"];
double torque_cmd_filter = 4 [json_name = "torque_cmd_filter"];
}
message ServoParams {
repeated ServoParam params = 1;
}
message SetZeroRequest {
repeated double pose = 1;
repeated bool valids = 2;
}
message ExtraServoParam {
double acc_position_kp = 1 [json_name = "acc_position_kp"];
double acc_speed_kp = 2 [json_name = "acc_speed_kp"];
double acc_speed_it = 3 [json_name = "acc_speed_it"];
double uni_position_kp = 4 [json_name = "uni_position_kp"];
double uni_speed_kp = 5 [json_name = "uni_speed_kp"];
double uni_speed_it = 6 [json_name = "uni_speed_it"];
double dec_position_kp = 7 [json_name = "dec_position_kp"];
double dec_speed_kp = 8 [json_name = "dec_speed_kp"];
double dec_speed_it = 9 [json_name = "dec_speed_it"];
}
message SetExtraServoParamsRequest {
repeated ExtraServoParam params = 1;
repeated bool valids = 2;
}
message ResetExtraServoParamsRequest {
repeated bool valids = 1;
}
// 关节电机相关服务
service MotorService {
// 设置伺服参数
rpc SetServoParams(ServoParams) returns (google.protobuf.Empty);
// 获取伺服参数
rpc GetServoParams(google.protobuf.Empty) returns (ServoParams);
// 导轨找零
rpc FindZero(google.protobuf.Empty) returns (google.protobuf.Empty);
// 设置关节零位
rpc SetZero(SetZeroRequest) returns (google.protobuf.Empty);
// 设置所有extra伺服参数
rpc SetExtraServoParams(SetExtraServoParamsRequest)
returns (google.protobuf.Empty);
// 重置extra伺服参数
rpc ResetExtraServoParams(ResetExtraServoParamsRequest)
returns (google.protobuf.Empty);
}