JaiaBot  1.12.1
JaiaBot micro-AUV software
mission.proto
Go to the documentation of this file.
1 syntax = "proto2";
2 
3 import "jaiabot/messages/geographic_coordinate.proto";
4 import "dccl/option_extensions.proto";
5 import "goby/middleware/protobuf/gpsd.proto";
6 
7 package jaiabot.protobuf;
8 
9 enum MissionState
10 {
11  PRE_DEPLOYMENT__STARTING_UP = 0;
12  PRE_DEPLOYMENT__IDLE = 1;
13  PRE_DEPLOYMENT__SELF_TEST = 2;
14  PRE_DEPLOYMENT__FAILED = 3;
15  PRE_DEPLOYMENT__WAIT_FOR_MISSION_PLAN = 4;
16  PRE_DEPLOYMENT__READY = 5;
17 
18  IN_MISSION__UNDERWAY__REPLAN = 100;
19 
20  IN_MISSION__UNDERWAY__MOVEMENT__TRANSIT = 110;
21  IN_MISSION__UNDERWAY__MOVEMENT__REMOTE_CONTROL__SETPOINT = 112;
22  IN_MISSION__UNDERWAY__MOVEMENT__REMOTE_CONTROL__STATION_KEEP = 113;
23  IN_MISSION__UNDERWAY__MOVEMENT__REMOTE_CONTROL__SURFACE_DRIFT = 114;
24 
25  IN_MISSION__UNDERWAY__TASK__STATION_KEEP = 120;
26  IN_MISSION__UNDERWAY__TASK__SURFACE_DRIFT = 121;
27  IN_MISSION__UNDERWAY__TASK__DIVE__DIVE_PREP = 123;
28  IN_MISSION__UNDERWAY__TASK__DIVE__POWERED_DESCENT = 124;
29  IN_MISSION__UNDERWAY__TASK__DIVE__HOLD = 125;
30  IN_MISSION__UNDERWAY__TASK__DIVE__UNPOWERED_ASCENT = 126;
31  IN_MISSION__UNDERWAY__TASK__DIVE__POWERED_ASCENT = 127;
32  IN_MISSION__UNDERWAY__TASK__DIVE__REACQUIRE_GPS = 128;
33  IN_MISSION__UNDERWAY__TASK__DIVE__SURFACE_DRIFT = 129;
34  IN_MISSION__UNDERWAY__TASK__DIVE__CONSTANT_HEADING = 130;
35  IN_MISSION__UNDERWAY__TASK__CONSTANT_HEADING = 131;
36 
37  IN_MISSION__UNDERWAY__RECOVERY__TRANSIT = 140;
38  IN_MISSION__UNDERWAY__RECOVERY__STATION_KEEP = 141;
39  IN_MISSION__UNDERWAY__RECOVERY__STOPPED = 142;
40 
41  IN_MISSION__UNDERWAY__ABORT = 150;
42 
43  IN_MISSION__PAUSE__IMU_RESTART = 160;
44  IN_MISSION__PAUSE__REACQUIRE_GPS = 161;
45  IN_MISSION__PAUSE__MANUAL = 162;
46  IN_MISSION__PAUSE__RESOLVE_NO_FORWARD_PROGRESS = 163;
47 
48  POST_DEPLOYMENT__RECOVERED = 200;
49  POST_DEPLOYMENT__DATA_OFFLOAD = 202;
50  POST_DEPLOYMENT__IDLE = 203;
51  POST_DEPLOYMENT__SHUTTING_DOWN = 204;
52  POST_DEPLOYMENT__FAILED = 205;
53 }
54 
55 message Speeds
56 {
57  option (dccl.msg) = {
58  unit_system: "si"
59  };
60 
61  optional double transit = 1 [
62  default = 2,
63  (dccl.field) = {
64  min: 0.1,
65  max: 3.0,
66  precision: 1,
67  units { base_dimensions: "LT^-1" }
68  }
69  ];
70  optional double stationkeep_outer = 2 [
71  default = 0.5,
72  (dccl.field) = {
73  min: 0.1,
74  max: 3.0,
75  precision: 1,
76  units { base_dimensions: "LT^-1" }
77  }
78  ];
79 }
80 
81 message BottomDepthSafetyParams
82 {
83  option (dccl.msg) = {
84  unit_system: "si"
85  };
86 
87  required double constant_heading = 1 [
88  default = 0,
89  (dccl.field) = {
90  min: 0
91  max: 360
92  precision: 0
93  units { derived_dimensions: "plane_angle" system: "angle::degree" }
94  }
95  ];
96 
97  required int32 constant_heading_time = 2 [
98  default = 0,
99  (dccl.field) = {
100  min: 0
101  max: 360
102  precision: 0
103  units { base_dimensions: "T" }
104  }
105  ];
106 
107  required double constant_heading_speed = 3 [
108  default = 2,
109  (dccl.field) = {
110  min: 0,
111  max: 3.0,
112  precision: 1,
113  units { base_dimensions: "LT^-1" }
114  }
115  ];
116 
117  required double safety_depth = 4 [
118  default = -1,
119  (dccl.field) = {
120  min: -1,
121  max: 60,
122  precision: 1,
123  units { base_dimensions: "LT^-1" }
124  }
125  ];
126 }
127 
128 message MissionReport
129 {
130  option (dccl.msg) = {
131  unit_system: "si"
132  };
133 
134  required MissionState state = 10;
135  optional int32 active_goal = 11;
136  optional GeographicCoordinate active_goal_location = 12;
137  optional double distance_to_active_goal = 13 [(dccl.field) = {
138  min: 0
139  max: 1000
140  precision: 1
141  units: { derived_dimensions: "length" }
142  }];
143  optional uint32 active_goal_timeout = 14 [(dccl.field) = {
144  min: 0
145  max: 3600
146  precision: 0
147  units { base_dimensions: "T" }
148  }];
149  optional int32 data_offload_percentage = 15
150  [(dccl.field) = { min: 0 max: 100 precision: 0 }];
151  optional int32 repeat_index = 16
152  [(dccl.field) = { min: 0 max: 1000 precision: 0 }];
153 }
154 
155 message MissionTask
156 {
157  option (dccl.msg) = {
158  unit_system: "si"
159  };
160 
161  enum TaskType
162  {
163  NONE = 0;
164  DIVE = 1;
165  STATION_KEEP = 2;
166  SURFACE_DRIFT = 3;
167  CONSTANT_HEADING = 4;
168  }
169  optional TaskType type = 1 [default = NONE];
170 
171  message DiveParameters
172  {
173  optional double max_depth = 1 [
174  default = 60,
175  (dccl.field) = {
176  min: 0
177  max: 60
178  precision: 1
179  units { base_dimensions: "L" }
180  }
181  ];
182  optional double depth_interval = 2 [
183  default = inf,
184  (dccl.field) = {
185  min: 0.1
186  max: 60
187  precision: 1
188  units { base_dimensions: "L" }
189  }
190  ];
191  optional double hold_time = 3 [
192  default = 0,
193  (dccl.field) = {
194  min: 0
195  max: 3600
196  precision: 0
197  units { base_dimensions: "T" }
198  }
199  ];
200  optional bool bottom_dive = 4 [default = false];
201  }
202 
203  // for type == DIVE
204  optional DiveParameters dive = 2;
205 
206  message DriftParameters
207  {
208  optional int32 drift_time = 3 [
209  default = 0,
210  (dccl.field) = {
211  min: 0
212  max: 3600
213  precision: -1
214  units { base_dimensions: "T" }
215  }
216  ];
217  }
218 
219  // for type == SURFACE_DRIFT and type == DIVE
220  optional DriftParameters surface_drift = 3;
221 
222  message ConstantHeadingParameters
223  {
224  optional double constant_heading = 1 [(dccl.field) = {
225  min: 0
226  max: 360
227  precision: 0
228  units { derived_dimensions: "plane_angle" system: "angle::degree" }
229  }];
230 
231  optional int32 constant_heading_time = 2 [
232  default = 0,
233  (dccl.field) = {
234  min: 0
235  max: 3600
236  precision: -1
237  units { base_dimensions: "T" }
238  }
239  ];
240 
241  optional double constant_heading_speed = 3 [
242  default = 2,
243  (dccl.field) = {
244  min: 0.1,
245  max: 3.0,
246  precision: 1,
247  units { base_dimensions: "LT^-1" }
248  }
249  ];
250  }
251 
252  // for type == CONSTANT_HEADING
253  optional ConstantHeadingParameters constant_heading = 4;
254  optional bool start_echo = 5 [default = false];
255 
256  message StationKeepParameters
257  {
258  optional int32 station_keep_time = 1 [
259  default = 10,
260  (dccl.field) = {
261  min: 0,
262  max: 3600,
263  precision: -1,
264  units { base_dimensions: "T" }
265  }
266  ];
267  }
268 
269  // for type == STATION_KEEP
270  optional StationKeepParameters station_keep = 6;
271 }
272 
273 message MissionPlan
274 {
275  option (dccl.msg) = {
276  unit_system: "si"
277  };
278 
279  enum MissionStart
280  {
281  START_IMMEDIATELY = 1;
282  START_ON_COMMAND = 2;
283  // START_IN_WATER_DETECT = 3;
284  // START_AFTER_DELAY = 4;
285  }
286  optional MissionStart start = 1 [default = START_ON_COMMAND];
287 
288  enum MovementType
289  {
290  TRANSIT = 1;
291  REMOTE_CONTROL = 2;
292  }
293  optional MovementType movement = 2 [default = TRANSIT];
294 
295  message Goal
296  {
297  optional string name = 1 [(dccl.field).omit = true];
298  required GeographicCoordinate location = 2;
299  optional MissionTask task = 3;
300  optional bool moveWptMode = 4;
301  }
302 
303  repeated Goal goal = 3 [(dccl.field).max_repeat = 10];
304 
305  message Recovery
306  {
307  optional bool recover_at_final_goal = 1 [default = true];
308  optional GeographicCoordinate location = 2;
309  }
310  optional Recovery recovery = 4;
311 
312  optional Speeds speeds = 5;
313  optional BottomDepthSafetyParams bottom_depth_safety_params = 6;
314  optional uint32 fragment_index = 7 [(dccl.field) = { min: 0 max: 2 }];
315  optional uint32 expected_fragments = 8 [(dccl.field) = { min: 1 max: 3 }];
316  optional uint32 repeats = 9 [default = 1, (dccl.field) = {min: 1 max: 100 }];
317 }
318 
319 message IvPBehaviorUpdate
320 {
321  message TransitUpdate
322  {
323  // unit dimensions must match those used by MOOS-IvP
324  option (dccl.msg) = {
325  unit_system: "si"
326  };
327  required bool active = 1;
328 
329  optional double x = 2
330  [(dccl.field).units = { base_dimensions: "L" }]; // meters
331  optional double y = 3
332  [(dccl.field).units = { base_dimensions: "L" }]; // meters
333  optional double speed = 4 [
334  (dccl.field).units = { base_dimensions: "LT^-1" }
335  ]; // meters/second
336 
337  optional int32 slip_radius = 5;
338  }
339 
340  message StationkeepUpdate
341  {
342  // unit dimensions must match those used by MOOS-IvP
343  option (dccl.msg) = {
344  unit_system: "si"
345  };
346 
347  required bool active = 1;
348 
349  optional double x = 2
350  [(dccl.field).units = { base_dimensions: "L" }]; // meters
351  optional double y = 3
352  [(dccl.field).units = { base_dimensions: "L" }]; // meters
353  optional double outer_speed = 4 [
354  (dccl.field).units = { base_dimensions: "LT^-1" }
355  ]; // meters/second
356  optional double transit_speed = 5 [
357  (dccl.field).units = { base_dimensions: "LT^-1" }
358  ]; // meters/second
359  optional bool center_activate = 6 [default = false];
360  }
361 
362  message ConstantHeadingUpdate
363  {
364  // unit dimensions must match those used by MOOS-IvP
365  option (dccl.msg) = {
366  unit_system: "si"
367  };
368 
369  required bool active = 1;
370 
371  optional double heading = 2 [(dccl.field) = {
372  min: 0
373  max: 360
374  precision: 0
375  units { derived_dimensions: "plane_angle" system: "angle::degree" }
376  }];
377  }
378 
379  message ConstantSpeedUpdate
380  {
381  // unit dimensions must match those used by MOOS-IvP
382  option (dccl.msg) = {
383  unit_system: "si"
384  };
385 
386  required bool active = 1;
387 
388  optional double speed = 2 [
389  (dccl.field).units = { base_dimensions: "LT^-1" }
390  ]; // meters/second
391  }
392 
393  oneof behavior
394  {
395  TransitUpdate transit = 1;
396  StationkeepUpdate stationkeep = 2;
397  ConstantHeadingUpdate constantHeading = 3;
398  ConstantSpeedUpdate constantSpeed = 4;
399  }
400 }
401 
402 message IvPBehaviorReport
403 {
404  message TransitReport
405  {
406  optional bool waypoint_reached = 1 [default = false];
407  }
408 
409  oneof behavior
410  {
411  TransitReport transit = 1;
412  }
413 }
414 
415 message MissionTpvMeetsGpsReq
416 {
417  option (dccl.msg) = {
418  unit_system: "si"
419  };
420 
421  optional goby.middleware.protobuf.gpsd.TimePositionVelocity tpv = 1;
422 }