-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsafety.proto
74 lines (69 loc) · 2.29 KB
/
safety.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
syntax = "proto3";
package lebai.safety;
import "google/protobuf/empty.proto";
// 碰撞监测误差
message CollisionTorqueDiff {
repeated double diffs = 1;
}
// 碰撞后执行操作
enum CollisionDetectorAction {
// 碰撞后急停
ESTOP = 0;
// 碰撞后暂停
PAUSE = 1;
// 碰撞后停止运动
STOP_MOVE = 2;
// 关闭碰撞监测
NONE = 99;
}
message CollisionDetector {
// 碰撞后执行操作
CollisionDetectorAction action = 1;
// action为PAUSE时生效,暂停时间(s)
uint32 pause_time = 2 [json_name = "pause_time"];
// 灵敏度[0~100]
uint32 sensitivity = 3;
}
message JointLimit {
double min_position = 1 [json_name = "min_position"];
double max_position = 2 [json_name = "max_position"];
double max_a = 3 [json_name = "max_a"];
double max_v = 4 [json_name = "max_v"];
}
message JointsLimit {
repeated JointLimit joints = 1;
}
message CartesianLimit {
double max_a = 1 [json_name = "max_a"];
double max_v = 2 [json_name = "max_v"];
double eq_radius = 3 [json_name = "eq_radius"];
}
// 操作安全相关服务
service SafetyService {
// 使能碰撞检测
rpc EnableCollisionDetector(google.protobuf.Empty) returns (google.protobuf.Empty);
// 临时禁用碰撞检测
rpc DisableCollisionDetector(google.protobuf.Empty) returns (google.protobuf.Empty);
// 设置碰撞监测误差
rpc SetCollisionTorqueDiff(CollisionTorqueDiff)
returns (google.protobuf.Empty);
// 读取碰撞监测误差
rpc GetCollisionTorqueDiff(google.protobuf.Empty)
returns (CollisionTorqueDiff);
// 设置碰撞监测
rpc SetCollisionDetector(CollisionDetector) returns (google.protobuf.Empty);
// 读取碰撞监测
rpc GetCollisionDetector(google.protobuf.Empty) returns (CollisionDetector);
// 使能限位检测
rpc EnableLimit(google.protobuf.Empty) returns (google.protobuf.Empty);
// 临时禁用限位检测
rpc DisableLimit(google.protobuf.Empty) returns (google.protobuf.Empty);
// 设置关节限位
rpc SetJointsLimit(JointsLimit) returns (google.protobuf.Empty);
// 读取关节限位
rpc GetJointsLimit(google.protobuf.Empty) returns (JointsLimit);
// 设置空间限位
rpc SetCartLimit(CartesianLimit) returns (google.protobuf.Empty);
// 读取空间限位
rpc GetCartLimit(google.protobuf.Empty) returns (CartesianLimit);
}