@blueyerobotics/protocol-definitions 3.4.0-01d6bec3 → 3.4.0-296e61b2
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/message_formats.d.ts +35 -1
- package/dist/message_formats.js +59 -2
- package/package.json +1 -1
|
@@ -891,6 +891,11 @@ export interface LaserDetection {
|
|
|
891
891
|
correctedPixelDistance: number;
|
|
892
892
|
/** Estimated subject distance (m). */
|
|
893
893
|
estimatedDistance: number;
|
|
894
|
+
/**
|
|
895
|
+
* Id of the camera frame the detection was computed from, 0 if unknown. Matches the frame id
|
|
896
|
+
* embedded in recorded video; ModelDetections describes the format.
|
|
897
|
+
*/
|
|
898
|
+
frameId: number;
|
|
894
899
|
}
|
|
895
900
|
/** Latitude and longitude position in WGS 84 decimal degrees format. */
|
|
896
901
|
export interface LatLongPosition {
|
|
@@ -3027,7 +3032,26 @@ export interface ObjectDetection {
|
|
|
3027
3032
|
/** Instance segmentation mask (absent if model has no segmentation). */
|
|
3028
3033
|
mask: SegmentationMask | undefined;
|
|
3029
3034
|
}
|
|
3030
|
-
/**
|
|
3035
|
+
/**
|
|
3036
|
+
* A list of object detections from a single model for a single video frame.
|
|
3037
|
+
*
|
|
3038
|
+
* frame_id matches detections to the exact frame of a recording. The video pipeline on the X3 Ultra
|
|
3039
|
+
* assigns an id to each camera frame once, passes it to the computer vision models and the recorder,
|
|
3040
|
+
* and writes it into the recorded video. An id is never reused within one boot of the drone, and stays
|
|
3041
|
+
* below 2^53, so it is exact as a JavaScript number. The models do not process every frame, so the ids
|
|
3042
|
+
* of successive results can skip.
|
|
3043
|
+
*
|
|
3044
|
+
* Recorded video carries the id in a user_data_unregistered SEI message (payload type 5), one per access
|
|
3045
|
+
* unit, placed before the first slice: NAL unit type 6 in H.264 and PREFIX_SEI_NUT (type 39) in H.265.
|
|
3046
|
+
* The payload is 32 bytes, counted after the emulation prevention bytes are removed:
|
|
3047
|
+
*
|
|
3048
|
+
* - Bytes 0-15: UUID 6b1e2f0c-935d-4a8e-b17a-52d40e3c91f6, in the byte order written.
|
|
3049
|
+
* - Bytes 16-23: frame_id, uint64 big-endian.
|
|
3050
|
+
* - Bytes 24-31: capture time of the frame in CLOCK_MONOTONIC on the drone (ns), uint64 big-endian, 0 if unknown.
|
|
3051
|
+
*
|
|
3052
|
+
* A frame that the recorder repeats to keep the frame rate carries the id of the frame it repeats.
|
|
3053
|
+
* Re-encoding the video drops the SEI, so only the original recording carries the ids.
|
|
3054
|
+
*/
|
|
3031
3055
|
export interface ModelDetections {
|
|
3032
3056
|
/** List of detections in the frame. */
|
|
3033
3057
|
detections: ObjectDetection[];
|
|
@@ -3039,6 +3063,11 @@ export interface ModelDetections {
|
|
|
3039
3063
|
imageHeight: number;
|
|
3040
3064
|
/** Name of the computer vision model that produced the detections. */
|
|
3041
3065
|
modelName: string;
|
|
3066
|
+
/**
|
|
3067
|
+
* Id of the camera frame the detections were computed from, 0 if unknown. Matches the frame id
|
|
3068
|
+
* embedded in recorded video; the message description gives the format.
|
|
3069
|
+
*/
|
|
3070
|
+
frameId: number;
|
|
3042
3071
|
}
|
|
3043
3072
|
/** Generic filter settings. */
|
|
3044
3073
|
export interface FilterMessage {
|
|
@@ -3104,6 +3133,11 @@ export interface SotState {
|
|
|
3104
3133
|
vs: number;
|
|
3105
3134
|
/** Kalman rate of change of the bounding box aspect ratio, width / height (1/s). */
|
|
3106
3135
|
vr: number;
|
|
3136
|
+
/**
|
|
3137
|
+
* Id of the camera frame the state was computed from, 0 if unknown. Matches the frame id embedded
|
|
3138
|
+
* in recorded video; ModelDetections describes the format.
|
|
3139
|
+
*/
|
|
3140
|
+
frameId: number;
|
|
3107
3141
|
}
|
|
3108
3142
|
/** Current state of the SOT tracker. */
|
|
3109
3143
|
export declare enum SotState_State {
|
package/dist/message_formats.js
CHANGED
|
@@ -3892,6 +3892,7 @@ function createBaseLaserDetection() {
|
|
|
3892
3892
|
laserWidth: 0,
|
|
3893
3893
|
correctedPixelDistance: 0,
|
|
3894
3894
|
estimatedDistance: 0,
|
|
3895
|
+
frameId: 0,
|
|
3895
3896
|
};
|
|
3896
3897
|
}
|
|
3897
3898
|
export const LaserDetection = {
|
|
@@ -3926,6 +3927,9 @@ export const LaserDetection = {
|
|
|
3926
3927
|
if (message.estimatedDistance !== 0) {
|
|
3927
3928
|
writer.uint32(85).float(message.estimatedDistance);
|
|
3928
3929
|
}
|
|
3930
|
+
if (message.frameId !== 0) {
|
|
3931
|
+
writer.uint32(88).uint64(message.frameId);
|
|
3932
|
+
}
|
|
3929
3933
|
return writer;
|
|
3930
3934
|
},
|
|
3931
3935
|
decode(input, length) {
|
|
@@ -4005,6 +4009,13 @@ export const LaserDetection = {
|
|
|
4005
4009
|
message.estimatedDistance = reader.float();
|
|
4006
4010
|
continue;
|
|
4007
4011
|
}
|
|
4012
|
+
case 11: {
|
|
4013
|
+
if (tag !== 88) {
|
|
4014
|
+
break;
|
|
4015
|
+
}
|
|
4016
|
+
message.frameId = longToNumber(reader.uint64());
|
|
4017
|
+
continue;
|
|
4018
|
+
}
|
|
4008
4019
|
}
|
|
4009
4020
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4010
4021
|
break;
|
|
@@ -4025,6 +4036,7 @@ export const LaserDetection = {
|
|
|
4025
4036
|
laserWidth: isSet(object.laserWidth) ? gt.Number(object.laserWidth) : 0,
|
|
4026
4037
|
correctedPixelDistance: isSet(object.correctedPixelDistance) ? gt.Number(object.correctedPixelDistance) : 0,
|
|
4027
4038
|
estimatedDistance: isSet(object.estimatedDistance) ? gt.Number(object.estimatedDistance) : 0,
|
|
4039
|
+
frameId: isSet(object.frameId) ? gt.Number(object.frameId) : 0,
|
|
4028
4040
|
};
|
|
4029
4041
|
},
|
|
4030
4042
|
toJSON(message) {
|
|
@@ -4059,6 +4071,9 @@ export const LaserDetection = {
|
|
|
4059
4071
|
if (message.estimatedDistance !== 0) {
|
|
4060
4072
|
obj.estimatedDistance = message.estimatedDistance;
|
|
4061
4073
|
}
|
|
4074
|
+
if (message.frameId !== 0) {
|
|
4075
|
+
obj.frameId = Math.round(message.frameId);
|
|
4076
|
+
}
|
|
4062
4077
|
return obj;
|
|
4063
4078
|
},
|
|
4064
4079
|
create(base) {
|
|
@@ -4076,6 +4091,7 @@ export const LaserDetection = {
|
|
|
4076
4091
|
message.laserWidth = object.laserWidth ?? 0;
|
|
4077
4092
|
message.correctedPixelDistance = object.correctedPixelDistance ?? 0;
|
|
4078
4093
|
message.estimatedDistance = object.estimatedDistance ?? 0;
|
|
4094
|
+
message.frameId = object.frameId ?? 0;
|
|
4079
4095
|
return message;
|
|
4080
4096
|
},
|
|
4081
4097
|
};
|
|
@@ -19970,7 +19986,7 @@ export const ObjectDetection = {
|
|
|
19970
19986
|
},
|
|
19971
19987
|
};
|
|
19972
19988
|
function createBaseModelDetections() {
|
|
19973
|
-
return { detections: [], camera: 0, imageWidth: 0, imageHeight: 0, modelName: "" };
|
|
19989
|
+
return { detections: [], camera: 0, imageWidth: 0, imageHeight: 0, modelName: "", frameId: 0 };
|
|
19974
19990
|
}
|
|
19975
19991
|
export const ModelDetections = {
|
|
19976
19992
|
encode(message, writer = new BinaryWriter()) {
|
|
@@ -19989,6 +20005,9 @@ export const ModelDetections = {
|
|
|
19989
20005
|
if (message.modelName !== "") {
|
|
19990
20006
|
writer.uint32(42).string(message.modelName);
|
|
19991
20007
|
}
|
|
20008
|
+
if (message.frameId !== 0) {
|
|
20009
|
+
writer.uint32(48).uint64(message.frameId);
|
|
20010
|
+
}
|
|
19992
20011
|
return writer;
|
|
19993
20012
|
},
|
|
19994
20013
|
decode(input, length) {
|
|
@@ -20033,6 +20052,13 @@ export const ModelDetections = {
|
|
|
20033
20052
|
message.modelName = reader.string();
|
|
20034
20053
|
continue;
|
|
20035
20054
|
}
|
|
20055
|
+
case 6: {
|
|
20056
|
+
if (tag !== 48) {
|
|
20057
|
+
break;
|
|
20058
|
+
}
|
|
20059
|
+
message.frameId = longToNumber(reader.uint64());
|
|
20060
|
+
continue;
|
|
20061
|
+
}
|
|
20036
20062
|
}
|
|
20037
20063
|
if ((tag & 7) === 4 || tag === 0) {
|
|
20038
20064
|
break;
|
|
@@ -20050,6 +20076,7 @@ export const ModelDetections = {
|
|
|
20050
20076
|
imageWidth: isSet(object.imageWidth) ? gt.Number(object.imageWidth) : 0,
|
|
20051
20077
|
imageHeight: isSet(object.imageHeight) ? gt.Number(object.imageHeight) : 0,
|
|
20052
20078
|
modelName: isSet(object.modelName) ? gt.String(object.modelName) : "",
|
|
20079
|
+
frameId: isSet(object.frameId) ? gt.Number(object.frameId) : 0,
|
|
20053
20080
|
};
|
|
20054
20081
|
},
|
|
20055
20082
|
toJSON(message) {
|
|
@@ -20069,6 +20096,9 @@ export const ModelDetections = {
|
|
|
20069
20096
|
if (message.modelName !== "") {
|
|
20070
20097
|
obj.modelName = message.modelName;
|
|
20071
20098
|
}
|
|
20099
|
+
if (message.frameId !== 0) {
|
|
20100
|
+
obj.frameId = Math.round(message.frameId);
|
|
20101
|
+
}
|
|
20072
20102
|
return obj;
|
|
20073
20103
|
},
|
|
20074
20104
|
create(base) {
|
|
@@ -20081,6 +20111,7 @@ export const ModelDetections = {
|
|
|
20081
20111
|
message.imageWidth = object.imageWidth ?? 0;
|
|
20082
20112
|
message.imageHeight = object.imageHeight ?? 0;
|
|
20083
20113
|
message.modelName = object.modelName ?? "";
|
|
20114
|
+
message.frameId = object.frameId ?? 0;
|
|
20084
20115
|
return message;
|
|
20085
20116
|
},
|
|
20086
20117
|
};
|
|
@@ -20372,7 +20403,18 @@ export const OperatorInfo = {
|
|
|
20372
20403
|
},
|
|
20373
20404
|
};
|
|
20374
20405
|
function createBaseSotState() {
|
|
20375
|
-
return {
|
|
20406
|
+
return {
|
|
20407
|
+
state: 0,
|
|
20408
|
+
boundingBox: undefined,
|
|
20409
|
+
imageWidth: 0,
|
|
20410
|
+
imageHeight: 0,
|
|
20411
|
+
confidence: 0,
|
|
20412
|
+
vx: 0,
|
|
20413
|
+
vy: 0,
|
|
20414
|
+
vs: 0,
|
|
20415
|
+
vr: 0,
|
|
20416
|
+
frameId: 0,
|
|
20417
|
+
};
|
|
20376
20418
|
}
|
|
20377
20419
|
export const SotState = {
|
|
20378
20420
|
encode(message, writer = new BinaryWriter()) {
|
|
@@ -20403,6 +20445,9 @@ export const SotState = {
|
|
|
20403
20445
|
if (message.vr !== 0) {
|
|
20404
20446
|
writer.uint32(77).float(message.vr);
|
|
20405
20447
|
}
|
|
20448
|
+
if (message.frameId !== 0) {
|
|
20449
|
+
writer.uint32(80).uint64(message.frameId);
|
|
20450
|
+
}
|
|
20406
20451
|
return writer;
|
|
20407
20452
|
},
|
|
20408
20453
|
decode(input, length) {
|
|
@@ -20475,6 +20520,13 @@ export const SotState = {
|
|
|
20475
20520
|
message.vr = reader.float();
|
|
20476
20521
|
continue;
|
|
20477
20522
|
}
|
|
20523
|
+
case 10: {
|
|
20524
|
+
if (tag !== 80) {
|
|
20525
|
+
break;
|
|
20526
|
+
}
|
|
20527
|
+
message.frameId = longToNumber(reader.uint64());
|
|
20528
|
+
continue;
|
|
20529
|
+
}
|
|
20478
20530
|
}
|
|
20479
20531
|
if ((tag & 7) === 4 || tag === 0) {
|
|
20480
20532
|
break;
|
|
@@ -20494,6 +20546,7 @@ export const SotState = {
|
|
|
20494
20546
|
vy: isSet(object.vy) ? gt.Number(object.vy) : 0,
|
|
20495
20547
|
vs: isSet(object.vs) ? gt.Number(object.vs) : 0,
|
|
20496
20548
|
vr: isSet(object.vr) ? gt.Number(object.vr) : 0,
|
|
20549
|
+
frameId: isSet(object.frameId) ? gt.Number(object.frameId) : 0,
|
|
20497
20550
|
};
|
|
20498
20551
|
},
|
|
20499
20552
|
toJSON(message) {
|
|
@@ -20525,6 +20578,9 @@ export const SotState = {
|
|
|
20525
20578
|
if (message.vr !== 0) {
|
|
20526
20579
|
obj.vr = message.vr;
|
|
20527
20580
|
}
|
|
20581
|
+
if (message.frameId !== 0) {
|
|
20582
|
+
obj.frameId = Math.round(message.frameId);
|
|
20583
|
+
}
|
|
20528
20584
|
return obj;
|
|
20529
20585
|
},
|
|
20530
20586
|
create(base) {
|
|
@@ -20543,6 +20599,7 @@ export const SotState = {
|
|
|
20543
20599
|
message.vy = object.vy ?? 0;
|
|
20544
20600
|
message.vs = object.vs ?? 0;
|
|
20545
20601
|
message.vr = object.vr ?? 0;
|
|
20602
|
+
message.frameId = object.frameId ?? 0;
|
|
20546
20603
|
return message;
|
|
20547
20604
|
},
|
|
20548
20605
|
};
|