@blueyerobotics/protocol-definitions 3.4.0-eddb8a5e → 3.4.0-efe27311
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/control.d.ts +28 -0
- package/dist/control.js +159 -0
- package/dist/index.blueye.protocol.d.ts +1 -1
- package/dist/index.blueye.protocol.js +1 -1
- package/dist/message_formats.d.ts +16 -0
- package/dist/message_formats.js +46 -0
- package/dist/mission_planning.d.ts +526 -5
- package/dist/mission_planning.js +3098 -143
- package/dist/req_rep.d.ts +61 -4
- package/dist/req_rep.js +383 -20
- package/dist/telemetry.d.ts +18 -1
- package/dist/telemetry.js +107 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
-
import {
|
|
2
|
+
import { Duration } from "./google/protobuf/duration.js";
|
|
3
|
+
import { Annotation, Camera, GuestPortDeviceID, Laser, LatLongPosition, Lights, MultibeamConfig, MultibeamServo, StorageLocation, TiltAngle, TiltStabilizationState } from "./message_formats.js";
|
|
3
4
|
/**
|
|
4
5
|
* Mission Planning Protocol.
|
|
5
6
|
*
|
|
@@ -38,10 +39,40 @@ export declare enum ControlModeHorizontal {
|
|
|
38
39
|
CONTROL_MODE_HORIZONTAL_AUTO_HEADING = 2,
|
|
39
40
|
/** CONTROL_MODE_HORIZONTAL_STATION_KEEPING - Station keeping control mode. */
|
|
40
41
|
CONTROL_MODE_HORIZONTAL_STATION_KEEPING = 3,
|
|
42
|
+
/** CONTROL_MODE_HORIZONTAL_WEATHER_VANING - Weather vaning control mode (station keeping into the current). */
|
|
43
|
+
CONTROL_MODE_HORIZONTAL_WEATHER_VANING = 4,
|
|
41
44
|
UNRECOGNIZED = -1
|
|
42
45
|
}
|
|
43
46
|
export declare function controlModeHorizontalFromJSON(object: any): ControlModeHorizontal;
|
|
44
47
|
export declare function controlModeHorizontalToJSON(object: ControlModeHorizontal): string;
|
|
48
|
+
/** Which condition a Trigger carries. The values are the field numbers of the Trigger oneof. */
|
|
49
|
+
export declare enum TriggerKind {
|
|
50
|
+
/** TRIGGER_KIND_UNSPECIFIED - No condition is set. */
|
|
51
|
+
TRIGGER_KIND_UNSPECIFIED = 0,
|
|
52
|
+
/** TRIGGER_KIND_DETECTION - A DetectionTrigger. */
|
|
53
|
+
TRIGGER_KIND_DETECTION = 1,
|
|
54
|
+
/** TRIGGER_KIND_DEPTH - A DepthTrigger. */
|
|
55
|
+
TRIGGER_KIND_DEPTH = 2,
|
|
56
|
+
/** TRIGGER_KIND_ALTITUDE - An AltitudeTrigger. */
|
|
57
|
+
TRIGGER_KIND_ALTITUDE = 3,
|
|
58
|
+
/** TRIGGER_KIND_LOCATION - A LocationTrigger. */
|
|
59
|
+
TRIGGER_KIND_LOCATION = 4,
|
|
60
|
+
UNRECOGNIZED = -1
|
|
61
|
+
}
|
|
62
|
+
export declare function triggerKindFromJSON(object: any): TriggerKind;
|
|
63
|
+
export declare function triggerKindToJSON(object: TriggerKind): string;
|
|
64
|
+
/** Which lights a LightsCommand applies to. */
|
|
65
|
+
export declare enum LightTarget {
|
|
66
|
+
/** LIGHT_TARGET_UNSPECIFIED - Unspecified, treated as the main lights. */
|
|
67
|
+
LIGHT_TARGET_UNSPECIFIED = 0,
|
|
68
|
+
/** LIGHT_TARGET_MAIN - The drone's own lights. */
|
|
69
|
+
LIGHT_TARGET_MAIN = 1,
|
|
70
|
+
/** LIGHT_TARGET_GUESTPORT - Lights connected to a guest port. */
|
|
71
|
+
LIGHT_TARGET_GUESTPORT = 2,
|
|
72
|
+
UNRECOGNIZED = -1
|
|
73
|
+
}
|
|
74
|
+
export declare function lightTargetFromJSON(object: any): LightTarget;
|
|
75
|
+
export declare function lightTargetToJSON(object: LightTarget): string;
|
|
45
76
|
/** List of available camera actions. */
|
|
46
77
|
export declare enum CameraAction {
|
|
47
78
|
/** CAMERA_ACTION_UNSPECIFIED - Unspecified command. */
|
|
@@ -92,6 +123,30 @@ export declare enum InstructionType {
|
|
|
92
123
|
INSTRUCTION_TYPE_GO_TO_HOME = 12,
|
|
93
124
|
/** INSTRUCTION_TYPE_SURVEY - Execute a survey pattern over a polygon area. */
|
|
94
125
|
INSTRUCTION_TYPE_SURVEY = 13,
|
|
126
|
+
/** INSTRUCTION_TYPE_RECORD_MULTIBEAM - Start or stop multibeam recording. */
|
|
127
|
+
INSTRUCTION_TYPE_RECORD_MULTIBEAM = 14,
|
|
128
|
+
/** INSTRUCTION_TYPE_ACTIVATE_MULTIBEAM - Start or stop the multibeam driver. */
|
|
129
|
+
INSTRUCTION_TYPE_ACTIVATE_MULTIBEAM = 15,
|
|
130
|
+
/** INSTRUCTION_TYPE_SET_MULTIBEAM_CONFIG - Change the multibeam configuration. */
|
|
131
|
+
INSTRUCTION_TYPE_SET_MULTIBEAM_CONFIG = 16,
|
|
132
|
+
/** INSTRUCTION_TYPE_SET_LIGHTS - Set the lights. */
|
|
133
|
+
INSTRUCTION_TYPE_SET_LIGHTS = 17,
|
|
134
|
+
/** INSTRUCTION_TYPE_SET_LASER - Set the laser. */
|
|
135
|
+
INSTRUCTION_TYPE_SET_LASER = 18,
|
|
136
|
+
/** INSTRUCTION_TYPE_SET_TILT_STABILIZATION - Enable or disable tilt stabilization. */
|
|
137
|
+
INSTRUCTION_TYPE_SET_TILT_STABILIZATION = 19,
|
|
138
|
+
/** INSTRUCTION_TYPE_SET_CV_MODEL - Start or stop a computer vision model. */
|
|
139
|
+
INSTRUCTION_TYPE_SET_CV_MODEL = 20,
|
|
140
|
+
/** INSTRUCTION_TYPE_ANNOTATION - Record an annotation. */
|
|
141
|
+
INSTRUCTION_TYPE_ANNOTATION = 21,
|
|
142
|
+
/** INSTRUCTION_TYPE_GO_TO_HEADING - Turn to a heading. */
|
|
143
|
+
INSTRUCTION_TYPE_GO_TO_HEADING = 22,
|
|
144
|
+
/** INSTRUCTION_TYPE_TRANSECT - Drive a straight line. */
|
|
145
|
+
INSTRUCTION_TYPE_TRANSECT = 23,
|
|
146
|
+
/** INSTRUCTION_TYPE_GO_TO_RELATIVE_DEPTH - Change the depth by an amount. */
|
|
147
|
+
INSTRUCTION_TYPE_GO_TO_RELATIVE_DEPTH = 24,
|
|
148
|
+
/** INSTRUCTION_TYPE_SET_CRUISE_SPEED - Change the cruise speed. */
|
|
149
|
+
INSTRUCTION_TYPE_SET_CRUISE_SPEED = 25,
|
|
95
150
|
UNRECOGNIZED = -1
|
|
96
151
|
}
|
|
97
152
|
export declare function instructionTypeFromJSON(object: any): InstructionType;
|
|
@@ -120,6 +175,86 @@ export declare enum MissionState {
|
|
|
120
175
|
}
|
|
121
176
|
export declare function missionStateFromJSON(object: any): MissionState;
|
|
122
177
|
export declare function missionStateToJSON(object: MissionState): string;
|
|
178
|
+
/** How a mission run ended. */
|
|
179
|
+
export declare enum MissionResult {
|
|
180
|
+
/** MISSION_RESULT_UNSPECIFIED - No mission has ended since the drone started. */
|
|
181
|
+
MISSION_RESULT_UNSPECIFIED = 0,
|
|
182
|
+
/**
|
|
183
|
+
* MISSION_RESULT_COMPLETED - The run reached the end of the mission. Instructions can have been skipped on the way, for a device
|
|
184
|
+
* that is not connected: see MissionOutcome.skipped_instruction_ids.
|
|
185
|
+
*/
|
|
186
|
+
MISSION_RESULT_COMPLETED = 1,
|
|
187
|
+
/** MISSION_RESULT_ABORTED - The drone stopped the mission, see MissionOutcome.abort_reason. */
|
|
188
|
+
MISSION_RESULT_ABORTED = 2,
|
|
189
|
+
/** MISSION_RESULT_CANCELLED - A client cleared or replaced the mission while it was running or paused. */
|
|
190
|
+
MISSION_RESULT_CANCELLED = 3,
|
|
191
|
+
UNRECOGNIZED = -1
|
|
192
|
+
}
|
|
193
|
+
export declare function missionResultFromJSON(object: any): MissionResult;
|
|
194
|
+
export declare function missionResultToJSON(object: MissionResult): string;
|
|
195
|
+
/** Why the drone aborted a mission. A client that does not know a value treats it as unspecified. */
|
|
196
|
+
export declare enum MissionAbortReason {
|
|
197
|
+
/** MISSION_ABORT_REASON_UNSPECIFIED - Unspecified, see MissionOutcome.reason. */
|
|
198
|
+
MISSION_ABORT_REASON_UNSPECIFIED = 0,
|
|
199
|
+
/** MISSION_ABORT_REASON_CONTROL_MODE_LOST - A control mode the instruction needs was refused or lost. */
|
|
200
|
+
MISSION_ABORT_REASON_CONTROL_MODE_LOST = 1,
|
|
201
|
+
/** MISSION_ABORT_REASON_POSITION_UNKNOWN - The instruction needs the drone's position, which is unknown. */
|
|
202
|
+
MISSION_ABORT_REASON_POSITION_UNKNOWN = 2,
|
|
203
|
+
/** MISSION_ABORT_REASON_STUCK - The drone stopped making progress towards its target. */
|
|
204
|
+
MISSION_ABORT_REASON_STUCK = 3,
|
|
205
|
+
/** MISSION_ABORT_REASON_WAYPOINT_TOO_FAR - A waypoint is farther away than the drone goes. */
|
|
206
|
+
MISSION_ABORT_REASON_WAYPOINT_TOO_FAR = 4,
|
|
207
|
+
/** MISSION_ABORT_REASON_HEADING_UNKNOWN - A turn needs the drone's heading, which is unknown. */
|
|
208
|
+
MISSION_ABORT_REASON_HEADING_UNKNOWN = 5,
|
|
209
|
+
/** MISSION_ABORT_REASON_HEADING_NOT_REACHED - A turn did not reach its heading in time. */
|
|
210
|
+
MISSION_ABORT_REASON_HEADING_NOT_REACHED = 6,
|
|
211
|
+
/** MISSION_ABORT_REASON_DEVICE_TIMEOUT - A camera, multibeam or other device did not confirm a command in time. */
|
|
212
|
+
MISSION_ABORT_REASON_DEVICE_TIMEOUT = 7,
|
|
213
|
+
/** MISSION_ABORT_REASON_DURATION_TOO_LONG - The time left to complete the mission grew past the limit. */
|
|
214
|
+
MISSION_ABORT_REASON_DURATION_TOO_LONG = 8,
|
|
215
|
+
/**
|
|
216
|
+
* MISSION_ABORT_REASON_SUPERVISOR - The drone's supervisor stopped the mission: the pilot took control, the controlling client stopped
|
|
217
|
+
* answering, or the drone lost its position or attitude.
|
|
218
|
+
*/
|
|
219
|
+
MISSION_ABORT_REASON_SUPERVISOR = 9,
|
|
220
|
+
UNRECOGNIZED = -1
|
|
221
|
+
}
|
|
222
|
+
export declare function missionAbortReasonFromJSON(object: any): MissionAbortReason;
|
|
223
|
+
export declare function missionAbortReasonToJSON(object: MissionAbortReason): string;
|
|
224
|
+
/** Outcome of an instruction started with RunInstructionCtrl. */
|
|
225
|
+
export declare enum InstructionResultState {
|
|
226
|
+
/** INSTRUCTION_RESULT_STATE_UNSPECIFIED - Unspecified. */
|
|
227
|
+
INSTRUCTION_RESULT_STATE_UNSPECIFIED = 0,
|
|
228
|
+
/** INSTRUCTION_RESULT_STATE_ACCEPTED - The instruction was accepted and has started. */
|
|
229
|
+
INSTRUCTION_RESULT_STATE_ACCEPTED = 1,
|
|
230
|
+
/** INSTRUCTION_RESULT_STATE_REJECTED - The instruction was not started, see reason. */
|
|
231
|
+
INSTRUCTION_RESULT_STATE_REJECTED = 2,
|
|
232
|
+
/** INSTRUCTION_RESULT_STATE_COMPLETED - The instruction completed. */
|
|
233
|
+
INSTRUCTION_RESULT_STATE_COMPLETED = 3,
|
|
234
|
+
/** INSTRUCTION_RESULT_STATE_FAILED - The instruction stopped before completing, see reason. */
|
|
235
|
+
INSTRUCTION_RESULT_STATE_FAILED = 4,
|
|
236
|
+
/** INSTRUCTION_RESULT_STATE_CANCELLED - The instruction was cancelled by a client or by the drone. */
|
|
237
|
+
INSTRUCTION_RESULT_STATE_CANCELLED = 5,
|
|
238
|
+
UNRECOGNIZED = -1
|
|
239
|
+
}
|
|
240
|
+
export declare function instructionResultStateFromJSON(object: any): InstructionResultState;
|
|
241
|
+
export declare function instructionResultStateToJSON(object: InstructionResultState): string;
|
|
242
|
+
/** MissionRuleState is where a rule is in its episode. */
|
|
243
|
+
export declare enum MissionRuleState {
|
|
244
|
+
/** MISSION_RULE_STATE_UNSPECIFIED - Unspecified. */
|
|
245
|
+
MISSION_RULE_STATE_UNSPECIFIED = 0,
|
|
246
|
+
/** MISSION_RULE_STATE_IDLE - Waiting for the trigger. */
|
|
247
|
+
MISSION_RULE_STATE_IDLE = 1,
|
|
248
|
+
/** MISSION_RULE_STATE_ACTIVE - The rule has fired and has not released yet. */
|
|
249
|
+
MISSION_RULE_STATE_ACTIVE = 2,
|
|
250
|
+
/** MISSION_RULE_STATE_COOLDOWN - Released; waiting for the cooldown before it can fire again. */
|
|
251
|
+
MISSION_RULE_STATE_COOLDOWN = 3,
|
|
252
|
+
/** MISSION_RULE_STATE_DISABLED - The rule is disabled. */
|
|
253
|
+
MISSION_RULE_STATE_DISABLED = 4,
|
|
254
|
+
UNRECOGNIZED = -1
|
|
255
|
+
}
|
|
256
|
+
export declare function missionRuleStateFromJSON(object: any): MissionRuleState;
|
|
257
|
+
export declare function missionRuleStateToJSON(object: MissionRuleState): string;
|
|
123
258
|
/** A list of waypoints describes a mission that the auto pilot can execute. */
|
|
124
259
|
export interface Mission {
|
|
125
260
|
/** Mission id, defined by the client. */
|
|
@@ -140,14 +275,28 @@ export interface Mission {
|
|
|
140
275
|
defaultHeaveSpeed: number;
|
|
141
276
|
/** Default circle of acceptance for waypoints (m) (optional). */
|
|
142
277
|
defaultCircleOfAcceptance: number;
|
|
278
|
+
/** Set by the drone, increases with every accepted SetInstructionUpdateReq. */
|
|
279
|
+
revision: number;
|
|
280
|
+
/**
|
|
281
|
+
* Client-defined identifier of the mission, such as a UUID, for clients to match the drone's status with
|
|
282
|
+
* their own records (optional, at most 64 characters). The drone keeps it through instruction updates and
|
|
283
|
+
* echoes it in GetMissionRep, MissionStatus and MissionOutcome. It does not tell loads apart: see load_id.
|
|
284
|
+
*/
|
|
285
|
+
uuid: string;
|
|
286
|
+
/**
|
|
287
|
+
* Set by the drone: a random id it draws for every mission it loads, from 1 to 2^53 - 1 so that clients that
|
|
288
|
+
* hold numbers as doubles, such as JavaScript, read it exactly. An instruction update names it
|
|
289
|
+
* (SetInstructionUpdateReq.load_id), so it cannot change a mission loaded since. Ignored in SetMissionReq.
|
|
290
|
+
*/
|
|
291
|
+
loadId: number;
|
|
143
292
|
}
|
|
144
293
|
/** A mission consists of one or multiple instructions. One instruction can be of different types. */
|
|
145
294
|
export interface Instruction {
|
|
146
295
|
id: number;
|
|
147
296
|
/** Group id used for polygons. */
|
|
148
297
|
groupId: number;
|
|
149
|
-
/**
|
|
150
|
-
|
|
298
|
+
/** Pause the mission after this instruction. RunMissionCtrl continues it. */
|
|
299
|
+
pauseOnCompletion: boolean;
|
|
151
300
|
/** Go to waypoint. */
|
|
152
301
|
waypointCommand?: WaypointCommand | undefined;
|
|
153
302
|
/** Go to depth. */
|
|
@@ -170,6 +319,30 @@ export interface Instruction {
|
|
|
170
319
|
goToHomeCommand?: GoToHomeCommand | undefined;
|
|
171
320
|
/** Execute a survey pattern over a polygon area. */
|
|
172
321
|
surveyCommand?: SurveyCommand | undefined;
|
|
322
|
+
/** Start or stop multibeam recording. */
|
|
323
|
+
recordMultibeamCommand?: RecordMultibeamCommand | undefined;
|
|
324
|
+
/** Start or stop the multibeam driver. */
|
|
325
|
+
activateMultibeamCommand?: ActivateMultibeamCommand | undefined;
|
|
326
|
+
/** Change the multibeam configuration. */
|
|
327
|
+
multibeamConfigCommand?: MultibeamConfigCommand | undefined;
|
|
328
|
+
/** Set the main or guest port lights. */
|
|
329
|
+
lightsCommand?: LightsCommand | undefined;
|
|
330
|
+
/** Set the laser. */
|
|
331
|
+
laserCommand?: LaserCommand | undefined;
|
|
332
|
+
/** Enable or disable tilt stabilization. */
|
|
333
|
+
tiltStabilizationCommand?: TiltStabilizationCommand | undefined;
|
|
334
|
+
/** Start or stop a computer vision model. */
|
|
335
|
+
cvModelStateCommand?: CvModelStateCommand | undefined;
|
|
336
|
+
/** Record an annotation in the dive log. */
|
|
337
|
+
annotationCommand?: AnnotationCommand | undefined;
|
|
338
|
+
/** Turn to a heading and hold it. */
|
|
339
|
+
headingCommand?: HeadingCommand | undefined;
|
|
340
|
+
/** Drive a straight line on a course for a distance. */
|
|
341
|
+
transectCommand?: TransectCommand | undefined;
|
|
342
|
+
/** Change the depth by an amount. */
|
|
343
|
+
relativeDepthCommand?: RelativeDepthCommand | undefined;
|
|
344
|
+
/** Change the cruise speed for the rest of the mission. */
|
|
345
|
+
cruiseSpeedCommand?: CruiseSpeedCommand | undefined;
|
|
173
346
|
}
|
|
174
347
|
/** Depth set point is used to describe a depth set-point relative to the surface or the seabed. */
|
|
175
348
|
export interface DepthSetPoint {
|
|
@@ -202,6 +375,153 @@ export interface ControlModeCommand {
|
|
|
202
375
|
/** Desired control mode in surge and yaw. */
|
|
203
376
|
controlModeHorizontal: ControlModeHorizontal;
|
|
204
377
|
}
|
|
378
|
+
/**
|
|
379
|
+
* DetectionTrigger is satisfied by what the computer vision models see.
|
|
380
|
+
*
|
|
381
|
+
* The trigger is satisfied while at least one detection of the running models matches all of the
|
|
382
|
+
* filters below. The models have to be running; a trigger for a model that is not running is not
|
|
383
|
+
* satisfied and TriggerStatus reports sensor_unavailable.
|
|
384
|
+
*/
|
|
385
|
+
export interface DetectionTrigger {
|
|
386
|
+
/** Any of these class names; empty matches every class. */
|
|
387
|
+
classNames: string[];
|
|
388
|
+
/** Only detections from this model; empty matches every model. */
|
|
389
|
+
modelName: string;
|
|
390
|
+
/** Only detections from this camera; unspecified matches every camera. */
|
|
391
|
+
camera: Camera;
|
|
392
|
+
/** Detections below this confidence are ignored (0..1). */
|
|
393
|
+
minConfidence: number;
|
|
394
|
+
/** Least bounding box area over image area a detection must have (0..1). */
|
|
395
|
+
minAreaFraction: number;
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* DepthTrigger is satisfied while the drone is between two depths below the surface.
|
|
399
|
+
*
|
|
400
|
+
* A depth with a tolerance is the two bounds around it: 9 and 11 for ten metres give or take a
|
|
401
|
+
* metre. Leaving max_depth at zero gives no upper bound, so a min_depth of 20 on its own is
|
|
402
|
+
* satisfied deeper than 20 m. Neither bound may be negative, and a max_depth that is set has to be
|
|
403
|
+
* above min_depth: the two are the edges of a band, not a single depth, and a rule whose band has
|
|
404
|
+
* no width is refused rather than left never firing. The drone measures its depth from the moment
|
|
405
|
+
* it is powered on, so this trigger reports sensor_unavailable only while no depth has reached the
|
|
406
|
+
* mission at all.
|
|
407
|
+
*/
|
|
408
|
+
export interface DepthTrigger {
|
|
409
|
+
/** Shallowest depth that satisfies the trigger (m below the surface). */
|
|
410
|
+
minDepth: number;
|
|
411
|
+
/** Deepest depth that satisfies the trigger (m). Zero means no upper bound. */
|
|
412
|
+
maxDepth: number;
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* AltitudeTrigger is satisfied while the drone is between two heights above the seabed.
|
|
416
|
+
*
|
|
417
|
+
* A height with a tolerance is the two bounds around it: 2.5 and 3.5 for three metres off the
|
|
418
|
+
* bottom give or take half a metre. Leaving max_altitude at zero gives no upper bound. Neither
|
|
419
|
+
* bound may be negative, and a max_altitude that is set has to be above min_altitude, as for
|
|
420
|
+
* DepthTrigger. The height comes from a DVL or an altimeter; with neither mounted, out of its
|
|
421
|
+
* range, or with a reading the drone does not trust, the trigger is simply not satisfied and
|
|
422
|
+
* TriggerStatus reports sensor_unavailable.
|
|
423
|
+
*/
|
|
424
|
+
export interface AltitudeTrigger {
|
|
425
|
+
/** Lowest height above the seabed that satisfies the trigger (m). */
|
|
426
|
+
minAltitude: number;
|
|
427
|
+
/** Highest height that satisfies the trigger (m). Zero means no upper bound. */
|
|
428
|
+
maxAltitude: number;
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* LocationTrigger is satisfied while the drone is inside a circle around a position.
|
|
432
|
+
*
|
|
433
|
+
* Entering the circle makes the trigger satisfied and leaving it makes it unsatisfied, so a rule
|
|
434
|
+
* with one location trigger can start a recording in its enter instructions and stop it in its exit
|
|
435
|
+
* instructions. Any valid position estimate will do, whichever sensors it is built from; while the
|
|
436
|
+
* drone has none the trigger is simply not satisfied and TriggerStatus reports sensor_unavailable.
|
|
437
|
+
*/
|
|
438
|
+
export interface LocationTrigger {
|
|
439
|
+
/** Centre of the circle (decimal degrees). */
|
|
440
|
+
position: LatLongPosition | undefined;
|
|
441
|
+
/** Radius of the circle around the position (m). Must be above zero. */
|
|
442
|
+
circleOfAcceptance: number;
|
|
443
|
+
}
|
|
444
|
+
/** Trigger is one condition of a mission rule. */
|
|
445
|
+
export interface Trigger {
|
|
446
|
+
/** Satisfied by a detection from a computer vision model. */
|
|
447
|
+
detectionTrigger?: DetectionTrigger | undefined;
|
|
448
|
+
/** Satisfied at a depth below the surface. */
|
|
449
|
+
depthTrigger?: DepthTrigger | undefined;
|
|
450
|
+
/** Satisfied at a height above the seabed. */
|
|
451
|
+
altitudeTrigger?: AltitudeTrigger | undefined;
|
|
452
|
+
/** Satisfied inside a circle around a position. */
|
|
453
|
+
locationTrigger?: LocationTrigger | undefined;
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* MissionRule runs instructions when all of its triggers are satisfied at once and when they stop
|
|
457
|
+
* being so. A drone runs at most 16 rules with at most 8 triggers and 8 instructions per list, and
|
|
458
|
+
* a rule has to carry at least one instruction in one of its lists. A rule with no triggers never
|
|
459
|
+
* fires. Instructions that move the drone (waypoint, go to home,
|
|
460
|
+
* transect, survey, depth set point, relative depth, go to surface or seabed, control mode,
|
|
461
|
+
* heading) and waits are refused in rules; camera, tilt, lights, laser, multibeam, tilt
|
|
462
|
+
* stabilization, CV model, annotation and cruise speed are allowed.
|
|
463
|
+
*/
|
|
464
|
+
export interface MissionRule {
|
|
465
|
+
/** Rule id, defined by the client. Must be greater than zero and unique. */
|
|
466
|
+
id: number;
|
|
467
|
+
/** Rule name, for the log and the app. */
|
|
468
|
+
name: string;
|
|
469
|
+
/** A disabled rule never fires. Rules run unless this is set. */
|
|
470
|
+
disabled: boolean;
|
|
471
|
+
/** Run when the rule fires. */
|
|
472
|
+
enterInstructions: Instruction[];
|
|
473
|
+
/** Run when the rule releases. */
|
|
474
|
+
exitInstructions: Instruction[];
|
|
475
|
+
/** Conditions that must all be satisfied at once for the rule to fire. */
|
|
476
|
+
triggers: Trigger[];
|
|
477
|
+
/** How long all the triggers must stay satisfied before the rule fires. At most an hour. */
|
|
478
|
+
holdDuration: Duration | undefined;
|
|
479
|
+
/** How long a trigger must stay unsatisfied before the rule releases. At most an hour. */
|
|
480
|
+
releaseDuration: Duration | undefined;
|
|
481
|
+
/** Time after a release before the rule can fire again. At most an hour. */
|
|
482
|
+
cooldownDuration: Duration | undefined;
|
|
483
|
+
}
|
|
484
|
+
/** MissionRuleStatus is the state of one rule. */
|
|
485
|
+
export interface MissionRuleStatus {
|
|
486
|
+
/** Rule id. */
|
|
487
|
+
id: number;
|
|
488
|
+
/** What the rule is doing. */
|
|
489
|
+
state: MissionRuleState;
|
|
490
|
+
/** Times the rule has fired since it was set. */
|
|
491
|
+
episodes: number;
|
|
492
|
+
/** When the rule last fired; unset before the first time. */
|
|
493
|
+
lastFired: Date | undefined;
|
|
494
|
+
/** Outcome of the last instruction the rule ran. */
|
|
495
|
+
lastResult: InstructionResultState;
|
|
496
|
+
/** Reason of the last result, when there is one. */
|
|
497
|
+
lastReason: string;
|
|
498
|
+
/** One entry per trigger, in the order the rule lists them. */
|
|
499
|
+
triggers: TriggerStatus[];
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* TriggerStatus is the state of one trigger of a rule, so a client can show which condition is
|
|
503
|
+
* holding the rule back.
|
|
504
|
+
*/
|
|
505
|
+
export interface TriggerStatus {
|
|
506
|
+
/** Which condition the trigger carries. */
|
|
507
|
+
kind: TriggerKind;
|
|
508
|
+
/** True while the condition holds. */
|
|
509
|
+
satisfied: boolean;
|
|
510
|
+
/** True while the drone has no reading to judge the condition by. */
|
|
511
|
+
sensorUnavailable: boolean;
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* InsertInstruction adds an instruction to the loaded mission. It must say where: an insert that sets
|
|
515
|
+
* neither before_id nor append true is refused.
|
|
516
|
+
*/
|
|
517
|
+
export interface InsertInstruction {
|
|
518
|
+
/** The instruction to add. Its id must be new to the mission. */
|
|
519
|
+
instruction: Instruction | undefined;
|
|
520
|
+
/** Id of the instruction to insert in front of. */
|
|
521
|
+
beforeId?: number | undefined;
|
|
522
|
+
/** True adds the instruction at the end of the mission. */
|
|
523
|
+
append?: boolean | undefined;
|
|
524
|
+
}
|
|
205
525
|
/** A WaypointCommand will request the drone to drive to a point automatically. */
|
|
206
526
|
export interface WaypointCommand {
|
|
207
527
|
/** Waypoint to go to. */
|
|
@@ -233,6 +553,10 @@ export interface CameraCommand {
|
|
|
233
553
|
cameraAction: CameraAction;
|
|
234
554
|
/** Used for taking photos based on a time or distance interval. */
|
|
235
555
|
actionParam: number;
|
|
556
|
+
/** Which camera the action applies to. The main camera when unspecified or unrecognised. */
|
|
557
|
+
camera: Camera;
|
|
558
|
+
/** Where to store the photos or the recording. Internal when unspecified. */
|
|
559
|
+
storageLocation: StorageLocation;
|
|
236
560
|
}
|
|
237
561
|
/** GoToSurfaceCommand is used to go to the surface. */
|
|
238
562
|
export interface GoToSurfaceCommand {
|
|
@@ -249,6 +573,127 @@ export interface GoToHomeCommand {
|
|
|
249
573
|
/** Desired speed to home (m/s). */
|
|
250
574
|
desiredSpeed: number;
|
|
251
575
|
}
|
|
576
|
+
/** RecordMultibeamCommand starts or stops recording of the multibeam sonar. */
|
|
577
|
+
export interface RecordMultibeamCommand {
|
|
578
|
+
/** True to start recording, false to stop. */
|
|
579
|
+
enable: boolean;
|
|
580
|
+
/** Where to store the recording. Internal when unspecified. */
|
|
581
|
+
storageLocation: StorageLocation;
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* ActivateMultibeamCommand starts or stops the multibeam sonar driver, as ActivateMultibeamCtrl and
|
|
585
|
+
* DeactivateMultibeamCtrl do.
|
|
586
|
+
*
|
|
587
|
+
* The instruction completes when the driver reports the requested state, so a following
|
|
588
|
+
* RecordMultibeamCommand or TiltMultibeamCommand finds the sonar ready.
|
|
589
|
+
*/
|
|
590
|
+
export interface ActivateMultibeamCommand {
|
|
591
|
+
/** True to start the driver, false to stop it. */
|
|
592
|
+
activate: boolean;
|
|
593
|
+
/** Configuration to start with. When left out, the last known configuration is used. */
|
|
594
|
+
config: MultibeamConfig | undefined;
|
|
595
|
+
/**
|
|
596
|
+
* The sonar `config` was made for, as the multibeam driver reports it. The driver still starts or
|
|
597
|
+
* stops when a different sonar is connected, but `config` is skipped in favour of the last
|
|
598
|
+
* configuration the driver reported and the drone sends a
|
|
599
|
+
* NOTIFICATION_TYPE_MULTIBEAM_SONAR_MISMATCH notification. Unspecified applies `config` to
|
|
600
|
+
* whichever sonar is connected. A `config` that the sonar cannot run, measured the same way as
|
|
601
|
+
* for MultibeamConfigCommand, skips the whole instruction instead, so the driver is never
|
|
602
|
+
* started with a configuration nobody asked for.
|
|
603
|
+
*/
|
|
604
|
+
expectedDeviceId: GuestPortDeviceID;
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* MultibeamConfigCommand changes the configuration of a running multibeam sonar.
|
|
608
|
+
*
|
|
609
|
+
* A configuration is made for one sonar, because ranges, frequencies and beam counts differ between
|
|
610
|
+
* them. The drone compares expected_device_id with the sonar the multibeam driver reports, not with
|
|
611
|
+
* what the guest port discovery found, and when they differ it skips the whole instruction and
|
|
612
|
+
* sends a NOTIFICATION_TYPE_MULTIBEAM_SONAR_MISMATCH notification; the mission carries on with the
|
|
613
|
+
* next instruction. Unspecified applies the configuration to whichever sonar is connected.
|
|
614
|
+
*
|
|
615
|
+
* The configuration is also measured against what that sonar can do: the range for the frequency
|
|
616
|
+
* mode asked for, a high frequency mode on a sonar that has only one, and the number of beams. A
|
|
617
|
+
* configuration outside them skips the instruction with a reason naming the sonar. Nothing is
|
|
618
|
+
* quietly clamped, so a sonar never ends up running a configuration nobody asked for.
|
|
619
|
+
*/
|
|
620
|
+
export interface MultibeamConfigCommand {
|
|
621
|
+
/** The configuration to apply. */
|
|
622
|
+
config: MultibeamConfig | undefined;
|
|
623
|
+
/** The sonar this configuration was made for. */
|
|
624
|
+
expectedDeviceId: GuestPortDeviceID;
|
|
625
|
+
}
|
|
626
|
+
/** LightsCommand sets the intensity of the main or guest port lights, as LightsCtrl and GuestportLightsCtrl do. */
|
|
627
|
+
export interface LightsCommand {
|
|
628
|
+
/** Light intensity (0..1). */
|
|
629
|
+
lights: Lights | undefined;
|
|
630
|
+
/** Which lights to set. The main lights when unspecified or unrecognised. */
|
|
631
|
+
target: LightTarget;
|
|
632
|
+
}
|
|
633
|
+
/** LaserCommand sets the laser connected to a guest port, as LaserCtrl does. */
|
|
634
|
+
export interface LaserCommand {
|
|
635
|
+
/** Laser intensity and modulation. */
|
|
636
|
+
laser: Laser | undefined;
|
|
637
|
+
}
|
|
638
|
+
/** TiltStabilizationCommand enables or disables camera tilt stabilization, as TiltStabilizationCtrl does. */
|
|
639
|
+
export interface TiltStabilizationCommand {
|
|
640
|
+
/** The tilt stabilization state to set. */
|
|
641
|
+
state: TiltStabilizationState | undefined;
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* CvModelStateCommand starts or stops a computer vision model on the drone, as SetCvModelStateReq does.
|
|
645
|
+
*
|
|
646
|
+
* The instruction completes when the model reports the requested state.
|
|
647
|
+
*/
|
|
648
|
+
export interface CvModelStateCommand {
|
|
649
|
+
/** The model package to start or stop, as listed in CvModelInfo. */
|
|
650
|
+
packageId: string;
|
|
651
|
+
/** True to start the model, false to stop it. */
|
|
652
|
+
running: boolean;
|
|
653
|
+
}
|
|
654
|
+
/** AnnotationCommand records an annotation in the dive log, as AnnotationCtrl does. */
|
|
655
|
+
export interface AnnotationCommand {
|
|
656
|
+
/** The annotation to record. The drone sets the timestamp and the source. */
|
|
657
|
+
annotation: Annotation | undefined;
|
|
658
|
+
}
|
|
659
|
+
/**
|
|
660
|
+
* HeadingCommand turns the drone to a heading and holds it with auto heading. It completes once the
|
|
661
|
+
* heading has settled.
|
|
662
|
+
*/
|
|
663
|
+
export interface HeadingCommand {
|
|
664
|
+
/** Target heading from north (deg, 0..360), or the turn when relative is set (deg, -180..180). */
|
|
665
|
+
heading: number;
|
|
666
|
+
/** True to turn by `heading` degrees from the current heading; positive is clockwise. */
|
|
667
|
+
relative: boolean;
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* TransectCommand drives a straight line from the current position, like a waypoint the drone
|
|
671
|
+
* computes itself from a course and a distance.
|
|
672
|
+
*/
|
|
673
|
+
export interface TransectCommand {
|
|
674
|
+
/** Course relative to north (deg, 0..360). */
|
|
675
|
+
course: number;
|
|
676
|
+
/** Length of the line (m). */
|
|
677
|
+
distance: number;
|
|
678
|
+
/** Desired speed over ground (m/s). The mission default when 0. */
|
|
679
|
+
speedToTarget: number;
|
|
680
|
+
/** Optional depth or altitude to hold along the line. */
|
|
681
|
+
depthSetPoint: DepthSetPoint | undefined;
|
|
682
|
+
/** Radius of acceptance at the end of the line (m). The mission default when 0. */
|
|
683
|
+
circleOfAcceptance: number;
|
|
684
|
+
}
|
|
685
|
+
/** RelativeDepthCommand changes the depth by an amount from where the drone is when it starts. */
|
|
686
|
+
export interface RelativeDepthCommand {
|
|
687
|
+
/** Change in depth (m); positive is deeper, negative shallower. */
|
|
688
|
+
depthChange: number;
|
|
689
|
+
/** Desired speed to the new depth (m/s). The mission default when 0. */
|
|
690
|
+
speedToDepth: number;
|
|
691
|
+
}
|
|
692
|
+
/** CruiseSpeedCommand changes the cruise speed used by the following instructions of the mission. */
|
|
693
|
+
export interface CruiseSpeedCommand {
|
|
694
|
+
/** Desired surge speed (m/s). Must be greater than zero. */
|
|
695
|
+
cruiseSpeed: number;
|
|
696
|
+
}
|
|
252
697
|
/**
|
|
253
698
|
* A SurveyCommand defines a survey (lawn-mower) pattern over a polygon area.
|
|
254
699
|
* The planner generates waypoints from the polygon + parameters and stores them
|
|
@@ -284,7 +729,11 @@ export interface SurveyCommand {
|
|
|
284
729
|
circleOfAcceptance: number;
|
|
285
730
|
/** Optional depth set point for all generated waypoints. */
|
|
286
731
|
depthSetPoint: DepthSetPoint | undefined;
|
|
287
|
-
/**
|
|
732
|
+
/**
|
|
733
|
+
* The planner generated the pattern in reverse, from its last scan line to its first.
|
|
734
|
+
* The waypoints are already in that order: the drone flies them as given, and
|
|
735
|
+
* the planner reads this back to rebuild the pattern.
|
|
736
|
+
*/
|
|
288
737
|
reverse: boolean;
|
|
289
738
|
/**
|
|
290
739
|
* Pre-computed waypoints generated by the planner from the polygon and parameters.
|
|
@@ -356,7 +805,7 @@ export interface MissionStatus {
|
|
|
356
805
|
estimatedTimeToComplete: number;
|
|
357
806
|
/** Distance left of the mission (m). */
|
|
358
807
|
distanceToComplete: number;
|
|
359
|
-
/** Ids of the completed instructions. */
|
|
808
|
+
/** Ids of the completed instructions, skipped ones included. */
|
|
360
809
|
completedInstructionIds: number[];
|
|
361
810
|
/** Total number of instructions in the mission. */
|
|
362
811
|
totalNumberOfInstructions: number;
|
|
@@ -366,12 +815,70 @@ export interface MissionStatus {
|
|
|
366
815
|
totalNumberOfPathSegments: number;
|
|
367
816
|
/** Mission id of the active mission. */
|
|
368
817
|
id: number;
|
|
818
|
+
/** Id of the instruction that is running, not set when none. */
|
|
819
|
+
activeInstructionId?: number | undefined;
|
|
820
|
+
/** Revision of the loaded mission, see Mission.revision. */
|
|
821
|
+
revision: number;
|
|
822
|
+
/** Why the mission failed to load or start or was aborted by the drone. */
|
|
823
|
+
failureReason: string;
|
|
824
|
+
/** Mission.uuid of the loaded mission. */
|
|
825
|
+
uuid: string;
|
|
826
|
+
/**
|
|
827
|
+
* How the last mission run ended. It stays when the mission is cleared or another one is loaded, is
|
|
828
|
+
* replaced when a run ends again, including one resumed after an abort, and is lost when the drone restarts.
|
|
829
|
+
*/
|
|
830
|
+
lastOutcome: MissionOutcome | undefined;
|
|
831
|
+
/** Mission.load_id of the loaded mission, 0 when none. */
|
|
832
|
+
loadId: number;
|
|
833
|
+
}
|
|
834
|
+
/** How a mission run ended, kept after the mission is cleared so a client that reconnects can tell. */
|
|
835
|
+
export interface MissionOutcome {
|
|
836
|
+
/** How the run ended. */
|
|
837
|
+
result: MissionResult;
|
|
838
|
+
/** Mission.id of the mission. */
|
|
839
|
+
missionId: number;
|
|
840
|
+
/** Mission.uuid of the mission. */
|
|
841
|
+
missionUuid: string;
|
|
842
|
+
/** Mission.revision when the run ended. */
|
|
843
|
+
revision: number;
|
|
844
|
+
/** Id of the instruction that was running when it ended, not set when none. */
|
|
845
|
+
instructionId?: number | undefined;
|
|
846
|
+
/** Why the drone aborted the mission. */
|
|
847
|
+
abortReason: MissionAbortReason;
|
|
848
|
+
/** Why the drone aborted the mission, as text. */
|
|
849
|
+
reason: string;
|
|
850
|
+
/** When the run ended, by the drone's clock. */
|
|
851
|
+
endTime: Date | undefined;
|
|
852
|
+
/** Ids of the instructions the run skipped. */
|
|
853
|
+
skippedInstructionIds: number[];
|
|
854
|
+
/** Mission.load_id of the mission. */
|
|
855
|
+
loadId: number;
|
|
856
|
+
}
|
|
857
|
+
/** Result of an instruction started with RunInstructionCtrl. */
|
|
858
|
+
export interface InstructionResult {
|
|
859
|
+
/** The request_id given to RunInstructionCtrl. */
|
|
860
|
+
requestId: number;
|
|
861
|
+
/** Id of the instruction, as given by the client. */
|
|
862
|
+
instructionId: number;
|
|
863
|
+
/** Outcome so far. */
|
|
864
|
+
state: InstructionResultState;
|
|
865
|
+
/** Why the instruction was rejected, failed or was cancelled (optional). */
|
|
866
|
+
reason: string;
|
|
369
867
|
}
|
|
370
868
|
export declare const Mission: MessageFns<Mission>;
|
|
371
869
|
export declare const Instruction: MessageFns<Instruction>;
|
|
372
870
|
export declare const DepthSetPoint: MessageFns<DepthSetPoint>;
|
|
373
871
|
export declare const Waypoint: MessageFns<Waypoint>;
|
|
374
872
|
export declare const ControlModeCommand: MessageFns<ControlModeCommand>;
|
|
873
|
+
export declare const DetectionTrigger: MessageFns<DetectionTrigger>;
|
|
874
|
+
export declare const DepthTrigger: MessageFns<DepthTrigger>;
|
|
875
|
+
export declare const AltitudeTrigger: MessageFns<AltitudeTrigger>;
|
|
876
|
+
export declare const LocationTrigger: MessageFns<LocationTrigger>;
|
|
877
|
+
export declare const Trigger: MessageFns<Trigger>;
|
|
878
|
+
export declare const MissionRule: MessageFns<MissionRule>;
|
|
879
|
+
export declare const MissionRuleStatus: MessageFns<MissionRuleStatus>;
|
|
880
|
+
export declare const TriggerStatus: MessageFns<TriggerStatus>;
|
|
881
|
+
export declare const InsertInstruction: MessageFns<InsertInstruction>;
|
|
375
882
|
export declare const WaypointCommand: MessageFns<WaypointCommand>;
|
|
376
883
|
export declare const DepthSetPointCommand: MessageFns<DepthSetPointCommand>;
|
|
377
884
|
export declare const TiltMainCameraCommand: MessageFns<TiltMainCameraCommand>;
|
|
@@ -381,10 +888,24 @@ export declare const CameraCommand: MessageFns<CameraCommand>;
|
|
|
381
888
|
export declare const GoToSurfaceCommand: MessageFns<GoToSurfaceCommand>;
|
|
382
889
|
export declare const GoToSeabedCommand: MessageFns<GoToSeabedCommand>;
|
|
383
890
|
export declare const GoToHomeCommand: MessageFns<GoToHomeCommand>;
|
|
891
|
+
export declare const RecordMultibeamCommand: MessageFns<RecordMultibeamCommand>;
|
|
892
|
+
export declare const ActivateMultibeamCommand: MessageFns<ActivateMultibeamCommand>;
|
|
893
|
+
export declare const MultibeamConfigCommand: MessageFns<MultibeamConfigCommand>;
|
|
894
|
+
export declare const LightsCommand: MessageFns<LightsCommand>;
|
|
895
|
+
export declare const LaserCommand: MessageFns<LaserCommand>;
|
|
896
|
+
export declare const TiltStabilizationCommand: MessageFns<TiltStabilizationCommand>;
|
|
897
|
+
export declare const CvModelStateCommand: MessageFns<CvModelStateCommand>;
|
|
898
|
+
export declare const AnnotationCommand: MessageFns<AnnotationCommand>;
|
|
899
|
+
export declare const HeadingCommand: MessageFns<HeadingCommand>;
|
|
900
|
+
export declare const TransectCommand: MessageFns<TransectCommand>;
|
|
901
|
+
export declare const RelativeDepthCommand: MessageFns<RelativeDepthCommand>;
|
|
902
|
+
export declare const CruiseSpeedCommand: MessageFns<CruiseSpeedCommand>;
|
|
384
903
|
export declare const SurveyCommand: MessageFns<SurveyCommand>;
|
|
385
904
|
export declare const PathSegment: MessageFns<PathSegment>;
|
|
386
905
|
export declare const ReferenceAutoPilot: MessageFns<ReferenceAutoPilot>;
|
|
387
906
|
export declare const MissionStatus: MessageFns<MissionStatus>;
|
|
907
|
+
export declare const MissionOutcome: MessageFns<MissionOutcome>;
|
|
908
|
+
export declare const InstructionResult: MessageFns<InstructionResult>;
|
|
388
909
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
389
910
|
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
390
911
|
[K in keyof T]?: DeepPartial<T[K]>;
|