@luxonis/visualizer-protobuf 2.22.0 → 2.23.0

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.
Files changed (48) hide show
  1. package/dist/{WorkerImageDecoder.worker-tkX9-IYo.js → WorkerImageDecoder.worker-C3ZBQ2Wk.js} +1 -1
  2. package/dist/{decodeImage-C8kB6T3V.js → decodeImage-CxUhz2gE.js} +14278 -2893
  3. package/dist/{index-P-f_cKZS.js → index-B9Zf3rrb.js} +2 -2
  4. package/dist/{index-BQ24Upp_.js → index-BJOK4X3d.js} +2 -2
  5. package/dist/{index-DMvr0-pP.js → index-BTO4og7t.js} +2 -2
  6. package/dist/{index-DTCT-lVn.js → index-BqTw2FSJ.js} +4 -4
  7. package/dist/{index-CH1TUS48.js → index-Bw0fCcF0.js} +2 -2
  8. package/dist/{index-DDVf76z9.js → index-CCWfhL1j.js} +2 -2
  9. package/dist/{index-BHXfMPMv.js → index-CFz07x1R.js} +2 -2
  10. package/dist/{index-Bvet1xE9.js → index-CM0J0Tip.js} +2 -2
  11. package/dist/{index-DtzTeqB7.js → index-D3by772J.js} +2 -2
  12. package/dist/{index-DzyYicoH.js → index-DMmaMUCD.js} +2813 -1608
  13. package/dist/{index-C-cGIa0r.js → index-DQ_hdLpb.js} +2 -2
  14. package/dist/{index-yfiGMPtK.js → index-DRmoIUFd.js} +2 -2
  15. package/dist/{index-Dcus_L6F.js → index-DWgnF3_o.js} +156 -57
  16. package/dist/{index-DYpNYj7G.js → index-Db42Qzy_.js} +2 -2
  17. package/dist/{index-C_ioBAtk.js → index-DgisSKDf.js} +2 -2
  18. package/dist/{index-CV57d9Tz.js → index-DjOkSXUO.js} +2 -2
  19. package/dist/{index-D5F-PpU5.js → index-DqqFhpKC.js} +2 -2
  20. package/dist/{index-RKZ-F77P.js → index-Wr3SUBO9.js} +2 -2
  21. package/dist/{index-DHgo3Ne_.js → index-oTzD1_p-.js} +2 -2
  22. package/dist/index.js +2 -2
  23. package/dist/lib/src/connection/foxglove-connection.d.ts +3 -1
  24. package/dist/lib/src/connection/foxglove-connection.d.ts.map +1 -1
  25. package/dist/lib/src/connection/foxglove-connection.js +16 -32
  26. package/dist/lib/src/connection/foxglove-connection.js.map +1 -1
  27. package/dist/lib/src/messaging/deserialization/pointcloud/pointcloudFromDepth.worker.js +373 -247
  28. package/dist/lib/src/messaging/deserialization/pointcloud/pointcloudFromDepth.worker.js.map +1 -1
  29. package/dist/lib/src/messaging/deserialization/pointcloud/poitcloudPoolManager.d.ts +30 -0
  30. package/dist/lib/src/messaging/deserialization/pointcloud/poitcloudPoolManager.d.ts.map +1 -0
  31. package/dist/lib/src/messaging/deserialization/pointcloud/poitcloudPoolManager.js +106 -0
  32. package/dist/lib/src/messaging/deserialization/pointcloud/poitcloudPoolManager.js.map +1 -0
  33. package/dist/lib/src/messaging/deserialization/pointcloud/utils.d.ts +0 -9
  34. package/dist/lib/src/messaging/deserialization/pointcloud/utils.d.ts.map +1 -1
  35. package/dist/lib/src/messaging/deserialization/pointcloud/utils.js +0 -16
  36. package/dist/lib/src/messaging/deserialization/pointcloud/utils.js.map +1 -1
  37. package/dist/lib/src/panels/PointCloudPanel.js +3 -3
  38. package/dist/lib/src/panels/PointCloudPanel.js.map +1 -1
  39. package/dist/lib/src/utils/poitcloud-sync.js +1 -1
  40. package/dist/lib/src/utils/poitcloud-sync.js.map +1 -1
  41. package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/CameraStateSettings.d.ts +1 -0
  42. package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/CameraStateSettings.d.ts.map +1 -1
  43. package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/CameraStateSettings.js +243 -154
  44. package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/CameraStateSettings.js.map +1 -1
  45. package/dist/pointcloudFromDepth.worker-qotYPy_e.js +450 -0
  46. package/dist/{utils-Cmsz3FxA.js → utils-Hzt3wxhG.js} +2 -20
  47. package/package.json +2 -1
  48. package/dist/pointcloudFromDepth.worker-CNKyMUU-.js +0 -326
@@ -1,12 +1,12 @@
1
- import { Q as LRLanguage, J as indentNodeProp, a0 as delimitedIndent, M as foldNodeProp, a1 as foldInside, N as styleTags, O as tags, T as LanguageSupport, V as LRParser } from './index-Dcus_L6F.js';
1
+ import { Q as LRLanguage, J as indentNodeProp, a0 as delimitedIndent, M as foldNodeProp, a1 as foldInside, N as styleTags, O as tags, T as LanguageSupport, V as LRParser } from './index-DWgnF3_o.js';
2
2
  import './tslib.es6-C73eoP_E.js';
3
3
  import 'react';
4
4
  import 'react-mosaic-component';
5
5
  import './_commonjsHelpers-E-ZsRS8r.js';
6
6
  import '@mui/material';
7
7
  import './isArrayLikeObject-Bytw9p-q.js';
8
- import './utils-Cmsz3FxA.js';
9
8
  import './comlink-DHMAu6X7.js';
9
+ import './utils-Hzt3wxhG.js';
10
10
  import './FoxgloveServer-C39Uooyk.js';
11
11
  import 'ms';
12
12
  import './foxglove-protocol-CYoMweAY.js';
@@ -1,12 +1,12 @@
1
- import { U as ExternalTokenizer, a2 as ContextTracker, N as styleTags, O as tags, V as LRParser, a3 as LocalTokenGroup, a4 as snippetCompletion, Z as syntaxTree, Q as LRLanguage, J as indentNodeProp, K as continuedIndent, $ as flatIndent, a0 as delimitedIndent, M as foldNodeProp, a1 as foldInside, T as LanguageSupport, X as ifNotIn, Y as completeFromList, a5 as IterMode, a6 as NodeWeakMap } from './index-Dcus_L6F.js';
1
+ import { U as ExternalTokenizer, a2 as ContextTracker, N as styleTags, O as tags, V as LRParser, a3 as LocalTokenGroup, a4 as snippetCompletion, Z as syntaxTree, Q as LRLanguage, J as indentNodeProp, K as continuedIndent, $ as flatIndent, a0 as delimitedIndent, M as foldNodeProp, a1 as foldInside, T as LanguageSupport, X as ifNotIn, Y as completeFromList, a5 as IterMode, a6 as NodeWeakMap } from './index-DWgnF3_o.js';
2
2
  import './tslib.es6-C73eoP_E.js';
3
3
  import 'react';
4
4
  import 'react-mosaic-component';
5
5
  import './_commonjsHelpers-E-ZsRS8r.js';
6
6
  import '@mui/material';
7
7
  import './isArrayLikeObject-Bytw9p-q.js';
8
- import './utils-Cmsz3FxA.js';
9
8
  import './comlink-DHMAu6X7.js';
9
+ import './utils-Hzt3wxhG.js';
10
10
  import './FoxgloveServer-C39Uooyk.js';
11
11
  import 'ms';
12
12
  import './foxglove-protocol-CYoMweAY.js';
@@ -1,6 +1,6 @@
1
1
  import { d as dist$1, e as estimateObjectSize, r as reportError, A as AppError, b as baseFlatten, a as baseEach, c as baseIteratee, f as baseDifference, g as getTag, h as baseKeys, i as baseIsEqual, j as castPath, t as toKey, k as baseGet, l as hasIn, s as sendNotification, m as shallowequal, u as useGuaranteedContext, n as getPanelIdsInsideTabPanels, o as getPanelTypeFromId, T as TAB_PANEL_TYPE, p as removePanelFromTabPanel, q as getPanelIdForType, v as getPathFromNode, w as updateTabPanelLayout, x as getSaveConfigsPayloadForAddedPanel, y as replaceAndRemovePanels, z as inlineTabPanelLayouts, B as getAllPanelIds, C as getConfigsForNestedPanelsInsideTab, D as reorderTabWithinTabPanel, E as moveTabBetweenTabPanels, F as isTabPanelConfig, G as DEFAULT_TAB_PANEL_CONFIG, H as addPanelToTab, I as createAddUpdates, J as filterMap, L as Logger, K as uniq$2, M as useShallowMemo, N as CurrentLayoutContext, O as MessageOrderTracker, P as AppConfigurationContext, _ as __assign$7, Q as __rest$4, R as __spreadArray$4 } from './tslib.es6-C73eoP_E.js';
2
- import { d as depthToPointcloudWorkerPool, u as uint8ArrayToUint16Array } from './utils-Cmsz3FxA.js';
3
2
  import { w as wrap$3, p as proxy } from './comlink-DHMAu6X7.js';
3
+ import { u as uint8ArrayToUint16Array } from './utils-Hzt3wxhG.js';
4
4
  import { B as BinaryOpcode } from './FoxgloveServer-C39Uooyk.js';
5
5
  import { g as getDefaultExportFromCjs, c as commonjsGlobal } from './_commonjsHelpers-E-ZsRS8r.js';
6
6
  import * as React$1 from 'react';
@@ -444,6 +444,108 @@ class Condvar {
444
444
  }
445
445
  }
446
446
 
447
+ // This Source Code Form is subject to the terms of the Mozilla Public
448
+ // License, v2.0. If a copy of the MPL was not distributed with this
449
+ // file, You can obtain one at http://mozilla.org/MPL/2.0/
450
+ const WORKER_COUNT = 4;
451
+ class depthToPointcloudWorkerPool {
452
+ lastUsedWorkerIndex = 0;
453
+ #frameQueue = [];
454
+ #isWebGpuSupported = false;
455
+ #FRAME_BATCH_SIZE;
456
+ #isProcessing = false;
457
+ constructor(callback, batchSize = 10) {
458
+ if (typeof navigator.gpu !== "undefined") {
459
+ void navigator.gpu.requestAdapter().then(gpuAdapter => {
460
+ if (!gpuAdapter) {
461
+ this.#isWebGpuSupported = false;
462
+ console.warn("WebGPU not supported. Falling back to CPU for all frames.");
463
+ return;
464
+ }
465
+ this.#isWebGpuSupported = true;
466
+ });
467
+ } else {
468
+ console.warn("WebGPU not supported. Falling back to CPU for all frames.");
469
+ }
470
+ this.sumbmitCallback = callback;
471
+ this.#FRAME_BATCH_SIZE = Math.max(1, batchSize);
472
+ this.workerApis = new Array(WORKER_COUNT).fill(undefined).map(() => wrap$3(new Worker(new URL("pointcloudFromDepth.worker-qotYPy_e.js", import.meta.url), {
473
+ type: "module"
474
+ })));
475
+ }
476
+ async queueDepthFrame(data) {
477
+ // @ts-expect-error - ITS unknow
478
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
479
+ if (!(data.colorFrame.message.data instanceof Uint8Array)) {
480
+ return;
481
+ }
482
+ this.#frameQueue.push(data);
483
+ this.tryProcessBatch();
484
+ }
485
+ tryProcessBatch() {
486
+ if (this.#isProcessing || this.#frameQueue.length < this.#FRAME_BATCH_SIZE) {
487
+ return;
488
+ }
489
+ this.#isProcessing = true;
490
+ const batchToProcess = this.#frameQueue.splice(0, this.#FRAME_BATCH_SIZE);
491
+ if (batchToProcess.length === 0) {
492
+ this.#isProcessing = false;
493
+ return;
494
+ }
495
+ // biome-ignore lint/style/noNonNullAssertion: <explanation>
496
+ const firstFrame = batchToProcess[0];
497
+ const width = firstFrame.width;
498
+ const height = firstFrame.height;
499
+ const fx = firstFrame.fx;
500
+ const fy = firstFrame.fy;
501
+ const cx = firstFrame.cx;
502
+ const cy = firstFrame.cy;
503
+ const i420Width = firstFrame.i420Width;
504
+ const i420Height = firstFrame.i420Height;
505
+ const depthDataArray = batchToProcess.map(f => uint8ArrayToUint16Array(f.depthFrame.data));
506
+ const timestampsArray = batchToProcess.map(f => f.colorFrame.receiveTime.nsec);
507
+ // @ts-expect-error - ITS unknow
508
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
509
+ const i420DataArray = batchToProcess.map(f => f.colorFrame.message.data);
510
+ const workerIndex = this.lastUsedWorkerIndex;
511
+ // biome-ignore lint/style/noNonNullAssertion: <explanation>
512
+ const workerApi = this.workerApis[workerIndex];
513
+ this.lastUsedWorkerIndex = (this.lastUsedWorkerIndex + 1) % WORKER_COUNT;
514
+ workerApi.depthToPointcloudGPU(depthDataArray, width, height, fx, fy, cx, cy, i420DataArray, i420Width, i420Height, {
515
+ hasGPU: this.#isWebGpuSupported
516
+ }).then(results => {
517
+ if (results.length === batchToProcess.length) {
518
+ const firtFrame = batchToProcess[0];
519
+ if (!firtFrame) {
520
+ return;
521
+ }
522
+ for (let i = 0; i < results.length; i++) {
523
+ // biome-ignore lint/style/noNonNullAssertion: <explanation>
524
+ const originalFrame = batchToProcess[i];
525
+ const pointCloudResult = results[i];
526
+ if (!pointCloudResult) {
527
+ console.error(`Worker ${workerIndex}: Result ${i} is null!`);
528
+ continue;
529
+ }
530
+ // biome-ignore lint/style/noNonNullAssertion: Workaround
531
+ const delay = Math.min(500, Math.abs((firstFrame.colorFrame.receiveTime.nsec - timestampsArray[i]) / 10 ** 6));
532
+ setTimeout(() => {
533
+ this.sumbmitCallback(originalFrame.colorFrame, originalFrame.depthFrame, pointCloudResult);
534
+ }, delay);
535
+ }
536
+ }
537
+ }).catch(error => {
538
+ console.error(`Worker ${workerIndex}: Error processing batch:`, error);
539
+ for (const originalFrame of batchToProcess) {
540
+ this.sumbmitCallback(originalFrame.colorFrame, originalFrame.depthFrame, null);
541
+ }
542
+ }).finally(() => {
543
+ this.#isProcessing = false;
544
+ this.tryProcessBatch();
545
+ });
546
+ }
547
+ }
548
+
447
549
  // This Source Code Form is subject to the terms of the Mozilla Public
448
550
  // License, v2.0. If a copy of the MPL was not distributed with this
449
551
  // file, You can obtain one at http://mozilla.org/MPL/2.0/
@@ -607,7 +709,7 @@ class PoitCloudSyncFramework {
607
709
  }
608
710
  storedFrames = [];
609
711
  #MAX_DELAY_SEC = 0.01;
610
- #MAX_STORED_FRAMES = 15;
712
+ #MAX_STORED_FRAMES = 100;
611
713
  getFrame(nsec) {
612
714
  const {
613
715
  res,
@@ -672,7 +774,9 @@ class FoxgloveConnection {
672
774
  throughputMetrics = new ThroughputMetricsManager();
673
775
  decodeMetrics = new EventMetricsManager();
674
776
  PoitCloudSyncFramework = new PoitCloudSyncFramework();
675
- depthToPointcloudWorkerPool = new depthToPointcloudWorkerPool();
777
+ depthToPointcloudWorkerPool = new depthToPointcloudWorkerPool((event, frame, message) => {
778
+ this.submitPoitcloudFrameCallback(event, frame, message);
779
+ });
676
780
  // message handler
677
781
 
678
782
  topics = {};
@@ -700,40 +804,35 @@ class FoxgloveConnection {
700
804
  this.throughputMetrics.registerEvent(event.data.topic, event.data.buffer.byteLength);
701
805
  this.messageHandler.handle(event.data);
702
806
  }
807
+ submitPoitcloudFrameCallback(coloredEvent, poitcloudFrame, message) {
808
+ coloredEvent.topic = "Point Cloud";
809
+ coloredEvent.schemaName = "foxglove.PointCloud";
810
+ coloredEvent.message = poitcloudFrame;
811
+
812
+ // @ts-expect-error - ITS unknow
813
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
814
+ coloredEvent.message.data = message;
815
+ const messageSize = estimateObjectSize(coloredEvent.message);
816
+ coloredEvent.sizeInBytes = messageSize;
817
+ this.messageEvents.push(coloredEvent);
818
+ this.emitState();
819
+ }
703
820
  async handleParsePoitcloudMessage(coloredEvent) {
704
821
  const poitcloudFrame = this.PoitCloudSyncFramework.getFrame(coloredEvent.receiveTime.nsec);
705
- const getNeuralCameraIntrinsics = () => {
706
- const neuralCameraIntrinsicsData = localStorage.getItem("neuralCameraIntrinsics");
707
- if (neuralCameraIntrinsicsData) {
708
- return JSON.parse(neuralCameraIntrinsicsData);
709
- }
710
- return null;
711
- };
712
822
  if (poitcloudFrame) {
713
- /* Useful for debugging
714
- if (Math.abs(coloredEvent.receiveTime.nsec- poitcloudFrame.timestamp.nsec)/10 ** 9) {
715
- console.log("Sync delay under 1s", Math.abs(coloredEvent.receiveTime.nsec- poitcloudFrame.timestamp.nsec)/ 10 **9);
716
- }
717
- else {
718
- console.log("Sync delay over 1s", Math.abs(coloredEvent.receiveTime.nsec- poitcloudFrame.timestamp.nsec)/10 ** 9);
719
- }
720
- */
721
-
722
- const neuralCameraIntrinsics = getNeuralCameraIntrinsics();
723
- // @ts-expect-error - ITS unknow
724
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
725
- const message = await this.depthToPointcloudWorkerPool.depthToPointcloudGPU(uint8ArrayToUint16Array(poitcloudFrame.data), poitcloudFrame.width ?? 0, poitcloudFrame.height, neuralCameraIntrinsics.right.focalLenght.x, neuralCameraIntrinsics.right.focalLenght.y, neuralCameraIntrinsics.right.principalPoint.x, neuralCameraIntrinsics.right.principalPoint.y, coloredEvent.message.data, poitcloudFrame.width ?? 0, poitcloudFrame.height ?? 0);
726
- coloredEvent.topic = "Point Cloud";
727
- coloredEvent.schemaName = "foxglove.PointCloud";
728
- coloredEvent.message = poitcloudFrame;
729
-
730
- // @ts-expect-error - ITS unknow
731
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
732
- coloredEvent.message.data = message;
733
- const messageSize = estimateObjectSize(coloredEvent.message);
734
- coloredEvent.sizeInBytes = messageSize;
735
- this.messageEvents.push(coloredEvent);
736
- this.emitState();
823
+ const neuralCameraIntrinsics = JSON.parse(localStorage.getItem("neuralCameraIntrinsics") ?? "{}");
824
+ await this.depthToPointcloudWorkerPool.queueDepthFrame({
825
+ depthFrame: poitcloudFrame,
826
+ width: poitcloudFrame.width ?? 0,
827
+ height: poitcloudFrame.height ?? 0,
828
+ fx: neuralCameraIntrinsics.right.focalLenght.x,
829
+ fy: neuralCameraIntrinsics.right.focalLenght.y,
830
+ cx: neuralCameraIntrinsics.right.principalPoint.x,
831
+ cy: neuralCameraIntrinsics.right.principalPoint.y,
832
+ colorFrame: coloredEvent,
833
+ i420Width: poitcloudFrame.width ?? 0,
834
+ i420Height: poitcloudFrame.height ?? 0
835
+ });
737
836
  }
738
837
  }
739
838
  parseResolutionFromMessage(message, topic) {
@@ -84970,7 +85069,7 @@ function legacy(parser) {
84970
85069
  return new LanguageSupport(StreamLanguage.define(parser));
84971
85070
  }
84972
85071
  function sql$1(dialectName) {
84973
- return import('./index-CH1TUS48.js').then(m => m.sql({ dialect: m[dialectName] }));
85072
+ return import('./index-Bw0fCcF0.js').then(m => m.sql({ dialect: m[dialectName] }));
84974
85073
  }
84975
85074
  /**
84976
85075
  An array of language descriptions for known language packages.
@@ -84981,7 +85080,7 @@ const languages = [
84981
85080
  name: "C",
84982
85081
  extensions: ["c", "h", "ino"],
84983
85082
  load() {
84984
- return import('./index-C_ioBAtk.js').then(m => m.cpp());
85083
+ return import('./index-DgisSKDf.js').then(m => m.cpp());
84985
85084
  }
84986
85085
  }),
84987
85086
  /*@__PURE__*/LanguageDescription.of({
@@ -84989,7 +85088,7 @@ const languages = [
84989
85088
  alias: ["cpp"],
84990
85089
  extensions: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"],
84991
85090
  load() {
84992
- return import('./index-C_ioBAtk.js').then(m => m.cpp());
85091
+ return import('./index-DgisSKDf.js').then(m => m.cpp());
84993
85092
  }
84994
85093
  }),
84995
85094
  /*@__PURE__*/LanguageDescription.of({
@@ -85009,7 +85108,7 @@ const languages = [
85009
85108
  name: "Go",
85010
85109
  extensions: ["go"],
85011
85110
  load() {
85012
- return import('./index-yfiGMPtK.js').then(m => m.go());
85111
+ return import('./index-DRmoIUFd.js').then(m => m.go());
85013
85112
  }
85014
85113
  }),
85015
85114
  /*@__PURE__*/LanguageDescription.of({
@@ -85024,7 +85123,7 @@ const languages = [
85024
85123
  name: "Java",
85025
85124
  extensions: ["java"],
85026
85125
  load() {
85027
- return import('./index-DYpNYj7G.js').then(m => m.java());
85126
+ return import('./index-Db42Qzy_.js').then(m => m.java());
85028
85127
  }
85029
85128
  }),
85030
85129
  /*@__PURE__*/LanguageDescription.of({
@@ -85040,7 +85139,7 @@ const languages = [
85040
85139
  alias: ["json5"],
85041
85140
  extensions: ["json", "map"],
85042
85141
  load() {
85043
- return import('./index-BQ24Upp_.js').then(m => m.json());
85142
+ return import('./index-BJOK4X3d.js').then(m => m.json());
85044
85143
  }
85045
85144
  }),
85046
85145
  /*@__PURE__*/LanguageDescription.of({
@@ -85054,14 +85153,14 @@ const languages = [
85054
85153
  name: "LESS",
85055
85154
  extensions: ["less"],
85056
85155
  load() {
85057
- return import('./index-DtzTeqB7.js').then(m => m.less());
85156
+ return import('./index-D3by772J.js').then(m => m.less());
85058
85157
  }
85059
85158
  }),
85060
85159
  /*@__PURE__*/LanguageDescription.of({
85061
85160
  name: "Liquid",
85062
85161
  extensions: ["liquid"],
85063
85162
  load() {
85064
- return import('./index-DDVf76z9.js').then(m => m.liquid());
85163
+ return import('./index-CCWfhL1j.js').then(m => m.liquid());
85065
85164
  }
85066
85165
  }),
85067
85166
  /*@__PURE__*/LanguageDescription.of({
@@ -85087,7 +85186,7 @@ const languages = [
85087
85186
  name: "PHP",
85088
85187
  extensions: ["php", "php3", "php4", "php5", "php7", "phtml"],
85089
85188
  load() {
85090
- return import('./index-P-f_cKZS.js').then(m => m.php());
85189
+ return import('./index-B9Zf3rrb.js').then(m => m.php());
85091
85190
  }
85092
85191
  }),
85093
85192
  /*@__PURE__*/LanguageDescription.of({
@@ -85104,28 +85203,28 @@ const languages = [
85104
85203
  extensions: ["BUILD", "bzl", "py", "pyw"],
85105
85204
  filename: /^(BUCK|BUILD)$/,
85106
85205
  load() {
85107
- return import('./index-D5F-PpU5.js').then(m => m.python());
85206
+ return import('./index-DqqFhpKC.js').then(m => m.python());
85108
85207
  }
85109
85208
  }),
85110
85209
  /*@__PURE__*/LanguageDescription.of({
85111
85210
  name: "Rust",
85112
85211
  extensions: ["rs"],
85113
85212
  load() {
85114
- return import('./index-CV57d9Tz.js').then(m => m.rust());
85213
+ return import('./index-DjOkSXUO.js').then(m => m.rust());
85115
85214
  }
85116
85215
  }),
85117
85216
  /*@__PURE__*/LanguageDescription.of({
85118
85217
  name: "Sass",
85119
85218
  extensions: ["sass"],
85120
85219
  load() {
85121
- return import('./index-Bvet1xE9.js').then(m => m.sass({ indented: true }));
85220
+ return import('./index-CM0J0Tip.js').then(m => m.sass({ indented: true }));
85122
85221
  }
85123
85222
  }),
85124
85223
  /*@__PURE__*/LanguageDescription.of({
85125
85224
  name: "SCSS",
85126
85225
  extensions: ["scss"],
85127
85226
  load() {
85128
- return import('./index-Bvet1xE9.js').then(m => m.sass());
85227
+ return import('./index-CM0J0Tip.js').then(m => m.sass());
85129
85228
  }
85130
85229
  }),
85131
85230
  /*@__PURE__*/LanguageDescription.of({
@@ -85156,7 +85255,7 @@ const languages = [
85156
85255
  name: "WebAssembly",
85157
85256
  extensions: ["wat", "wast"],
85158
85257
  load() {
85159
- return import('./index-C-cGIa0r.js').then(m => m.wast());
85258
+ return import('./index-DQ_hdLpb.js').then(m => m.wast());
85160
85259
  }
85161
85260
  }),
85162
85261
  /*@__PURE__*/LanguageDescription.of({
@@ -85164,7 +85263,7 @@ const languages = [
85164
85263
  alias: ["rss", "wsdl", "xsd"],
85165
85264
  extensions: ["xml", "xsl", "xsd", "svg"],
85166
85265
  load() {
85167
- return import('./index-BHXfMPMv.js').then(m => m.xml());
85266
+ return import('./index-CFz07x1R.js').then(m => m.xml());
85168
85267
  }
85169
85268
  }),
85170
85269
  /*@__PURE__*/LanguageDescription.of({
@@ -85172,7 +85271,7 @@ const languages = [
85172
85271
  alias: ["yml"],
85173
85272
  extensions: ["yaml", "yml"],
85174
85273
  load() {
85175
- return import('./index-DMvr0-pP.js').then(m => m.yaml());
85274
+ return import('./index-BTO4og7t.js').then(m => m.yaml());
85176
85275
  }
85177
85276
  }),
85178
85277
  // Legacy modes ported from CodeMirror 5
@@ -85968,13 +86067,13 @@ const languages = [
85968
86067
  name: "Vue",
85969
86068
  extensions: ["vue"],
85970
86069
  load() {
85971
- return import('./index-RKZ-F77P.js').then(m => m.vue());
86070
+ return import('./index-Wr3SUBO9.js').then(m => m.vue());
85972
86071
  }
85973
86072
  }),
85974
86073
  /*@__PURE__*/LanguageDescription.of({
85975
86074
  name: "Angular Template",
85976
86075
  load() {
85977
- return import('./index-DHgo3Ne_.js').then(m => m.angular());
86076
+ return import('./index-oTzD1_p-.js').then(m => m.angular());
85978
86077
  }
85979
86078
  })
85980
86079
  ];
@@ -157046,7 +157145,7 @@ function createRenderDelaySampler() {
157046
157145
  };
157047
157146
  }
157048
157147
 
157049
- const ImagePanelComponent = /*#__PURE__*/React__default.lazy(async () => await import('./index-DTCT-lVn.js'));
157148
+ const ImagePanelComponent = /*#__PURE__*/React__default.lazy(async () => await import('./index-BqTw2FSJ.js'));
157050
157149
  const ImagePanelBody = ({
157051
157150
  topic,
157052
157151
  frameRenderedEvent
@@ -157115,7 +157214,7 @@ const ImagePanel = /*#__PURE__*/React__default.memo(function ImagePanel(props) {
157115
157214
  // License, v2.0. If a copy of the MPL was not distributed with this
157116
157215
  // file, You can obtain one at http://mozilla.org/MPL/2.0/
157117
157216
 
157118
- const ThreeDeeRenderComponent = /*#__PURE__*/React__default.lazy(async () => await import('./index-DzyYicoH.js'));
157217
+ const ThreeDeeRenderComponent = /*#__PURE__*/React__default.lazy(async () => await import('./index-DMmaMUCD.js'));
157119
157218
  const PointCloudPanelBody = ({
157120
157219
  topic,
157121
157220
  frameRenderedEvent
@@ -157146,13 +157245,13 @@ const PointCloudPanelBody = ({
157146
157245
  cameraState: {
157147
157246
  distance: -1000,
157148
157247
  perspective: true,
157149
- phi: 0,
157248
+ phi: 89,
157150
157249
  target: [0, 0, 0],
157151
157250
  targetOffset: [0, 0, 0],
157152
157251
  targetOrientation: [0, 0, 0, 1],
157153
- thetaOffset: 0,
157252
+ thetaOffset: 180,
157154
157253
  fovy: getFovy(),
157155
- near: 100,
157254
+ near: 5,
157156
157255
  far: 10000
157157
157256
  },
157158
157257
  imageMode: {
@@ -1,12 +1,12 @@
1
- import { N as styleTags, O as tags, V as LRParser, Q as LRLanguage, J as indentNodeProp, K as continuedIndent, $ as flatIndent, a0 as delimitedIndent, M as foldNodeProp, a1 as foldInside, T as LanguageSupport } from './index-Dcus_L6F.js';
1
+ import { N as styleTags, O as tags, V as LRParser, Q as LRLanguage, J as indentNodeProp, K as continuedIndent, $ as flatIndent, a0 as delimitedIndent, M as foldNodeProp, a1 as foldInside, T as LanguageSupport } from './index-DWgnF3_o.js';
2
2
  import './tslib.es6-C73eoP_E.js';
3
3
  import 'react';
4
4
  import 'react-mosaic-component';
5
5
  import './_commonjsHelpers-E-ZsRS8r.js';
6
6
  import '@mui/material';
7
7
  import './isArrayLikeObject-Bytw9p-q.js';
8
- import './utils-Cmsz3FxA.js';
9
8
  import './comlink-DHMAu6X7.js';
9
+ import './utils-Hzt3wxhG.js';
10
10
  import './FoxgloveServer-C39Uooyk.js';
11
11
  import 'ms';
12
12
  import './foxglove-protocol-CYoMweAY.js';
@@ -1,12 +1,12 @@
1
- import { U as ExternalTokenizer, N as styleTags, O as tags, V as LRParser, Q as LRLanguage, J as indentNodeProp, K as continuedIndent, $ as flatIndent, a0 as delimitedIndent, M as foldNodeProp, a1 as foldInside, T as LanguageSupport } from './index-Dcus_L6F.js';
1
+ import { U as ExternalTokenizer, N as styleTags, O as tags, V as LRParser, Q as LRLanguage, J as indentNodeProp, K as continuedIndent, $ as flatIndent, a0 as delimitedIndent, M as foldNodeProp, a1 as foldInside, T as LanguageSupport } from './index-DWgnF3_o.js';
2
2
  import './tslib.es6-C73eoP_E.js';
3
3
  import 'react';
4
4
  import 'react-mosaic-component';
5
5
  import './_commonjsHelpers-E-ZsRS8r.js';
6
6
  import '@mui/material';
7
7
  import './isArrayLikeObject-Bytw9p-q.js';
8
- import './utils-Cmsz3FxA.js';
9
8
  import './comlink-DHMAu6X7.js';
9
+ import './utils-Hzt3wxhG.js';
10
10
  import './FoxgloveServer-C39Uooyk.js';
11
11
  import 'ms';
12
12
  import './foxglove-protocol-CYoMweAY.js';
@@ -1,12 +1,12 @@
1
- import { U as ExternalTokenizer, N as styleTags, O as tags, V as LRParser, Q as LRLanguage, J as indentNodeProp, K as continuedIndent, M as foldNodeProp, a1 as foldInside, T as LanguageSupport } from './index-Dcus_L6F.js';
1
+ import { U as ExternalTokenizer, N as styleTags, O as tags, V as LRParser, Q as LRLanguage, J as indentNodeProp, K as continuedIndent, M as foldNodeProp, a1 as foldInside, T as LanguageSupport } from './index-DWgnF3_o.js';
2
2
  import './tslib.es6-C73eoP_E.js';
3
3
  import 'react';
4
4
  import 'react-mosaic-component';
5
5
  import './_commonjsHelpers-E-ZsRS8r.js';
6
6
  import '@mui/material';
7
7
  import './isArrayLikeObject-Bytw9p-q.js';
8
- import './utils-Cmsz3FxA.js';
9
8
  import './comlink-DHMAu6X7.js';
9
+ import './utils-Hzt3wxhG.js';
10
10
  import './FoxgloveServer-C39Uooyk.js';
11
11
  import 'ms';
12
12
  import './foxglove-protocol-CYoMweAY.js';
@@ -1,12 +1,12 @@
1
- import { U as ExternalTokenizer, a2 as ContextTracker, N as styleTags, O as tags, V as LRParser, Z as syntaxTree, X as ifNotIn, Q as LRLanguage, J as indentNodeProp, a0 as delimitedIndent, M as foldNodeProp, a1 as foldInside, T as LanguageSupport, a5 as IterMode, Y as completeFromList, a6 as NodeWeakMap, a4 as snippetCompletion } from './index-Dcus_L6F.js';
1
+ import { U as ExternalTokenizer, a2 as ContextTracker, N as styleTags, O as tags, V as LRParser, Z as syntaxTree, X as ifNotIn, Q as LRLanguage, J as indentNodeProp, a0 as delimitedIndent, M as foldNodeProp, a1 as foldInside, T as LanguageSupport, a5 as IterMode, Y as completeFromList, a6 as NodeWeakMap, a4 as snippetCompletion } from './index-DWgnF3_o.js';
2
2
  import './tslib.es6-C73eoP_E.js';
3
3
  import 'react';
4
4
  import 'react-mosaic-component';
5
5
  import './_commonjsHelpers-E-ZsRS8r.js';
6
6
  import '@mui/material';
7
7
  import './isArrayLikeObject-Bytw9p-q.js';
8
- import './utils-Cmsz3FxA.js';
9
8
  import './comlink-DHMAu6X7.js';
9
+ import './utils-Hzt3wxhG.js';
10
10
  import './FoxgloveServer-C39Uooyk.js';
11
11
  import 'ms';
12
12
  import './foxglove-protocol-CYoMweAY.js';
@@ -1,12 +1,12 @@
1
- import { N as styleTags, O as tags, Q as LRLanguage, T as LanguageSupport, V as LRParser, a3 as LocalTokenGroup, aa as html, ab as parseMixed, ad as javascriptLanguage } from './index-Dcus_L6F.js';
1
+ import { N as styleTags, O as tags, Q as LRLanguage, T as LanguageSupport, V as LRParser, a3 as LocalTokenGroup, aa as html, ab as parseMixed, ad as javascriptLanguage } from './index-DWgnF3_o.js';
2
2
  import './tslib.es6-C73eoP_E.js';
3
3
  import 'react';
4
4
  import 'react-mosaic-component';
5
5
  import './_commonjsHelpers-E-ZsRS8r.js';
6
6
  import '@mui/material';
7
7
  import './isArrayLikeObject-Bytw9p-q.js';
8
- import './utils-Cmsz3FxA.js';
9
8
  import './comlink-DHMAu6X7.js';
9
+ import './utils-Hzt3wxhG.js';
10
10
  import './FoxgloveServer-C39Uooyk.js';
11
11
  import 'ms';
12
12
  import './foxglove-protocol-CYoMweAY.js';
@@ -1,12 +1,12 @@
1
- import { N as styleTags, O as tags, ad as javascriptLanguage, Q as LRLanguage, T as LanguageSupport, V as LRParser, aa as html, ab as parseMixed, U as ExternalTokenizer } from './index-Dcus_L6F.js';
1
+ import { N as styleTags, O as tags, ad as javascriptLanguage, Q as LRLanguage, T as LanguageSupport, V as LRParser, aa as html, ab as parseMixed, U as ExternalTokenizer } from './index-DWgnF3_o.js';
2
2
  import './tslib.es6-C73eoP_E.js';
3
3
  import 'react';
4
4
  import 'react-mosaic-component';
5
5
  import './_commonjsHelpers-E-ZsRS8r.js';
6
6
  import '@mui/material';
7
7
  import './isArrayLikeObject-Bytw9p-q.js';
8
- import './utils-Cmsz3FxA.js';
9
8
  import './comlink-DHMAu6X7.js';
9
+ import './utils-Hzt3wxhG.js';
10
10
  import './FoxgloveServer-C39Uooyk.js';
11
11
  import 'ms';
12
12
  import './foxglove-protocol-CYoMweAY.js';
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
- export { ah as ImagePanel, ag as PanelLayout, ai as PointCloudPanel, ae as VisualizerConnection, af as VisualizerContext } from './index-Dcus_L6F.js';
1
+ export { ah as ImagePanel, ag as PanelLayout, ai as PointCloudPanel, ae as VisualizerConnection, af as VisualizerContext } from './index-DWgnF3_o.js';
2
2
  import './tslib.es6-C73eoP_E.js';
3
3
  import 'react';
4
4
  import 'react-mosaic-component';
5
5
  import './_commonjsHelpers-E-ZsRS8r.js';
6
6
  import '@mui/material';
7
7
  import './isArrayLikeObject-Bytw9p-q.js';
8
- import './utils-Cmsz3FxA.js';
9
8
  import './comlink-DHMAu6X7.js';
9
+ import './utils-Hzt3wxhG.js';
10
10
  import './FoxgloveServer-C39Uooyk.js';
11
11
  import 'ms';
12
12
  import './foxglove-protocol-CYoMweAY.js';
@@ -1,7 +1,8 @@
1
1
  import { type Time } from "@foxglove/rostime";
2
2
  import { type MessageEvent, PlayerPresence, type PlayerProblem, type PlayerState } from "@foxglove/studio-base/players/types";
3
3
  import type { FoxgloveMessage } from "./communicator.js";
4
- import { depthToPointcloudWorkerPool } from '../messaging/deserialization/pointcloud/utils.js';
4
+ import { depthToPointcloudWorkerPool } from "../messaging/deserialization/pointcloud/poitcloudPoolManager.js";
5
+ import type { PointCloudWithDimensions } from "../messaging/deserialization/video/depth.js";
5
6
  import { type MessageHandler } from "../messaging/message-handler.js";
6
7
  import { EventMetricsManager, ThroughputMetricsManager } from "../utils/metrics-manager.js";
7
8
  import { PoitCloudSyncFramework } from "../utils/poitcloud-sync.js";
@@ -51,6 +52,7 @@ export declare abstract class FoxgloveConnection {
51
52
  getTopicMetrics(topic: string): Metrics;
52
53
  protected getCurrentTime(): Time;
53
54
  protected onMessagePacket(event: globalThis.MessageEvent<FoxgloveMessage>): void;
55
+ protected submitPoitcloudFrameCallback(coloredEvent: MessageEvent, poitcloudFrame: PointCloudWithDimensions, message: unknown): void;
54
56
  protected handleParsePoitcloudMessage(coloredEvent: MessageEvent): Promise<void>;
55
57
  protected parseResolutionFromMessage(message: unknown, topic: string): void;
56
58
  protected handleParsedMessage(event: MessageEvent): void;
@@ -1 +1 @@
1
- {"version":3,"file":"foxglove-connection.d.ts","sourceRoot":"","sources":["../../../../src/connection/foxglove-connection.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,IAAI,EAAyC,MAAM,mBAAmB,CAAC;AAErF,OAAO,EACL,KAAK,YAAY,EAEjB,cAAc,EACd,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAA+B,MAAM,kDAAkD,CAAC;AAG5H,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAIpE,MAAM,MAAM,OAAO,GAAG;IACpB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG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AC7D,SAAS,CAAC,aAAa,sBAA6B;IACpD,SAAS,CAAC,sBAAsB,yBAAgC;IAChE,SAAS,CAAC,2BAA2B,8BAGnC;IAEF,SAAS,CAAC,cAAc,EAAE,cAAc,CAAC;IAEzC,SAAS,CAAC,MAAM,EAAE;QAChB,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,IAAI,EAAE,MAAM,CAAC;YACb,UAAU,EAAE,MAAM,CAAC;SACpB,CAAC;KACH,CAAM;gBAGY,EAAE,EAAE,MAAM;IAKtB,WAAW,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAKxE,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAS9C,SAAS,CAAC,cAAc,IAAI,IAAI;IAIhC,SAAS,CAAC,eAAe,CAAC,KAAK,EAAE,UAAU,CAAC,YAAY,CAAC,eAAe,CAAC,GAAG,IAAI;IAMhF,SAAS,CAAC,4BAA4B,CAAC,YAAY,EAAE,YAAY,EAAC,cAAc,EAAE,wBAAwB,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;cAenH,2BAA2B,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAStF,SAAS,CAAC,0BAA0B,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM;IAUpE,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAmBxD,SAAS,CAAC,SAAS;;MAyDhB;CACJ"}
@@ -5,8 +5,7 @@ import { debouncePromise } from "@foxglove/den/async";
5
5
  import { fromMillis, isGreaterThan, isLessThan } from "@foxglove/rostime";
6
6
  import { estimateObjectSize } from "@foxglove/studio-base/players/messageMemoryEstimation";
7
7
  import { PlayerCapabilities, PlayerPresence } from "@foxglove/studio-base/players/types";
8
- import { depthToPointcloudWorkerPool } from '../messaging/deserialization/pointcloud/utils.js';
9
- import { uint8ArrayToUint16Array } from "../messaging/deserialization/pointcloud/utils.js";
8
+ import { depthToPointcloudWorkerPool } from "../messaging/deserialization/pointcloud/poitcloudPoolManager.js";
10
9
  import { createMessageHandler } from "../messaging/message-handler.js";
11
10
  import { EventMetricsManager, ThroughputMetricsManager } from "../utils/metrics-manager.js";
12
11
  import { PoitCloudSyncFramework } from "../utils/poitcloud-sync.js";
@@ -45,7 +44,7 @@ export class FoxgloveConnection {
45
44
  throughputMetrics = new ThroughputMetricsManager();
46
45
  decodeMetrics = new EventMetricsManager();
47
46
  PoitCloudSyncFramework = new PoitCloudSyncFramework();
48
- depthToPointcloudWorkerPool = new depthToPointcloudWorkerPool();
47
+ depthToPointcloudWorkerPool = new depthToPointcloudWorkerPool((event, frame, message) => { this.submitPoitcloudFrameCallback(event, frame, message); });
49
48
  // message handler
50
49
  messageHandler;
51
50
  topics = {};
@@ -73,38 +72,23 @@ export class FoxgloveConnection {
73
72
  this.throughputMetrics.registerEvent(event.data.topic, event.data.buffer.byteLength);
74
73
  this.messageHandler.handle(event.data);
75
74
  }
75
+ submitPoitcloudFrameCallback(coloredEvent, poitcloudFrame, message) {
76
+ coloredEvent.topic = "Point Cloud";
77
+ coloredEvent.schemaName = "foxglove.PointCloud";
78
+ coloredEvent.message = poitcloudFrame;
79
+ // @ts-expect-error - ITS unknow
80
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
81
+ coloredEvent.message.data = message;
82
+ const messageSize = estimateObjectSize(coloredEvent.message);
83
+ coloredEvent.sizeInBytes = messageSize;
84
+ this.messageEvents.push(coloredEvent);
85
+ this.emitState();
86
+ }
76
87
  async handleParsePoitcloudMessage(coloredEvent) {
77
88
  const poitcloudFrame = this.PoitCloudSyncFramework.getFrame(coloredEvent.receiveTime.nsec);
78
- const getNeuralCameraIntrinsics = () => {
79
- const neuralCameraIntrinsicsData = localStorage.getItem("neuralCameraIntrinsics");
80
- if (neuralCameraIntrinsicsData) {
81
- return JSON.parse(neuralCameraIntrinsicsData);
82
- }
83
- return null;
84
- };
85
89
  if (poitcloudFrame) {
86
- /* Useful for debugging
87
- if (Math.abs(coloredEvent.receiveTime.nsec- poitcloudFrame.timestamp.nsec)/10 ** 9) {
88
- console.log("Sync delay under 1s", Math.abs(coloredEvent.receiveTime.nsec- poitcloudFrame.timestamp.nsec)/ 10 **9);
89
- }
90
- else {
91
- console.log("Sync delay over 1s", Math.abs(coloredEvent.receiveTime.nsec- poitcloudFrame.timestamp.nsec)/10 ** 9);
92
- }
93
- */
94
- const neuralCameraIntrinsics = getNeuralCameraIntrinsics();
95
- // @ts-expect-error - ITS unknow
96
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
97
- const message = await this.depthToPointcloudWorkerPool.depthToPointcloudGPU(uint8ArrayToUint16Array(poitcloudFrame.data), poitcloudFrame.width ?? 0, poitcloudFrame.height, neuralCameraIntrinsics.right.focalLenght.x, neuralCameraIntrinsics.right.focalLenght.y, neuralCameraIntrinsics.right.principalPoint.x, neuralCameraIntrinsics.right.principalPoint.y, coloredEvent.message.data, poitcloudFrame.width ?? 0, poitcloudFrame.height ?? 0);
98
- coloredEvent.topic = "Point Cloud";
99
- coloredEvent.schemaName = "foxglove.PointCloud";
100
- coloredEvent.message = poitcloudFrame;
101
- // @ts-expect-error - ITS unknow
102
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
103
- coloredEvent.message.data = message;
104
- const messageSize = estimateObjectSize(coloredEvent.message);
105
- coloredEvent.sizeInBytes = messageSize;
106
- this.messageEvents.push(coloredEvent);
107
- this.emitState();
90
+ const neuralCameraIntrinsics = JSON.parse(localStorage.getItem("neuralCameraIntrinsics") ?? "{}");
91
+ await this.depthToPointcloudWorkerPool.queueDepthFrame({ depthFrame: poitcloudFrame, width: poitcloudFrame.width ?? 0, height: poitcloudFrame.height ?? 0, fx: neuralCameraIntrinsics.right.focalLenght.x, fy: neuralCameraIntrinsics.right.focalLenght.y, cx: neuralCameraIntrinsics.right.principalPoint.x, cy: neuralCameraIntrinsics.right.principalPoint.y, colorFrame: coloredEvent, i420Width: poitcloudFrame.width ?? 0, i420Height: poitcloudFrame.height ?? 0 });
108
92
  }
109
93
  }
110
94
  parseResolutionFromMessage(message, topic) {