-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdrive.proto
89 lines (66 loc) · 1.99 KB
/
drive.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
// Version: 1.2
syntax = "proto3";
import "status.proto";
import "utils.proto";
import "version.proto";
enum ProtoColor {
PROTO_COLOR_UNDEFINED = 0;
RED = 1;
GREEN = 2;
BLUE = 3;
UNLIT = 4;
}
message DriveCommand {
// The max speed, as a percentage of the rover's possible speed.
float throttle = 1;
// Speed of the left wheels, as a percentage of [throttle].
float left = 2;
// Speed of the right wheels, as a percentage of [throttle].
float right = 3;
// Indicates that [left] = 0 is valid, even though 0 usually means no value.
bool set_left = 4;
// Indicates that [right] = 0 is valid, even though 0 usually means no value.
bool set_right = 5;
// Indicates that [throttle] = 0 is valid, even though 0 usually means no value.
bool set_throttle = 6;
float front_swivel = 7;
float front_tilt = 8;
float rear_swivel = 9;
float rear_tilt = 10;
RoverStatus status = 11;
Version version = 12;
ProtoColor color = 13;
BoolState blink = 14;
}
message DriveData {
// The max speed, as a percentage of the rover's possible speed.
float throttle = 1;
// Speed of the left wheels, as a percentage of [throttle].
float left = 2;
// Speed of the right wheels, as a percentage of [throttle].
float right = 3;
// Indicates that [left] = 0 is valid, even though 0 usually means no value.
bool set_left = 4;
// Indicates that [right] = 0 is valid, even though 0 usually means no value.
bool set_right = 5;
// Indicates that [throttle] = 0 is valid, even though 0 usually means no value.
bool set_throttle = 6;
float front_swivel = 7;
float front_tilt = 8;
float rear_swivel = 9;
float rear_tilt = 10;
// Vitals for the whole rover
float battery_voltage = 11;
float battery_current = 12;
float battery_temperature = 13;
Version version = 14;
// Information about each wheel in rpm
float back_left = 15;
float middle_left = 16;
float front_left = 17;
float back_right = 18;
float middle_right = 19;
float front_right = 20;
ProtoColor color = 21;
RoverStatus status = 22;
}