@blueyerobotics/protocol-definitions 3.4.0-618bf0b0 → 3.4.0-eddb8a5e

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/req_rep.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  import { Any } from "./google/protobuf/any.js";
3
- import { Battery, Camera, CameraParameters, ClientInfo, ConnectedClient, CvModelInfo, HeadingMode, MultibeamColorFilter, OverlayParameters, PersistentStorageSettings, SystemTime } from "./message_formats.js";
3
+ import { Battery, Camera, CameraParameters, ClientInfo, ConnectedClient, CvModelInfo, HeadingMode, MultibeamColorFilter, OverlayParameters, PersistentStorageSettings, StorageLocation, SystemTime } from "./message_formats.js";
4
4
  import { Instruction, Mission } from "./mission_planning.js";
5
+ import { SlamRecordingState, SlamRequestError, SlamSensorSettings } from "./slam.js";
5
6
  /**
6
7
  * Request reply
7
8
  *
@@ -191,6 +192,26 @@ export interface SetLogFrequencyRep {
191
192
  /** True if message name valid and frequency successfully updated. */
192
193
  success: boolean;
193
194
  }
195
+ /** Request to reset the publishing frequency of a message to the drone's default. */
196
+ export interface ResetPubFrequencyReq {
197
+ /** Message name, f. ex. "AttitudeTel"; empty resets every message. */
198
+ messageType: string;
199
+ }
200
+ /** Response after resetting the publishing frequency. */
201
+ export interface ResetPubFrequencyRep {
202
+ /** True if the message name was valid and its frequency reset. */
203
+ success: boolean;
204
+ }
205
+ /** Request to reset the logging frequency of a message to the drone's default. */
206
+ export interface ResetLogFrequencyReq {
207
+ /** Message name, f. ex. "AttitudeTel"; empty resets every message. */
208
+ messageType: string;
209
+ }
210
+ /** Response after resetting the logging frequency. */
211
+ export interface ResetLogFrequencyRep {
212
+ /** True if the message name was valid and its frequency reset. */
213
+ success: boolean;
214
+ }
194
215
  /** Request to get latest telemetry data */
195
216
  export interface GetTelemetryReq {
196
217
  /** Message name, f. ex. "AttitudeTel". */
@@ -297,6 +318,138 @@ export interface GetMultibeamColorFilterRep {
297
318
  /** The current color filter. Empty rgb means none is set (grayscale). */
298
319
  colorFilter: MultibeamColorFilter | undefined;
299
320
  }
321
+ /**
322
+ * Request to catch up on the SLAM map.
323
+ *
324
+ * Nothing comes in the reply but what is coming: the SLAM publishes it on its own
325
+ * publisher, to the clients subscribed there. The SLAM keeps its latest map
326
+ * updates: when map_id is the current map and the updates after have_sequence are
327
+ * still kept, it publishes those again (SlamMapUpdateTel, as they were, so a client
328
+ * that has them already skips them by their sequence); otherwise it publishes the
329
+ * whole map (SlamMapTel, in parts when it is large).
330
+ */
331
+ export interface GetSlamMapReq {
332
+ /** The map the client holds; 0 when it holds none. */
333
+ mapId: number;
334
+ /** The sequence of the last update the client applied to that map. */
335
+ haveSequence: number;
336
+ }
337
+ /** Response after asking to catch up on the SLAM map: what is published for it. */
338
+ export interface GetSlamMapRep {
339
+ /** True if the SLAM is running and answered. */
340
+ available: boolean;
341
+ /** The current map (0 when the SLAM has no map). */
342
+ mapId: number;
343
+ /**
344
+ * The client has the map at this sequence once it has what is published. The whole map may be one
345
+ * made earlier (its parts say their sequence): the updates after it are published again after it.
346
+ */
347
+ sequence: number;
348
+ /**
349
+ * The updates from from_sequence to sequence are published again (none when from_sequence is past
350
+ * sequence: the client has the map already).
351
+ */
352
+ fromSequence?: number | undefined;
353
+ /** The whole map is published, in this many SlamMapTel parts. */
354
+ partCount?: number | undefined;
355
+ }
356
+ /** Request to discard the SLAM map and start a new one from the current pose. */
357
+ export interface ResetSlamReq {
358
+ /**
359
+ * The map to discard: the SLAM resets only if it is still the current map, so that two clients
360
+ * asking at once start one new map, not two. 0 (map ids never are): only if the SLAM has no map yet.
361
+ */
362
+ mapId: number;
363
+ }
364
+ /** Response after resetting the SLAM map. */
365
+ export interface ResetSlamRep {
366
+ /** True if the SLAM is running and answered. */
367
+ available: boolean;
368
+ /**
369
+ * Identifier of the map now (the new one, or the current one when the request's map_id was not
370
+ * the current map's); 0 when the SLAM has no map yet (it starts one with its next scan).
371
+ */
372
+ mapId: number;
373
+ /** True if the map was discarded. */
374
+ reset: boolean;
375
+ /** Why the map was not discarded, when it was not. */
376
+ error: SlamRequestError;
377
+ }
378
+ /**
379
+ * Request to start or stop the SLAM.
380
+ *
381
+ * Starting switches the sensor on (for a sonar, its acoustics) and begins a new
382
+ * map from the current pose. Stopping switches the sensor off and keeps the map,
383
+ * so it can still be viewed. Asking for the state the SLAM is in already changes
384
+ * nothing (ResetSlamReq begins a new map). The SLAM reports its state in
385
+ * SlamStatusTel.
386
+ */
387
+ export interface SetSlamActiveReq {
388
+ /** True to start the SLAM, false to stop it. */
389
+ active: boolean;
390
+ }
391
+ /** Response after starting or stopping the SLAM. */
392
+ export interface SetSlamActiveRep {
393
+ /** True if the SLAM is running and answered. */
394
+ available: boolean;
395
+ /** True if the SLAM is now mapping (false if its sensor did not switch on). */
396
+ active: boolean;
397
+ /** Why the SLAM is not in the state asked for, when it is not. */
398
+ error: SlamRequestError;
399
+ }
400
+ /**
401
+ * Request to start or stop recording the SLAM.
402
+ *
403
+ * A recording needs the SLAM to be mapping, and stopping the SLAM stops it. It is
404
+ * stored with the drone's other media (picture, video and multibeam recordings).
405
+ * Like a multibeam recording it holds the drone's DroneInfoTel, at its start and
406
+ * when it changes, which names the dive log it belongs with (log_name).
407
+ * Asking for the state the recording is in already changes nothing.
408
+ */
409
+ export interface SetSlamRecordingReq {
410
+ /** True to start recording, false to stop. */
411
+ record: boolean;
412
+ /** Also the sensor's raw data, and the dive log faster, for running the SLAM offline. */
413
+ sensorData: boolean;
414
+ /** Where to store the recording. */
415
+ storageLocation: StorageLocation;
416
+ }
417
+ /** Response after starting or stopping a SLAM recording. */
418
+ export interface SetSlamRecordingRep {
419
+ /** True if the SLAM is running and answered. */
420
+ available: boolean;
421
+ /** The recording after the request. */
422
+ recording: SlamRecordingState | undefined;
423
+ /** Why the recording is not in the state asked for, when it is not. */
424
+ error: SlamRequestError;
425
+ }
426
+ /**
427
+ * Request to change the settings of a SLAM sensor.
428
+ *
429
+ * The settings go to the sensor named by sensor_id. Without one, they go to the
430
+ * SLAM's sensor of their kind when it has exactly one; with several, the request
431
+ * must name one (SLAM_REQUEST_ERROR_NO_SUCH_SENSOR otherwise). Settings left
432
+ * unspecified stay as they are. The map goes on at the resolution it was made
433
+ * with; the next new map (a start, or ResetSlamReq) takes the resolution the
434
+ * sensor's range then gives.
435
+ */
436
+ export interface SetSlamSensorSettingsReq {
437
+ /** The settings to change. */
438
+ settings: SlamSensorSettings | undefined;
439
+ /** The sensor to change (SlamSensor.id); empty: the SLAM's only sensor of the settings' kind. */
440
+ sensorId: string;
441
+ }
442
+ /** Response after changing the settings of a SLAM sensor. */
443
+ export interface SetSlamSensorSettingsRep {
444
+ /** True if the SLAM is running and answered. */
445
+ available: boolean;
446
+ /** True if the sensor took the settings. */
447
+ applied: boolean;
448
+ /** The sensor's settings after the request. */
449
+ settings: SlamSensorSettings | undefined;
450
+ /** Why the settings were not applied, when they were not. */
451
+ error: SlamRequestError;
452
+ }
300
453
  export declare const SetOverlayParametersReq: MessageFns<SetOverlayParametersReq>;
301
454
  export declare const SetOverlayParametersRep: MessageFns<SetOverlayParametersRep>;
302
455
  export declare const GetOverlayParametersReq: MessageFns<GetOverlayParametersReq>;
@@ -329,6 +482,10 @@ export declare const SetPubFrequencyReq: MessageFns<SetPubFrequencyReq>;
329
482
  export declare const SetPubFrequencyRep: MessageFns<SetPubFrequencyRep>;
330
483
  export declare const SetLogFrequencyReq: MessageFns<SetLogFrequencyReq>;
331
484
  export declare const SetLogFrequencyRep: MessageFns<SetLogFrequencyRep>;
485
+ export declare const ResetPubFrequencyReq: MessageFns<ResetPubFrequencyReq>;
486
+ export declare const ResetPubFrequencyRep: MessageFns<ResetPubFrequencyRep>;
487
+ export declare const ResetLogFrequencyReq: MessageFns<ResetLogFrequencyReq>;
488
+ export declare const ResetLogFrequencyRep: MessageFns<ResetLogFrequencyRep>;
332
489
  export declare const GetTelemetryReq: MessageFns<GetTelemetryReq>;
333
490
  export declare const GetTelemetryRep: MessageFns<GetTelemetryRep>;
334
491
  export declare const SetPersistentStorageSettingsReq: MessageFns<SetPersistentStorageSettingsReq>;
@@ -351,6 +508,16 @@ export declare const SetMultibeamColorFilterReq: MessageFns<SetMultibeamColorFil
351
508
  export declare const SetMultibeamColorFilterRep: MessageFns<SetMultibeamColorFilterRep>;
352
509
  export declare const GetMultibeamColorFilterReq: MessageFns<GetMultibeamColorFilterReq>;
353
510
  export declare const GetMultibeamColorFilterRep: MessageFns<GetMultibeamColorFilterRep>;
511
+ export declare const GetSlamMapReq: MessageFns<GetSlamMapReq>;
512
+ export declare const GetSlamMapRep: MessageFns<GetSlamMapRep>;
513
+ export declare const ResetSlamReq: MessageFns<ResetSlamReq>;
514
+ export declare const ResetSlamRep: MessageFns<ResetSlamRep>;
515
+ export declare const SetSlamActiveReq: MessageFns<SetSlamActiveReq>;
516
+ export declare const SetSlamActiveRep: MessageFns<SetSlamActiveRep>;
517
+ export declare const SetSlamRecordingReq: MessageFns<SetSlamRecordingReq>;
518
+ export declare const SetSlamRecordingRep: MessageFns<SetSlamRecordingRep>;
519
+ export declare const SetSlamSensorSettingsReq: MessageFns<SetSlamSensorSettingsReq>;
520
+ export declare const SetSlamSensorSettingsRep: MessageFns<SetSlamSensorSettingsRep>;
354
521
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
355
522
  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 {} ? {
356
523
  [K in keyof T]?: DeepPartial<T[K]>;