@viamrobotics/motion-tools 1.19.1 → 1.22.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.
- package/dist/FrameConfigUpdater.svelte.d.ts +0 -1
- package/dist/FrameConfigUpdater.svelte.js +6 -24
- package/dist/buf/draw/v1/metadata_pb.d.ts +39 -0
- package/dist/buf/draw/v1/metadata_pb.js +55 -0
- package/dist/buf/draw/v1/service_connect.d.ts +34 -1
- package/dist/buf/draw/v1/service_connect.js +34 -1
- package/dist/buf/draw/v1/service_pb.d.ts +136 -0
- package/dist/buf/draw/v1/service_pb.js +201 -0
- package/dist/components/Entities/Arrows/ArrowGroups.svelte +1 -0
- package/dist/components/Entities/Arrows/Arrows.svelte +1 -1
- package/dist/components/Entities/Points.svelte +23 -23
- package/dist/components/Entities/Pose.svelte +18 -13
- package/dist/components/Entities/hooks/useEntityEvents.svelte.js +18 -1
- package/dist/components/FileDrop/FileDrop.svelte +8 -1
- package/dist/components/FileDrop/useFileDrop.svelte.js +16 -2
- package/dist/components/PCD.svelte +9 -1
- package/dist/components/PCD.svelte.d.ts +2 -0
- package/dist/components/PointerMissBox.svelte +1 -1
- package/dist/components/Scene.svelte +2 -0
- package/dist/components/SceneProviders.svelte +4 -0
- package/dist/components/SelectedTransformControls.svelte +227 -0
- package/dist/components/SelectedTransformControls.svelte.d.ts +3 -0
- package/dist/components/Snapshot.svelte +12 -7
- package/dist/components/StaticGeometries.svelte +3 -56
- package/dist/components/overlay/AddRelationship.svelte +25 -3
- package/dist/components/overlay/Details.svelte +290 -229
- package/dist/components/overlay/dashboard/Button.svelte +4 -2
- package/dist/components/overlay/dashboard/Button.svelte.d.ts +1 -1
- package/dist/components/overlay/dashboard/Dashboard.svelte +43 -33
- package/dist/draw.d.ts +22 -9
- package/dist/draw.js +71 -41
- package/dist/ecs/relations.js +1 -1
- package/dist/ecs/traits.d.ts +17 -0
- package/dist/ecs/traits.js +9 -0
- package/dist/editing/FrameEditSession.d.ts +37 -0
- package/dist/editing/FrameEditSession.js +178 -0
- package/dist/hooks/useDrawService.svelte.d.ts +2 -0
- package/dist/hooks/useDrawService.svelte.js +139 -20
- package/dist/hooks/useFrameEditSession.svelte.d.ts +15 -0
- package/dist/hooks/useFrameEditSession.svelte.js +36 -0
- package/dist/hooks/useFrames.svelte.js +37 -2
- package/dist/hooks/usePartConfig.svelte.js +10 -0
- package/dist/hooks/useRelationships.svelte.d.ts +12 -0
- package/dist/hooks/useRelationships.svelte.js +78 -0
- package/dist/hooks/useSettings.svelte.d.ts +1 -2
- package/dist/hooks/useSettings.svelte.js +1 -2
- package/dist/hooks/useWorldState.svelte.js +10 -4
- package/dist/metadata.d.ts +7 -3
- package/dist/metadata.js +26 -2
- package/dist/snapshot.d.ts +6 -1
- package/dist/snapshot.js +10 -5
- package/dist/transform.js +13 -0
- package/package.json +7 -4
package/dist/snapshot.js
CHANGED
|
@@ -58,13 +58,18 @@ export const spawnSnapshotEntities = (world, snapshot) => {
|
|
|
58
58
|
const entities = [];
|
|
59
59
|
const options = { removable: true, showAxesHelper: false };
|
|
60
60
|
for (const transform of snapshot.transforms) {
|
|
61
|
-
|
|
61
|
+
const spawned = drawTransform(world, transform, traits.SnapshotAPI, options);
|
|
62
|
+
entities.push({
|
|
63
|
+
entity: spawned.entity,
|
|
64
|
+
relationships: spawned.relationships,
|
|
65
|
+
});
|
|
62
66
|
}
|
|
63
67
|
for (const drawing of snapshot.drawings) {
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
const spawned = drawDrawing(world, drawing, traits.SnapshotAPI, options);
|
|
69
|
+
entities.push({
|
|
70
|
+
entity: spawned.entity,
|
|
71
|
+
relationships: spawned.relationships,
|
|
72
|
+
});
|
|
68
73
|
}
|
|
69
74
|
return entities;
|
|
70
75
|
};
|
package/dist/transform.js
CHANGED
|
@@ -105,3 +105,16 @@ export const matrixToPose = (matrix) => {
|
|
|
105
105
|
pose.theta = MathUtils.radToDeg(ov.th);
|
|
106
106
|
return pose;
|
|
107
107
|
};
|
|
108
|
+
export const composeRenderedPose = (livePose, baselinePose, editedPose) => matrixToPose(poseToMatrix(livePose)
|
|
109
|
+
.multiply(poseToMatrix(baselinePose).invert())
|
|
110
|
+
.multiply(poseToMatrix(editedPose)));
|
|
111
|
+
export const composeEditedPoseForRenderedPose = (baselinePose, livePose, renderedPose) => matrixToPose(poseToMatrix(baselinePose)
|
|
112
|
+
.multiply(poseToMatrix(livePose).invert())
|
|
113
|
+
.multiply(poseToMatrix(renderedPose)));
|
|
114
|
+
export const isFinitePose = (pose) => Number.isFinite(pose.x) &&
|
|
115
|
+
Number.isFinite(pose.y) &&
|
|
116
|
+
Number.isFinite(pose.z) &&
|
|
117
|
+
Number.isFinite(pose.oX) &&
|
|
118
|
+
Number.isFinite(pose.oY) &&
|
|
119
|
+
Number.isFinite(pose.oZ) &&
|
|
120
|
+
Number.isFinite(pose.theta);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viamrobotics/motion-tools",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.0",
|
|
4
4
|
"description": "Motion visualization with Viam",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -25,13 +25,14 @@
|
|
|
25
25
|
"@testing-library/jest-dom": "6.8.0",
|
|
26
26
|
"@testing-library/svelte": "5.2.8",
|
|
27
27
|
"@testing-library/user-event": "^14.6.1",
|
|
28
|
-
"@threlte/core": "8.5.
|
|
29
|
-
"@threlte/extras": "9.
|
|
28
|
+
"@threlte/core": "8.5.11",
|
|
29
|
+
"@threlte/extras": "9.15.0",
|
|
30
30
|
"@threlte/rapier": "3.4.1",
|
|
31
31
|
"@threlte/xr": "1.5.2",
|
|
32
32
|
"@types/bun": "1.2.21",
|
|
33
33
|
"@types/earcut": "^3.0.0",
|
|
34
34
|
"@types/lodash-es": "4.17.12",
|
|
35
|
+
"@types/node": "^25.6.0",
|
|
35
36
|
"@types/three": "0.183.1",
|
|
36
37
|
"@typescript-eslint/eslint-plugin": "8.56.1",
|
|
37
38
|
"@typescript-eslint/parser": "8.56.1",
|
|
@@ -65,6 +66,7 @@
|
|
|
65
66
|
"runed": "0.31.1",
|
|
66
67
|
"svelte": "5.55.0",
|
|
67
68
|
"svelte-check": "4.4.5",
|
|
69
|
+
"svelte-tweakpane-ui": "^1.5.16",
|
|
68
70
|
"svelte-virtuallists": "1.4.2",
|
|
69
71
|
"tailwindcss": "4.1.13",
|
|
70
72
|
"three": "0.183.2",
|
|
@@ -104,6 +106,7 @@
|
|
|
104
106
|
"lucide-svelte": ">=0.511",
|
|
105
107
|
"runed": ">=0.28",
|
|
106
108
|
"svelte": ">=5",
|
|
109
|
+
"svelte-tweakpane-ui": ">=1.5",
|
|
107
110
|
"svelte-virtuallists": ">=1"
|
|
108
111
|
},
|
|
109
112
|
"engines": {
|
|
@@ -123,7 +126,7 @@
|
|
|
123
126
|
},
|
|
124
127
|
"repository": {
|
|
125
128
|
"type": "git",
|
|
126
|
-
"url": "git+https://github.com/
|
|
129
|
+
"url": "git+https://github.com/viamrobotics/visualization.git"
|
|
127
130
|
},
|
|
128
131
|
"files": [
|
|
129
132
|
"dist",
|