-
Notifications
You must be signed in to change notification settings - Fork 0
/
boat_state.proto
188 lines (159 loc) · 4.17 KB
/
boat_state.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
syntax = "proto3";
package boat_state;
enum NodeStatus {
NODE_STATUS_UNDEFINED=0;
NODE_STATUS_OK=1;
NODE_STATUS_ERROR=2;
NODE_STATUS_WARN=3;
}
enum NodeLifecycleState {
NODE_LIFECYCLE_STATE_UNCONFIGURED=0;
NODE_LIFECYCLE_STATE_CONFIGURING=1;
NODE_LIFECYCLE_STATE_INACTIVE=2;
NODE_LIFECYCLE_STATE_ACTIVATING=3;
NODE_LIFECYCLE_STATE_ACTIVE=4;
NODE_LIFECYCLE_STATE_DEACTIVATING=5;
NODE_LIFECYCLE_STATE_CLEANING_UP=6;
NODE_LIFECYCLE_STATE_SHUTTING_DOWN=7;
NODE_LIFECYCLE_STATE_FINALIZED=8;
NODE_LIFECYCLE_STATE_ERROR_PROCESSING=9;
NODE_LIFECYCLE_STATE_UNKNOWN=10;
}
message NodeInfo {
string name = 1;
NodeStatus status = 2;
NodeLifecycleState lifecycle_state = 3;
string info = 4;
}
enum AutonomousMode {
AUTONOMOUS_MODE_UNDEFINED=0;
AUTONOMOUS_MODE_NONE=1;
AUTONOMOUS_MODE_BALLAST=2;
AUTONOMOUS_MODE_RUDDER=3;
AUTONOMOUS_MODE_TRIMTAB=4;
AUTONOMOUS_MODE_FULL=5;
}
enum TrimState {
TRIM_STATE_MIN_LIFT = 0;
TRIM_STATE_MAX_DRAG_PORT = 1;
TRIM_STATE_MAX_DRAG_STARBOARD = 2;
TRIM_STATE_MAX_LIFT_PORT = 3;
TRIM_STATE_MAX_LIFT_STARBOARD = 4;
TRIM_STATE_MANUAL = 5;
}
message Point {
double latitude = 1;
double longitude = 2;
}
enum WaypointType {
WAYPOINT_TYPE_INTERSECT = 0;
WAYPOINT_TYPE_CIRCLE_RIGHT = 1;
WAYPOINT_TYPE_CIRCLE_LEFT = 2;
}
message Waypoint {
Point point = 1;
WaypointType type = 2;
}
message WaypointPath {
repeated Waypoint waypoints = 1;
}
message Path{
string latitude_direction = 1;
string longitude_direction = 2;
repeated Point points = 3;
}
message PathSegment {
Point start = 1;
Point end = 2;
}
message Wind {
float speed = 1;
float direction = 2;
}
message BoatState {
double latitude = 1;
string latitude_direction = 2;
double longitude = 3;
string longitude_direction = 4;
float current_heading = 5;
float magnetic_deviation = 6;
string magnetic_deviation_direction = 7;
float magnetic_variation = 8;
string magnetic_variation_direction = 9;
float track_degrees_true = 10;
float track_degrees_magnetic = 11;
float speed_knots = 12;
float speed_kmh = 13;
float rate_of_turn = 14;
float outside_temp = 15;
float atmospheric_pressure = 16;
Wind true_wind = 17;
Wind apparent_wind = 18;
float pitch = 19;
float roll = 20;
repeated NodeInfo node_states = 21;
AutonomousMode current_autonomous_mode = 22;
Path current_path = 23;
Path previous_positions = 24;
WaypointPath current_waypoints = 25;
Point current_target_point = 26;
TrimState current_trim_state = 27;
repeated Point buoy_positions = 28;
float rudder_position = 29;
float ballast_position = 30;
float trim_tab_position = 31;
bool has_current_path_segment = 32;
PathSegment current_path_segment = 33;
bool has_target_heading = 34;
float target_heading = 35;
bool has_target_track = 36;
float target_track = 37;
repeated string available_video_sources = 38;
bool reached_buoy = 39;
}
message BoatStateRequest {
}
service SendBoatStateService {
rpc SendBoatState (BoatStateRequest) returns (BoatState);
}
service StreamBoatStateService {
rpc StreamBoatState (BoatStateRequest) returns (stream BoatState) {}
}
message MapRequest {
string mapId = 1; // Map ID, unused for now
}
message MapResponse {
bytes image_data = 1;
float north = 2; // bounding box values
float south = 3;
float east = 4;
float west = 5;
}
message HSVBounds {
float lower_h = 1;
float lower_s = 2;
float lower_v = 3;
float upper_h = 4;
float upper_s = 5;
float upper_v = 6;
}
message BuoyTypeInfo {
string name = 1;
HSVBounds hsv_bounds = 2;
float buoy_diameter = 3;
}
message CVParameters {
float circularity_threshold = 1;
repeated BuoyTypeInfo buoy_types = 3;
}
message GetCVParametersRequest {
}
message GetCVParametersResponse {
optional CVParameters parameters = 1;
}
service GetMapService {
rpc GetMap (MapRequest) returns (MapResponse) {}
}
service GetCVParametersService {
rpc GetCVParameters (GetCVParametersRequest) returns (GetCVParametersResponse) {}
}