From 601e19601e234b7fd0fe41cb71692896bfb91eec Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Wed, 23 Oct 2024 17:27:37 +0200 Subject: [PATCH] feat: add support of avx-osi --- package.json | 8 ++++---- src/index.ts | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index bb0b05a..fad148b 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { - "name": "asam-osi-converter", - "displayName": "ASAM OSI Converter", - "description": "Visualises data following the standard of the ASAM Open Simulation Interface (ASAM OSI) using the native 3D panel of Lichtblick", + "name": "asam-avx-osi-converter", + "displayName": "ASAM AVX OSI Converter", + "description": "Visualises data following the standard and Ansys-AVX of the ASAM Open Simulation Interface (ASAM OSI) using the native 3D panel of Lichtblick", "publisher": "Lichtblick", "homepage": "https://www.asam.net/standards/detail/osi/", - "version": "0.0.1", + "version": "0.0.1-avx", "license": "MIT", "main": "./dist/extension.js", "keywords": [ diff --git a/src/index.ts b/src/index.ts index d73e34a..bca57a4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -518,4 +518,36 @@ export function activate(extensionContext: ExtensionContext): void { converter: (message: SensorView) => convertGrountTruthToFrameTransform(message.global_ground_truth!), }); + + extensionContext.registerMessageConverter({ + fromSchemaName: "avx_osi3.GroundTruth", + toSchemaName: "foxglove.SceneUpdate", + converter: convertGrountTruthToSceneUpdate, + }); + + extensionContext.registerMessageConverter({ + fromSchemaName: "avx_osi3.SensorView", + toSchemaName: "foxglove.SceneUpdate", + converter: (osiSensorView: SensorView) => + convertGrountTruthToSceneUpdate(osiSensorView.global_ground_truth!), + }); + + extensionContext.registerMessageConverter({ + fromSchemaName: "avx_osi3.SensorData", + toSchemaName: "foxglove.SceneUpdate", + converter: convertSensorDataToSceneUpdate, + }); + + extensionContext.registerMessageConverter({ + fromSchemaName: "avx_osi3.GroundTruth", + toSchemaName: "foxglove.FrameTransform", + converter: convertGrountTruthToFrameTransform, + }); + + extensionContext.registerMessageConverter({ + fromSchemaName: "avx_osi3.SensorView", + toSchemaName: "foxglove.FrameTransform", + converter: (message: SensorView) => + convertGrountTruthToFrameTransform(message.global_ground_truth!), + }); }