@blueyerobotics/protocol-definitions 3.4.0-8187f91a → 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 +2 -1
- package/dist/index.blueye.protocol.js +2 -1
- package/dist/message_formats.d.ts +104 -2
- package/dist/message_formats.js +353 -2
- package/dist/mission_planning.d.ts +526 -5
- package/dist/mission_planning.js +3098 -143
- package/dist/req_rep.d.ts +229 -5
- package/dist/req_rep.js +1780 -400
- package/dist/slam.d.ts +512 -0
- package/dist/slam.js +2427 -0
- package/dist/telemetry.d.ts +98 -1
- package/dist/telemetry.js +531 -1
- package/package.json +1 -1
package/dist/slam.d.ts
ADDED
|
@@ -0,0 +1,512 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
import { GuestPortDeviceID, PointCloud, Quaternion, StorageLocation, Vector3 } from "./message_formats.js";
|
|
3
|
+
/**
|
|
4
|
+
* SLAM
|
|
5
|
+
*
|
|
6
|
+
* The SLAM's (simultaneous localization and mapping) state, poses, map and
|
|
7
|
+
* sensors: what its telemetry (Slam*Tel in telemetry.proto) and its requests
|
|
8
|
+
* (in req_rep.proto) carry.
|
|
9
|
+
*
|
|
10
|
+
* The SLAM has its own publisher, not the drone's telemetry socket: a client
|
|
11
|
+
* subscribes to it on the drone at TCP port 5561 (WebSocket 9989) to get the
|
|
12
|
+
* Slam*Tel messages. Its requests (GetSlamMapReq, ResetSlamReq,
|
|
13
|
+
* SetSlamActiveReq, SetSlamSensorSettingsReq, SetSlamRecordingReq) go to the
|
|
14
|
+
* drone's request server as other requests do, which forwards them to the
|
|
15
|
+
* SLAM's (TCP 5562, WebSocket 9990).
|
|
16
|
+
*
|
|
17
|
+
* These messages change only by addition: new fields, messages, enum values and
|
|
18
|
+
* oneof members, never a field renumbered, retyped or given another meaning (CI
|
|
19
|
+
* checks the numbers and types, ci-buf.yaml). A client ignores what it does not
|
|
20
|
+
* know: an enum value as UNSPECIFIED, a oneof set to a member it does not know as
|
|
21
|
+
* unset (a submap with such content keeps its id and anchor and shows nothing),
|
|
22
|
+
* and fields it does not know. Packed bytes (PointCloud, SlamKeyframePoses) keep
|
|
23
|
+
* their layout: more data per point or per pose comes in a field of its own, with
|
|
24
|
+
* the same count.
|
|
25
|
+
*/
|
|
26
|
+
/** State of the SLAM (simultaneous localization and mapping). */
|
|
27
|
+
export declare enum SlamState {
|
|
28
|
+
/** SLAM_STATE_UNSPECIFIED - Unspecified. */
|
|
29
|
+
SLAM_STATE_UNSPECIFIED = 0,
|
|
30
|
+
/** SLAM_STATE_WAITING - Waiting for the first scan and orientation. */
|
|
31
|
+
SLAM_STATE_WAITING = 1,
|
|
32
|
+
/** SLAM_STATE_TRACKING - The latest scan was matched against the map. */
|
|
33
|
+
SLAM_STATE_TRACKING = 2,
|
|
34
|
+
/** SLAM_STATE_COASTING - The latest scan could not be matched; the pose follows the motion model. */
|
|
35
|
+
SLAM_STATE_COASTING = 3,
|
|
36
|
+
/**
|
|
37
|
+
* SLAM_STATE_LOST - Coasting long enough that the prediction may be far off: a scan is placed again only by a match
|
|
38
|
+
* that fixes the pose firmly.
|
|
39
|
+
*/
|
|
40
|
+
SLAM_STATE_LOST = 4,
|
|
41
|
+
UNRECOGNIZED = -1
|
|
42
|
+
}
|
|
43
|
+
export declare function slamStateFromJSON(object: any): SlamState;
|
|
44
|
+
export declare function slamStateToJSON(object: SlamState): string;
|
|
45
|
+
/** Kind of sensor a SLAM scan comes from. */
|
|
46
|
+
export declare enum SlamSensorType {
|
|
47
|
+
/** SLAM_SENSOR_TYPE_UNSPECIFIED - Unspecified. */
|
|
48
|
+
SLAM_SENSOR_TYPE_UNSPECIFIED = 0,
|
|
49
|
+
/** SLAM_SENSOR_TYPE_SONAR_3D - A 3D imaging sonar, e.g. the Water Linked Sonar 3D-15. */
|
|
50
|
+
SLAM_SENSOR_TYPE_SONAR_3D = 1,
|
|
51
|
+
/** SLAM_SENSOR_TYPE_STEREO_CAMERA - A stereo camera's depth. */
|
|
52
|
+
SLAM_SENSOR_TYPE_STEREO_CAMERA = 2,
|
|
53
|
+
UNRECOGNIZED = -1
|
|
54
|
+
}
|
|
55
|
+
export declare function slamSensorTypeFromJSON(object: any): SlamSensorType;
|
|
56
|
+
export declare function slamSensorTypeToJSON(object: SlamSensorType): string;
|
|
57
|
+
/** What the SLAM's poses are the poses of: its platform. */
|
|
58
|
+
export declare enum SlamPlatform {
|
|
59
|
+
/** SLAM_PLATFORM_UNSPECIFIED - Not known. */
|
|
60
|
+
SLAM_PLATFORM_UNSPECIFIED = 0,
|
|
61
|
+
/**
|
|
62
|
+
* SLAM_PLATFORM_DRONE - The drone, its body frame x forward, y right, z down from the middle of the hull. Each
|
|
63
|
+
* sensor is on it through its mount (SlamPose mount in the messages that carry one).
|
|
64
|
+
*/
|
|
65
|
+
SLAM_PLATFORM_DRONE = 1,
|
|
66
|
+
/** SLAM_PLATFORM_SENSOR - The sensor itself: the SLAM did not know how the sensor is mounted. */
|
|
67
|
+
SLAM_PLATFORM_SENSOR = 2,
|
|
68
|
+
UNRECOGNIZED = -1
|
|
69
|
+
}
|
|
70
|
+
export declare function slamPlatformFromJSON(object: any): SlamPlatform;
|
|
71
|
+
export declare function slamPlatformToJSON(object: SlamPlatform): string;
|
|
72
|
+
/** Frequency mode of a 3D imaging sonar. */
|
|
73
|
+
export declare enum Sonar3dFrequencyMode {
|
|
74
|
+
/** SONAR_3D_FREQUENCY_MODE_UNSPECIFIED - Unspecified: left as it is. */
|
|
75
|
+
SONAR_3D_FREQUENCY_MODE_UNSPECIFIED = 0,
|
|
76
|
+
/** SONAR_3D_FREQUENCY_MODE_LOW - Wide view, long range (3D-15: 90° x 40°, 15 m, 5 scans/s). */
|
|
77
|
+
SONAR_3D_FREQUENCY_MODE_LOW = 1,
|
|
78
|
+
/** SONAR_3D_FREQUENCY_MODE_HIGH - Narrow view, short range, fine detail (3D-15: 40° x 40°, 4 m, 20 scans/s). */
|
|
79
|
+
SONAR_3D_FREQUENCY_MODE_HIGH = 2,
|
|
80
|
+
UNRECOGNIZED = -1
|
|
81
|
+
}
|
|
82
|
+
export declare function sonar3dFrequencyModeFromJSON(object: any): Sonar3dFrequencyMode;
|
|
83
|
+
export declare function sonar3dFrequencyModeToJSON(object: Sonar3dFrequencyMode): string;
|
|
84
|
+
/** Why the SLAM did not do what a request asked (the reply says what it did do). */
|
|
85
|
+
export declare enum SlamRequestError {
|
|
86
|
+
/** SLAM_REQUEST_ERROR_UNSPECIFIED - None: the request was done, or asked for what already was. */
|
|
87
|
+
SLAM_REQUEST_ERROR_UNSPECIFIED = 0,
|
|
88
|
+
/** SLAM_REQUEST_ERROR_NOT_READABLE - The request could not be read. */
|
|
89
|
+
SLAM_REQUEST_ERROR_NOT_READABLE = 1,
|
|
90
|
+
/** SLAM_REQUEST_ERROR_OTHER_MAP - The request named a map that is not the current one. */
|
|
91
|
+
SLAM_REQUEST_ERROR_OTHER_MAP = 2,
|
|
92
|
+
/** SLAM_REQUEST_ERROR_NO_SUCH_SENSOR - The request named a sensor the SLAM does not have, or named none where it has several that fit. */
|
|
93
|
+
SLAM_REQUEST_ERROR_NO_SUCH_SENSOR = 3,
|
|
94
|
+
/** SLAM_REQUEST_ERROR_SENSOR - The sensor did not take it (it did not answer, or refused). */
|
|
95
|
+
SLAM_REQUEST_ERROR_SENSOR = 4,
|
|
96
|
+
/** SLAM_REQUEST_ERROR_BUSY - Another change to the sensor is under way; ask again after it. */
|
|
97
|
+
SLAM_REQUEST_ERROR_BUSY = 5,
|
|
98
|
+
/** SLAM_REQUEST_ERROR_NOT_MAPPING - It needs the SLAM to be mapping (a recording). */
|
|
99
|
+
SLAM_REQUEST_ERROR_NOT_MAPPING = 6,
|
|
100
|
+
/** SLAM_REQUEST_ERROR_STORAGE - No storage to record to, or it is full. */
|
|
101
|
+
SLAM_REQUEST_ERROR_STORAGE = 7,
|
|
102
|
+
/** SLAM_REQUEST_ERROR_NOT_SUPPORTED - The SLAM or its sensor cannot do it. */
|
|
103
|
+
SLAM_REQUEST_ERROR_NOT_SUPPORTED = 8,
|
|
104
|
+
UNRECOGNIZED = -1
|
|
105
|
+
}
|
|
106
|
+
export declare function slamRequestErrorFromJSON(object: any): SlamRequestError;
|
|
107
|
+
export declare function slamRequestErrorToJSON(object: SlamRequestError): string;
|
|
108
|
+
/** Where the SLAM's orientation comes from. */
|
|
109
|
+
export declare enum SlamOrientationSource {
|
|
110
|
+
/** SLAM_ORIENTATION_SOURCE_UNSPECIFIED - None: the scans are matched without an orientation. */
|
|
111
|
+
SLAM_ORIENTATION_SOURCE_UNSPECIFIED = 0,
|
|
112
|
+
/** SLAM_ORIENTATION_SOURCE_SENSOR_IMU - The sensor's own IMU. */
|
|
113
|
+
SLAM_ORIENTATION_SOURCE_SENSOR_IMU = 1,
|
|
114
|
+
/** SLAM_ORIENTATION_SOURCE_DRONE_ATTITUDE - The drone's attitude, its heading from the compass. */
|
|
115
|
+
SLAM_ORIENTATION_SOURCE_DRONE_ATTITUDE = 2,
|
|
116
|
+
/** SLAM_ORIENTATION_SOURCE_DRONE_GYRO - The drone's attitude for roll and pitch, its turn from the drone's calibrated gyro (not the compass). */
|
|
117
|
+
SLAM_ORIENTATION_SOURCE_DRONE_GYRO = 3,
|
|
118
|
+
UNRECOGNIZED = -1
|
|
119
|
+
}
|
|
120
|
+
export declare function slamOrientationSourceFromJSON(object: any): SlamOrientationSource;
|
|
121
|
+
export declare function slamOrientationSourceToJSON(object: SlamOrientationSource): string;
|
|
122
|
+
/** What the x axis of a SLAM map's frame points along. */
|
|
123
|
+
export declare enum SlamHeadingReference {
|
|
124
|
+
/** SLAM_HEADING_REFERENCE_UNSPECIFIED - Not known. */
|
|
125
|
+
SLAM_HEADING_REFERENCE_UNSPECIFIED = 0,
|
|
126
|
+
/**
|
|
127
|
+
* SLAM_HEADING_REFERENCE_FIRST_SCAN - The platform's heading at the map's first scan; without gravity alignment, the
|
|
128
|
+
* platform's frame at the first scan as it is.
|
|
129
|
+
*/
|
|
130
|
+
SLAM_HEADING_REFERENCE_FIRST_SCAN = 1,
|
|
131
|
+
/** SLAM_HEADING_REFERENCE_DRONE_COMPASS - North, as the drone's compass heading (AttitudeTel yaw) gave it at the map's first scan. */
|
|
132
|
+
SLAM_HEADING_REFERENCE_DRONE_COMPASS = 2,
|
|
133
|
+
UNRECOGNIZED = -1
|
|
134
|
+
}
|
|
135
|
+
export declare function slamHeadingReferenceFromJSON(object: any): SlamHeadingReference;
|
|
136
|
+
export declare function slamHeadingReferenceToJSON(object: SlamHeadingReference): string;
|
|
137
|
+
/** A sensor whose scans feed the SLAM, and its field of view. */
|
|
138
|
+
export interface SlamSensor {
|
|
139
|
+
/**
|
|
140
|
+
* Sensor id, unique among the SLAM's sensors. A sensor keeps the id it was given for as long as it
|
|
141
|
+
* is connected, whatever other sensors connect or disconnect: the model's (e.g.
|
|
142
|
+
* "waterlinked-sonar-3d15") when no other sensor of that model is connected, and else the model's with
|
|
143
|
+
* the guest port the sensor is on added (e.g. "waterlinked-sonar-3d15-gp2").
|
|
144
|
+
*/
|
|
145
|
+
id: string;
|
|
146
|
+
/** Kind of sensor. */
|
|
147
|
+
sensorType: SlamSensorType;
|
|
148
|
+
/** Horizontal field of view, about the sensor's z axis (°). */
|
|
149
|
+
fovHorizontal: number;
|
|
150
|
+
/** Vertical field of view, about the sensor's y axis (°). */
|
|
151
|
+
fovVertical: number;
|
|
152
|
+
/** Range the sensor is set to (m). */
|
|
153
|
+
maxRange: number;
|
|
154
|
+
/**
|
|
155
|
+
* The sensor as a guest port device (e.g. GUEST_PORT_DEVICE_ID_WATERLINKED_SONAR_3D15), for a client
|
|
156
|
+
* to show the device itself; GUEST_PORT_DEVICE_ID_UNSPECIFIED when it is not one (a simulated sensor).
|
|
157
|
+
*/
|
|
158
|
+
deviceId: GuestPortDeviceID;
|
|
159
|
+
/** True if the sensor is simulated (its scans are made up, for testing). */
|
|
160
|
+
simulated: boolean;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* A recording of the SLAM, as the SLAM reports it.
|
|
164
|
+
*
|
|
165
|
+
* A recording is a .sbez file (a binlog) with the SLAM's output: the map at its
|
|
166
|
+
* start, then the poses, the map updates and the status. It may hold several maps
|
|
167
|
+
* (a reset, or a new mode, starts one), and each map it holds ends with the whole
|
|
168
|
+
* map (SlamMapTel, in parts when it is large). With sensor data it also has the
|
|
169
|
+
* sensor's raw data beside it (for a 3D sonar a .sonar file), and the drone's dive
|
|
170
|
+
* log logs its telemetry at higher rates while it runs, so the SLAM can be run
|
|
171
|
+
* again on both without the drone.
|
|
172
|
+
*/
|
|
173
|
+
export interface SlamRecordingState {
|
|
174
|
+
/** True while recording. */
|
|
175
|
+
isRecording: boolean;
|
|
176
|
+
/** File name of the .sbez, without its folder. */
|
|
177
|
+
name: string;
|
|
178
|
+
/** Time recorded (s). */
|
|
179
|
+
seconds: number;
|
|
180
|
+
/** Size of the recording's files so far (bytes). */
|
|
181
|
+
size: number;
|
|
182
|
+
/** True if the sensor's raw data is recorded too. */
|
|
183
|
+
sensorData: boolean;
|
|
184
|
+
/** Where the recording is stored. */
|
|
185
|
+
storageLocation: StorageLocation;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Settings of a 3D imaging sonar that feeds the SLAM.
|
|
189
|
+
*
|
|
190
|
+
* In a request, unspecified or 0 leaves a setting as it is; in a report, it
|
|
191
|
+
* means the sonar does not say (e.g. a firmware without frequency modes).
|
|
192
|
+
*/
|
|
193
|
+
export interface SlamSonar3dSettings {
|
|
194
|
+
/** Frequency mode. */
|
|
195
|
+
frequencyMode: Sonar3dFrequencyMode;
|
|
196
|
+
/** Maximum range (m). */
|
|
197
|
+
maxRange: number;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Settings of a sensor that feeds the SLAM.
|
|
201
|
+
*
|
|
202
|
+
* One message for each kind of sensor, so a client shows the settings of the
|
|
203
|
+
* sensors the SLAM has, and a sensor takes only its own.
|
|
204
|
+
*/
|
|
205
|
+
export interface SlamSensorSettings {
|
|
206
|
+
/** A 3D imaging sonar's settings. */
|
|
207
|
+
sonar3d?: SlamSonar3dSettings | undefined;
|
|
208
|
+
}
|
|
209
|
+
/** A sensor that feeds the SLAM, as the SLAM reports it. */
|
|
210
|
+
export interface SlamSensorStatus {
|
|
211
|
+
/** The sensor, as its latest scan described it (before its first scan, its id and type only). */
|
|
212
|
+
sensor: SlamSensor | undefined;
|
|
213
|
+
/** The sensor's settings, unset when it has none or they cannot be read. */
|
|
214
|
+
settings: SlamSensorSettings | undefined;
|
|
215
|
+
/**
|
|
216
|
+
* The sensor's pose on the platform now: its mount, at the mount's tilt now. Unset when the
|
|
217
|
+
* platform is the sensor.
|
|
218
|
+
*/
|
|
219
|
+
mount: SlamPose | undefined;
|
|
220
|
+
/** Tilt of the sensor's mount (°, positive up), for a mount that tilts. */
|
|
221
|
+
mountTilt?: number | undefined;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* A pose: of a body in the SLAM map frame, or of a sensor on the platform.
|
|
225
|
+
*
|
|
226
|
+
* The map frame is fixed where the map was started (see SlamMapFrame): z down, x
|
|
227
|
+
* along the heading the map started with (north when a compass heading was used),
|
|
228
|
+
* y to the right of it, in metres. The body is the one the field names (the
|
|
229
|
+
* platform, or a sensor), its frame x forward, y right, z down. A mount is a
|
|
230
|
+
* sensor's pose in the platform's frame instead: the sensor is in the map at the
|
|
231
|
+
* platform's pose times its mount.
|
|
232
|
+
*/
|
|
233
|
+
export interface SlamPose {
|
|
234
|
+
/** Position of the body (m). */
|
|
235
|
+
position: Vector3 | undefined;
|
|
236
|
+
/** Rotation from the body's frame to the frame it is placed in. */
|
|
237
|
+
orientation: Quaternion | undefined;
|
|
238
|
+
}
|
|
239
|
+
/** The SLAM estimate of its platform's pose, published for every scan. */
|
|
240
|
+
export interface SlamPoseEstimate {
|
|
241
|
+
/** Identifier of the map; a new one is chosen whenever the map restarts. */
|
|
242
|
+
mapId: number;
|
|
243
|
+
/** State of the SLAM. */
|
|
244
|
+
state: SlamState;
|
|
245
|
+
/** Pose of the platform (SlamMapFrame.platform) at the scan. */
|
|
246
|
+
pose: SlamPose | undefined;
|
|
247
|
+
/** Host time the scan was received. */
|
|
248
|
+
time: Date | undefined;
|
|
249
|
+
/** Points (or cells) of the scan used for matching. */
|
|
250
|
+
scanPoints: number;
|
|
251
|
+
/** Share of those matched to the map (0..1). */
|
|
252
|
+
matchInlierRatio: number;
|
|
253
|
+
/**
|
|
254
|
+
* Root mean square residual of the matched points against the map (m); for a 3D sonar, their distance to the
|
|
255
|
+
* map's planes.
|
|
256
|
+
*/
|
|
257
|
+
matchRms: number;
|
|
258
|
+
/** Keyframes in the map. */
|
|
259
|
+
keyframeCount: number;
|
|
260
|
+
/** Points (or cells) in the map. */
|
|
261
|
+
mapPointCount: number;
|
|
262
|
+
/**
|
|
263
|
+
* Depth used for the scan (m), when there was one: the sensor's, from the drone's depth sensor
|
|
264
|
+
* through the mount (without a mount, the depth sensor's own).
|
|
265
|
+
*/
|
|
266
|
+
depth?: number | undefined;
|
|
267
|
+
/** Sensor whose scan was placed (SlamSensor.id). */
|
|
268
|
+
sensorId: string;
|
|
269
|
+
/**
|
|
270
|
+
* The sensor's pose on the platform at the scan: the sensor was at pose times mount.
|
|
271
|
+
* Unset when the platform is the sensor.
|
|
272
|
+
*/
|
|
273
|
+
mount: SlamPose | undefined;
|
|
274
|
+
/**
|
|
275
|
+
* Covariance of pose as the scan's match placed it against the map, given the
|
|
276
|
+
* prediction: 6 x 6, row by row, of a rotation about the map's x, y and z axes
|
|
277
|
+
* (rad) and then a position along them (m). It says how well this scan fixed the
|
|
278
|
+
* pose, not how far the map has drifted. Empty when the match gave none: the scan was not matched,
|
|
279
|
+
* the map's first scan (nothing to match it against), or a fit whose covariance was not finite.
|
|
280
|
+
*/
|
|
281
|
+
covarianceElements: number[];
|
|
282
|
+
/**
|
|
283
|
+
* The newest keyframe when the scan was placed (SlamKeyframe.id), 0 before the map's first. A client
|
|
284
|
+
* keeping poses can move one with that keyframe when a loop closure moves it: the pose becomes the
|
|
285
|
+
* keyframe's new pose times its pose then, inverted, times the pose.
|
|
286
|
+
*/
|
|
287
|
+
keyframeId: number;
|
|
288
|
+
}
|
|
289
|
+
/** A keyframe: a scan kept in the map, the nodes of the SLAM trajectory. */
|
|
290
|
+
export interface SlamKeyframe {
|
|
291
|
+
/** Keyframe id, increasing along the trajectory. */
|
|
292
|
+
id: number;
|
|
293
|
+
/** Submap whose points the keyframe added to. */
|
|
294
|
+
submapId: number;
|
|
295
|
+
/** Pose of the platform at the keyframe. It moves when the trajectory is corrected. */
|
|
296
|
+
pose: SlamPose | undefined;
|
|
297
|
+
/** Host time the keyframe's scan was received. */
|
|
298
|
+
time: Date | undefined;
|
|
299
|
+
/** Sensor whose scan the keyframe is (SlamSensor.id). */
|
|
300
|
+
sensorId: string;
|
|
301
|
+
/** The sensor's pose on the platform at the keyframe. Unset when the platform is the sensor. */
|
|
302
|
+
mount: SlamPose | undefined;
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* A submap: part of the map from one sensor, in the platform's frame at its anchor
|
|
306
|
+
* keyframe.
|
|
307
|
+
*
|
|
308
|
+
* A submap moves rigidly with its anchor keyframe, so a correction of the
|
|
309
|
+
* trajectory moves its content without sending it again. A submap holds one kind
|
|
310
|
+
* of content: points today; other kinds (e.g. a 2D sonar's mosaic) will be added
|
|
311
|
+
* to the oneof, each saying how a later one replaces what the submap holds.
|
|
312
|
+
*/
|
|
313
|
+
export interface SlamSubmap {
|
|
314
|
+
/** Submap id. */
|
|
315
|
+
submapId: number;
|
|
316
|
+
/** Keyframe whose platform frame the content is in. */
|
|
317
|
+
anchorKeyframeId: number;
|
|
318
|
+
/** Sensor the content comes from (SlamSensor.id). */
|
|
319
|
+
sensorId: string;
|
|
320
|
+
/**
|
|
321
|
+
* Points in the platform's frame at the anchor keyframe. In a map update they are appended to the
|
|
322
|
+
* submap's points, unless replace is set.
|
|
323
|
+
*/
|
|
324
|
+
points?: PointCloud | undefined;
|
|
325
|
+
/** Points: true if they replace the submap's points so far, rather than adding to them. */
|
|
326
|
+
replace: boolean;
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Poses of consecutive keyframes, packed: what a correction of the trajectory
|
|
330
|
+
* moved, sent without the rest of each keyframe.
|
|
331
|
+
*/
|
|
332
|
+
export interface SlamKeyframePoses {
|
|
333
|
+
/** Keyframe id of the first pose; the others follow it in id order. */
|
|
334
|
+
firstKeyframeId: number;
|
|
335
|
+
/**
|
|
336
|
+
* Platform poses as in SlamKeyframe.pose, 7 little-endian float32 each: x, y, z (m), then the
|
|
337
|
+
* orientation's x, y, z, w. 28 bytes per keyframe.
|
|
338
|
+
*/
|
|
339
|
+
poses: Uint8Array;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* A loop closure: a keyframe's scan matched to the map where the trajectory had
|
|
343
|
+
* been before, which corrected the trajectory. The keyframes the correction moved
|
|
344
|
+
* come in the same update, so a client that held the map before has the
|
|
345
|
+
* trajectory as it was.
|
|
346
|
+
*/
|
|
347
|
+
export interface SlamLoopClosure {
|
|
348
|
+
/** Keyframe whose scan closed the loop. */
|
|
349
|
+
keyframeId: number;
|
|
350
|
+
/** Earlier keyframe it was matched near. */
|
|
351
|
+
matchedKeyframeId: number;
|
|
352
|
+
/**
|
|
353
|
+
* How far the correction moved the newest keyframe it reached (m): the loop's keyframe, or one
|
|
354
|
+
* added while the loop was being closed.
|
|
355
|
+
*/
|
|
356
|
+
positionCorrection: number;
|
|
357
|
+
/**
|
|
358
|
+
* How far it turned that keyframe about the map's z axis (°, positive clockwise seen from
|
|
359
|
+
* above in a gravity-aligned map).
|
|
360
|
+
*/
|
|
361
|
+
headingCorrection: number;
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* A change to the SLAM map.
|
|
365
|
+
*
|
|
366
|
+
* Updates are numbered: a client that has the map at sequence N applies the
|
|
367
|
+
* update with sequence N + 1 next. When it misses one, or the map id changes, it
|
|
368
|
+
* asks to catch up (GetSlamMapReq): it gets the updates it missed again, or the
|
|
369
|
+
* whole map.
|
|
370
|
+
*/
|
|
371
|
+
export interface SlamMapUpdate {
|
|
372
|
+
/** Identifier of the map. */
|
|
373
|
+
mapId: number;
|
|
374
|
+
/** Sequence number of this update, from 1. */
|
|
375
|
+
sequence: number;
|
|
376
|
+
/** Keyframes added. */
|
|
377
|
+
keyframes: SlamKeyframe[];
|
|
378
|
+
/** Content added to submaps, or replacing a submap's (SlamSubmap.replace). */
|
|
379
|
+
submaps: SlamSubmap[];
|
|
380
|
+
/**
|
|
381
|
+
* The map's frame, on the update that adds the first keyframe and on any that
|
|
382
|
+
* learns more of it: a recording cut short has it without its last SlamMapTel.
|
|
383
|
+
*/
|
|
384
|
+
frame: SlamMapFrame | undefined;
|
|
385
|
+
/** Loop closures whose correction moved the keyframes. */
|
|
386
|
+
loopClosures: SlamLoopClosure[];
|
|
387
|
+
/** New poses of the keyframes a correction moved, in runs. */
|
|
388
|
+
movedPoses: SlamKeyframePoses[];
|
|
389
|
+
/** Submaps taken out of the map, with whatever they hold. */
|
|
390
|
+
removedSubmapIds: number[];
|
|
391
|
+
}
|
|
392
|
+
/** What other than its sensors the SLAM's estimate rests on now. */
|
|
393
|
+
export interface SlamAiding {
|
|
394
|
+
/** Where the orientation comes from. */
|
|
395
|
+
orientation: SlamOrientationSource;
|
|
396
|
+
/** True if a depth is used (from the drone's depth sensor). */
|
|
397
|
+
depth: boolean;
|
|
398
|
+
/** True if a velocity over the ground is used (a DVL with bottom lock). */
|
|
399
|
+
velocity: boolean;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* How a SLAM map's frame lies in the world, for placing the map on a chart.
|
|
403
|
+
*
|
|
404
|
+
* The frame is right-handed: x along the heading reference, y to its right, z
|
|
405
|
+
* down (north-east-down with SLAM_HEADING_REFERENCE_DRONE_COMPASS). The origin is
|
|
406
|
+
* the platform's position at the map's first scan. The map's heading may drift
|
|
407
|
+
* from its reference over a dive: placing a map on a chart fits it to the drone's
|
|
408
|
+
* positions (PositionEstimateTel in the dive log).
|
|
409
|
+
*/
|
|
410
|
+
export interface SlamMapFrame {
|
|
411
|
+
/** True if z is down and x and y level; false: the first scan's platform frame. */
|
|
412
|
+
gravityAligned: boolean;
|
|
413
|
+
/** What x points along. */
|
|
414
|
+
headingReference: SlamHeadingReference;
|
|
415
|
+
/**
|
|
416
|
+
* The magnetic declination the drone applied to its compass heading at the
|
|
417
|
+
* map's first scan (°, as MagneticDeclination.declination; 0 when it applied
|
|
418
|
+
* none), with SLAM_HEADING_REFERENCE_DRONE_COMPASS: x then points the place's
|
|
419
|
+
* declination less this east of true north (0 when the drone applied the
|
|
420
|
+
* place's). Unset when not known.
|
|
421
|
+
*/
|
|
422
|
+
magneticDeclination?: number | undefined;
|
|
423
|
+
/**
|
|
424
|
+
* Depth of the origin below the surface (m), for a gravity-aligned map: a point
|
|
425
|
+
* at z in the map is at depth origin_depth + z. Unset without a depth.
|
|
426
|
+
*/
|
|
427
|
+
originDepth?: number | undefined;
|
|
428
|
+
/** Host time of the map's first scan (its first keyframe's). */
|
|
429
|
+
startTime: Date | undefined;
|
|
430
|
+
/** What the map's poses are the poses of. */
|
|
431
|
+
platform: SlamPlatform;
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* The whole SLAM map, or a part of it.
|
|
435
|
+
*
|
|
436
|
+
* A large map comes in parts (part_count of them, in order), each a message of
|
|
437
|
+
* its own. Every part has the map's map_id, sequence and part_count, and its own
|
|
438
|
+
* part: a client groups parts by them, and drops a set whose parts disagree (one
|
|
439
|
+
* of another map or sequence, or missing). Every other field that is not repeated
|
|
440
|
+
* is set in the first part (part 0). A client has the map once it has every part,
|
|
441
|
+
* and puts them together field by field: every repeated field is the parts'
|
|
442
|
+
* concatenated in part order, and every other field is the first part's, whatever
|
|
443
|
+
* a later part has (proto3 does not tell a field set to its default from an unset
|
|
444
|
+
* one, so a client could not tell which part sets it).
|
|
445
|
+
* Which part carries which repeated values is up to the SLAM, but a submap is
|
|
446
|
+
* never split: each comes whole, in one part.
|
|
447
|
+
*/
|
|
448
|
+
export interface SlamMap {
|
|
449
|
+
/**
|
|
450
|
+
* Identifier of the map (0 when the SLAM has no map); a new one each time the map starts,
|
|
451
|
+
* unique while the SLAM runs.
|
|
452
|
+
*/
|
|
453
|
+
mapId: number;
|
|
454
|
+
/** Sequence number of the last update the map includes (0 for none). */
|
|
455
|
+
sequence: number;
|
|
456
|
+
/** Every keyframe, in id order. */
|
|
457
|
+
keyframes: SlamKeyframe[];
|
|
458
|
+
/** Submaps, with all they hold. */
|
|
459
|
+
submaps: SlamSubmap[];
|
|
460
|
+
/** How the map's frame lies in the world (unset before the first scan). */
|
|
461
|
+
frame: SlamMapFrame | undefined;
|
|
462
|
+
/** Every loop closure, in the order they were made. */
|
|
463
|
+
loopClosures: SlamLoopClosure[];
|
|
464
|
+
/** Index of this part, from 0. */
|
|
465
|
+
part: number;
|
|
466
|
+
/** Parts the map comes in (0 or 1: this message is the whole map). */
|
|
467
|
+
partCount: number;
|
|
468
|
+
}
|
|
469
|
+
/** The latest scan of a sensor, as the SLAM placed it. */
|
|
470
|
+
export interface SlamScan {
|
|
471
|
+
/** Identifier of the map. */
|
|
472
|
+
mapId: number;
|
|
473
|
+
/** Pose of the platform at the scan. */
|
|
474
|
+
pose: SlamPose | undefined;
|
|
475
|
+
/** Points of the scan in the sensor frame: in the map at pose times mount. */
|
|
476
|
+
points: PointCloud | undefined;
|
|
477
|
+
/** Sensor the scan comes from. */
|
|
478
|
+
sensor: SlamSensor | undefined;
|
|
479
|
+
/** The sensor's pose on the platform at the scan. Unset when the platform is the sensor. */
|
|
480
|
+
mount: SlamPose | undefined;
|
|
481
|
+
/** Host time the scan was received (as SlamPoseEstimate.time). */
|
|
482
|
+
time: Date | undefined;
|
|
483
|
+
}
|
|
484
|
+
export declare const SlamSensor: MessageFns<SlamSensor>;
|
|
485
|
+
export declare const SlamRecordingState: MessageFns<SlamRecordingState>;
|
|
486
|
+
export declare const SlamSonar3dSettings: MessageFns<SlamSonar3dSettings>;
|
|
487
|
+
export declare const SlamSensorSettings: MessageFns<SlamSensorSettings>;
|
|
488
|
+
export declare const SlamSensorStatus: MessageFns<SlamSensorStatus>;
|
|
489
|
+
export declare const SlamPose: MessageFns<SlamPose>;
|
|
490
|
+
export declare const SlamPoseEstimate: MessageFns<SlamPoseEstimate>;
|
|
491
|
+
export declare const SlamKeyframe: MessageFns<SlamKeyframe>;
|
|
492
|
+
export declare const SlamSubmap: MessageFns<SlamSubmap>;
|
|
493
|
+
export declare const SlamKeyframePoses: MessageFns<SlamKeyframePoses>;
|
|
494
|
+
export declare const SlamLoopClosure: MessageFns<SlamLoopClosure>;
|
|
495
|
+
export declare const SlamMapUpdate: MessageFns<SlamMapUpdate>;
|
|
496
|
+
export declare const SlamAiding: MessageFns<SlamAiding>;
|
|
497
|
+
export declare const SlamMapFrame: MessageFns<SlamMapFrame>;
|
|
498
|
+
export declare const SlamMap: MessageFns<SlamMap>;
|
|
499
|
+
export declare const SlamScan: MessageFns<SlamScan>;
|
|
500
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
501
|
+
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 {} ? {
|
|
502
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
503
|
+
} : Partial<T>;
|
|
504
|
+
interface MessageFns<T> {
|
|
505
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
506
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
507
|
+
fromJSON(object: any): T;
|
|
508
|
+
toJSON(message: T): unknown;
|
|
509
|
+
create(base?: DeepPartial<T>): T;
|
|
510
|
+
fromPartial(object: DeepPartial<T>): T;
|
|
511
|
+
}
|
|
512
|
+
export {};
|