-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkinematic.proto
89 lines (78 loc) · 2.8 KB
/
kinematic.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
syntax = "proto3";
package lebai.kinematic;
import "google/protobuf/empty.proto";
import "lebai.proto";
import "db.proto";
import "posture.proto";
// 关节DH参数
message DhParam {
double a = 1;
double alpha = 2;
double d = 3;
double theta = 4;
}
message DhParams {
repeated DhParam params = 1;
}
// 运动因子
message KinFactor {
// 速度因子(0~100)
int32 speed_factor = 1 [json_name = "speed_factor"];
}
// 运动数据
message KinData {
repeated double actual_joint_pose = 1 [json_name = "actual_joint_pose"];
repeated double actual_joint_speed = 2 [json_name = "actual_joint_speed"];
repeated double actual_joint_acc = 3 [json_name = "actual_joint_acc"];
repeated double actual_joint_torque = 4 [json_name = "actual_joint_torque"];
repeated double target_joint_pose = 11 [json_name = "target_joint_pose"];
repeated double target_joint_speed = 12 [json_name = "target_joint_speed"];
repeated double target_joint_acc = 13 [json_name = "target_joint_acc"];
repeated double target_joint_torque = 14 [json_name = "target_joint_torque"];
posture.CartesianPose actual_tcp_pose = 21 [json_name = "actual_tcp_pose"];
posture.CartesianPose target_tcp_pose = 31 [json_name = "target_tcp_pose"];
posture.CartesianPose actual_flange_pose = 41
[json_name = "actual_flange_pose"];
}
message SaveTcpRequest {
string name = 1;
posture.CartesianPose data = 2;
string dir = 11;
}
message CalcFrameRequest {
posture.CartesianPose o = 1;
posture.CartesianPose x = 2;
posture.CartesianPose xy = 3;
}
message CalcTcpRequest {
repeated posture.CartesianPose poses = 1;
}
// 运动学相关服务
service KinematicService {
// 保存/修改/删除工具中心点
rpc SaveTcp(SaveTcpRequest) returns (google.protobuf.Empty);
// 查询工具中心点
rpc LoadTcp(db.LoadRequest) returns (posture.CartesianPose);
// 查询工具中心点列表
rpc LoadTcpList(db.LoadListRequest) returns (db.LoadListResponse);
// 设置DH参数
rpc SetDh(DhParams) returns (google.protobuf.Empty);
// 获取DH参数
rpc GetDh(google.protobuf.Empty) returns (DhParams);
// 设置运动因子
rpc SetKinFactor(KinFactor) returns (google.protobuf.Empty);
// 获取运动因子
rpc GetKinFactor(google.protobuf.Empty) returns (KinFactor);
// 获取运动数据
rpc GetKinData(google.protobuf.Empty) returns (KinData);
// 订阅运动数据
rpc SubKinData(SubscribeRequest) returns (stream KinData);
// 三点采样计算原点特征
rpc CalcFrame(CalcFrameRequest) returns (posture.CartesianPose);
// 三点采样计算工具中心点
rpc CalcTcp(CalcTcpRequest) returns (posture.CartesianPose);
// 设置工具中心点
rpc SetTcp(posture.CartesianPose) returns (google.protobuf.Empty);
// 获取工具中心点
rpc GetTcp(google.protobuf.Empty) returns (posture.CartesianPose);
}