@wandelbots/wandelbots-js-react-components 5.5.1-pr.fix-standardize-output.591.c5418f1 → 5.5.2-pr.fix-performance-issues.594.c24b644
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/3d.cjs +1 -1
- package/dist/3d.js +1 -1
- package/dist/SafetyBar/index.cjs +1 -1
- package/dist/SafetyBar/index.js +1 -1
- package/dist/chunks/{MotionGroupVisualizer-DDvhDBEq.js → MotionGroupVisualizer-3kwxPNYU.js} +455 -453
- package/dist/chunks/MotionGroupVisualizer-4AcH6kaR.cjs +1 -0
- package/dist/chunks/{SafetyBar-CLp3W5D7.js → SafetyBar-C8whliAf.js} +1 -1
- package/dist/chunks/{SafetyBar-Dq9qSLtS.cjs → SafetyBar-CLm3UQRA.cjs} +1 -1
- package/dist/chunks/{externalizeComponent-UnCHtc94.cjs → externalizeComponent-BHZdH14U.cjs} +2 -2
- package/dist/chunks/{externalizeComponent-BuuzAqKe.js → externalizeComponent-D6S3WLFc.js} +34 -32
- package/dist/chunks/{interpolation-B8AQk0uI.cjs → interpolation-B84QX33C.cjs} +1 -1
- package/dist/chunks/{interpolation-BfD7X52s.js → interpolation-D9WFd-j_.js} +1 -1
- package/dist/chunks/{theming-DT32b-FT.js → theming-CLIhckeP.js} +3 -3
- package/dist/chunks/{theming-B8Wz2VOQ.cjs → theming-DnEooKgA.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +4 -4
- package/dist/index.cjs +1 -1
- package/dist/index.js +5 -5
- package/package.json +1 -1
- package/dist/chunks/MotionGroupVisualizer-C6wNomDj.cjs +0 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
1
|
+
import { jsx as r, jsxs as w, Fragment as E } from "react/jsx-runtime";
|
|
2
2
|
import * as b from "three";
|
|
3
|
-
import { Matrix4 as R, Vector3 as
|
|
4
|
-
import { ConvexGeometry as
|
|
5
|
-
import
|
|
6
|
-
import { d as Ge, v as
|
|
7
|
-
import { Environment as
|
|
8
|
-
import { useTheme as
|
|
3
|
+
import { Matrix4 as R, Vector3 as L, Quaternion as W } from "three";
|
|
4
|
+
import { ConvexGeometry as se, RoundedBoxGeometry as Le } from "three-stdlib";
|
|
5
|
+
import Se, { useMemo as A, useRef as M, useEffect as T, useState as S, useCallback as G, Suspense as ae } from "react";
|
|
6
|
+
import { d as Ge, v as Pe, o as Ae, e as j } from "./externalizeComponent-D6S3WLFc.js";
|
|
7
|
+
import { Environment as Ie, Lightformer as P, Line as $, useGLTF as Fe, Bounds as Z } from "@react-three/drei";
|
|
8
|
+
import { useTheme as De } from "@mui/material/styles";
|
|
9
9
|
import v from "@mui/material/Box";
|
|
10
10
|
import Q from "@mui/material/Button";
|
|
11
|
-
import
|
|
11
|
+
import Oe from "@mui/material/Card";
|
|
12
12
|
import z from "@mui/material/Divider";
|
|
13
13
|
import ee from "@mui/material/Typography";
|
|
14
|
-
import { useThree as
|
|
15
|
-
import { observer as
|
|
16
|
-
import { useTranslation as
|
|
17
|
-
import { V as
|
|
18
|
-
import { NovaClient as
|
|
14
|
+
import { useThree as le, useFrame as ce, Canvas as te } from "@react-three/fiber";
|
|
15
|
+
import { observer as Ve } from "mobx-react-lite";
|
|
16
|
+
import { useTranslation as Ue } from "react-i18next";
|
|
17
|
+
import { V as ue, c as fe, b as re } from "./interpolation-D9WFd-j_.js";
|
|
18
|
+
import { NovaClient as Ce, Manufacturer as _, JointTypeEnum as C } from "@wandelbots/nova-js/v2";
|
|
19
19
|
import { ErrorBoundary as pe } from "react-error-boundary";
|
|
20
|
-
function
|
|
20
|
+
function Ee(e) {
|
|
21
21
|
switch (e.shape_type) {
|
|
22
22
|
case "convex_hull":
|
|
23
|
-
return new
|
|
23
|
+
return new se(
|
|
24
24
|
e.vertices.map(
|
|
25
25
|
(t) => new b.Vector3(
|
|
26
26
|
t[0] / 1e3,
|
|
@@ -59,46 +59,46 @@ function je({
|
|
|
59
59
|
collider: n,
|
|
60
60
|
children: t
|
|
61
61
|
}) {
|
|
62
|
-
var
|
|
63
|
-
const
|
|
62
|
+
var f, c;
|
|
63
|
+
const l = ((f = n.pose) == null ? void 0 : f.position) ?? [0, 0, 0], i = ((c = n.pose) == null ? void 0 : c.orientation) ?? [0, 0, 0];
|
|
64
64
|
return n.margin && console.warn(`${e} margin is not supported`), /* @__PURE__ */ r(
|
|
65
65
|
"mesh",
|
|
66
66
|
{
|
|
67
67
|
name: e,
|
|
68
68
|
position: new b.Vector3(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
l[0],
|
|
70
|
+
l[1],
|
|
71
|
+
l[2]
|
|
72
72
|
).divideScalar(1e3),
|
|
73
73
|
rotation: new b.Euler(i[0], i[1], i[2], "XYZ"),
|
|
74
|
-
geometry:
|
|
74
|
+
geometry: Ee(n.shape),
|
|
75
75
|
children: t
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Je({
|
|
80
80
|
name: e,
|
|
81
81
|
colliders: n,
|
|
82
82
|
meshChildrenProvider: t,
|
|
83
|
-
...
|
|
83
|
+
...l
|
|
84
84
|
}) {
|
|
85
|
-
return /* @__PURE__ */ r("group", { name: e, ...
|
|
85
|
+
return /* @__PURE__ */ r("group", { name: e, ...l, children: Object.entries(n).map(([i, f]) => /* @__PURE__ */ r(
|
|
86
86
|
je,
|
|
87
87
|
{
|
|
88
88
|
name: i,
|
|
89
|
-
collider:
|
|
90
|
-
children: t(i,
|
|
89
|
+
collider: f,
|
|
90
|
+
children: t(i, f)
|
|
91
91
|
},
|
|
92
92
|
i
|
|
93
93
|
)) });
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function bt({
|
|
96
96
|
scene: e,
|
|
97
97
|
meshChildrenProvider: n
|
|
98
98
|
}) {
|
|
99
99
|
const t = e.colliders;
|
|
100
100
|
return /* @__PURE__ */ r("group", { children: t && /* @__PURE__ */ r(
|
|
101
|
-
|
|
101
|
+
Je,
|
|
102
102
|
{
|
|
103
103
|
meshChildrenProvider: n,
|
|
104
104
|
colliders: t
|
|
@@ -106,12 +106,13 @@ function yt({
|
|
|
106
106
|
) });
|
|
107
107
|
}
|
|
108
108
|
function ne() {
|
|
109
|
-
return /* @__PURE__ */ r(
|
|
109
|
+
return /* @__PURE__ */ r(Ie, { frames: 1, children: /* @__PURE__ */ r(We, {}) });
|
|
110
110
|
}
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
const Be = [2, 0, 2, 0, 2, 0, 2, 0];
|
|
112
|
+
function We({ positions: e = Be }) {
|
|
113
|
+
return /* @__PURE__ */ w(E, { children: [
|
|
113
114
|
/* @__PURE__ */ r(
|
|
114
|
-
|
|
115
|
+
P,
|
|
115
116
|
{
|
|
116
117
|
intensity: 5,
|
|
117
118
|
"rotation-x": Math.PI / 2,
|
|
@@ -120,7 +121,7 @@ function Je({ positions: e = [2, 0, 2, 0, 2, 0, 2, 0] }) {
|
|
|
120
121
|
}
|
|
121
122
|
),
|
|
122
123
|
/* @__PURE__ */ r("group", { rotation: [0, 0.5, 0], children: /* @__PURE__ */ r("group", { children: e.map((n, t) => /* @__PURE__ */ r(
|
|
123
|
-
|
|
124
|
+
P,
|
|
124
125
|
{
|
|
125
126
|
form: "circle",
|
|
126
127
|
intensity: 5,
|
|
@@ -131,7 +132,7 @@ function Je({ positions: e = [2, 0, 2, 0, 2, 0, 2, 0] }) {
|
|
|
131
132
|
t
|
|
132
133
|
)) }) }),
|
|
133
134
|
/* @__PURE__ */ r(
|
|
134
|
-
|
|
135
|
+
P,
|
|
135
136
|
{
|
|
136
137
|
intensity: 40,
|
|
137
138
|
"rotation-y": Math.PI / 2,
|
|
@@ -140,7 +141,7 @@ function Je({ positions: e = [2, 0, 2, 0, 2, 0, 2, 0] }) {
|
|
|
140
141
|
}
|
|
141
142
|
),
|
|
142
143
|
/* @__PURE__ */ r(
|
|
143
|
-
|
|
144
|
+
P,
|
|
144
145
|
{
|
|
145
146
|
intensity: 20,
|
|
146
147
|
"rotation-y": -Math.PI,
|
|
@@ -149,7 +150,7 @@ function Je({ positions: e = [2, 0, 2, 0, 2, 0, 2, 0] }) {
|
|
|
149
150
|
}
|
|
150
151
|
),
|
|
151
152
|
/* @__PURE__ */ r(
|
|
152
|
-
|
|
153
|
+
P,
|
|
153
154
|
{
|
|
154
155
|
"rotation-y": Math.PI / 2,
|
|
155
156
|
position: [-5, -1, -1],
|
|
@@ -158,7 +159,7 @@ function Je({ positions: e = [2, 0, 2, 0, 2, 0, 2, 0] }) {
|
|
|
158
159
|
}
|
|
159
160
|
),
|
|
160
161
|
/* @__PURE__ */ r(
|
|
161
|
-
|
|
162
|
+
P,
|
|
162
163
|
{
|
|
163
164
|
"rotation-y": -Math.PI / 2,
|
|
164
165
|
position: [10, 1, 0],
|
|
@@ -167,7 +168,7 @@ function Je({ positions: e = [2, 0, 2, 0, 2, 0, 2, 0] }) {
|
|
|
167
168
|
}
|
|
168
169
|
),
|
|
169
170
|
/* @__PURE__ */ r(
|
|
170
|
-
|
|
171
|
+
P,
|
|
171
172
|
{
|
|
172
173
|
form: "ring",
|
|
173
174
|
color: "white",
|
|
@@ -179,55 +180,59 @@ function Je({ positions: e = [2, 0, 2, 0, 2, 0, 2, 0] }) {
|
|
|
179
180
|
)
|
|
180
181
|
] });
|
|
181
182
|
}
|
|
182
|
-
|
|
183
|
+
const oe = {
|
|
184
|
+
attach: "material",
|
|
185
|
+
color: "#009f4d",
|
|
186
|
+
opacity: 0.2,
|
|
187
|
+
depthTest: !1,
|
|
188
|
+
depthWrite: !1,
|
|
189
|
+
transparent: !0,
|
|
190
|
+
polygonOffset: !0
|
|
191
|
+
};
|
|
192
|
+
function wt({
|
|
183
193
|
safetyZones: e,
|
|
184
194
|
dhParameters: n,
|
|
185
195
|
...t
|
|
186
196
|
}) {
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
transparent: !0,
|
|
194
|
-
polygonOffset: !0
|
|
195
|
-
}, i = Ge(n ?? []), p = (h, l) => {
|
|
196
|
-
var d, y;
|
|
197
|
-
if (!((d = l == null ? void 0 : l.pose) != null && d.position) || !((y = l == null ? void 0 : l.pose) != null && y.orientation))
|
|
197
|
+
const l = A(
|
|
198
|
+
() => Ge(n ?? []),
|
|
199
|
+
[n]
|
|
200
|
+
), i = (c, o) => {
|
|
201
|
+
var u, d;
|
|
202
|
+
if (!((u = o == null ? void 0 : o.pose) != null && u.position) || !((d = o == null ? void 0 : o.pose) != null && d.orientation))
|
|
198
203
|
return null;
|
|
199
|
-
const
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
),
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
204
|
+
const y = new b.Vector3(
|
|
205
|
+
o.pose.position[0] / 1e3,
|
|
206
|
+
o.pose.position[1] / 1e3,
|
|
207
|
+
o.pose.position[2] / 1e3
|
|
208
|
+
), s = new b.Vector3(
|
|
209
|
+
o.pose.orientation[0],
|
|
210
|
+
o.pose.orientation[1],
|
|
211
|
+
o.pose.orientation[2]
|
|
207
212
|
);
|
|
208
|
-
let
|
|
209
|
-
const
|
|
210
|
-
switch (
|
|
213
|
+
let m;
|
|
214
|
+
const a = o.shape.shape_type === "plane" ? { ...oe, side: b.DoubleSide } : { ...oe, side: b.FrontSide };
|
|
215
|
+
switch (o.shape.shape_type) {
|
|
211
216
|
/**
|
|
212
217
|
* Plane shape, uses DH parameters to calculate the size of the plane (reach distance of a robot)
|
|
213
218
|
*/
|
|
214
219
|
case "plane":
|
|
215
|
-
|
|
220
|
+
m = /* @__PURE__ */ r("planeGeometry", { args: [l, l] });
|
|
216
221
|
break;
|
|
217
222
|
/**
|
|
218
223
|
* Sphere shape
|
|
219
224
|
*/
|
|
220
225
|
case "sphere": {
|
|
221
|
-
const
|
|
222
|
-
|
|
226
|
+
const p = (o == null ? void 0 : o.shape).radius / 1e3;
|
|
227
|
+
m = /* @__PURE__ */ r("sphereGeometry", { args: [p] });
|
|
223
228
|
break;
|
|
224
229
|
}
|
|
225
230
|
/**
|
|
226
231
|
* Capsule shape
|
|
227
232
|
*/
|
|
228
233
|
case "capsule": {
|
|
229
|
-
const
|
|
230
|
-
|
|
234
|
+
const p = (o == null ? void 0 : o.shape).radius / 1e3, h = (o == null ? void 0 : o.shape).cylinder_height / 1e3;
|
|
235
|
+
m = /* @__PURE__ */ r("capsuleGeometry", { args: [p, h] });
|
|
231
236
|
break;
|
|
232
237
|
}
|
|
233
238
|
/**
|
|
@@ -235,21 +240,21 @@ function gt({
|
|
|
235
240
|
* renderer to be able to visualize the convex hull.
|
|
236
241
|
*/
|
|
237
242
|
case "convex_hull": {
|
|
238
|
-
const
|
|
243
|
+
const p = (o == null ? void 0 : o.shape).vertices.map(
|
|
239
244
|
(g) => new b.Vector3(g[0] / 1e3, g[1] / 1e3, g[2] / 1e3)
|
|
240
|
-
),
|
|
241
|
-
if (
|
|
242
|
-
const
|
|
243
|
-
|
|
244
|
-
|
|
245
|
+
), h = Pe(p);
|
|
246
|
+
if (h.isCoplanar && h.normal) {
|
|
247
|
+
const x = new b.Vector3().addVectors(
|
|
248
|
+
p[0],
|
|
249
|
+
h.normal.multiplyScalar(1e-4)
|
|
245
250
|
);
|
|
246
|
-
|
|
251
|
+
p.push(x);
|
|
247
252
|
}
|
|
248
253
|
try {
|
|
249
|
-
|
|
254
|
+
m = /* @__PURE__ */ r(
|
|
250
255
|
"primitive",
|
|
251
256
|
{
|
|
252
|
-
object: new
|
|
257
|
+
object: new se(p),
|
|
253
258
|
attach: "geometry"
|
|
254
259
|
}
|
|
255
260
|
);
|
|
@@ -266,11 +271,11 @@ function gt({
|
|
|
266
271
|
* Basically a rounded box with a rectangular cross-section.
|
|
267
272
|
*/
|
|
268
273
|
case "rectangular_capsule": {
|
|
269
|
-
const
|
|
270
|
-
|
|
274
|
+
const p = o.shape, h = p.radius / 1e3, g = p.sphere_center_distance_x / 1e3, x = p.sphere_center_distance_y / 1e3, I = h * 2;
|
|
275
|
+
m = /* @__PURE__ */ r(
|
|
271
276
|
"primitive",
|
|
272
277
|
{
|
|
273
|
-
object: new
|
|
278
|
+
object: new Le(g, x, I, 2, h),
|
|
274
279
|
attach: "geometry"
|
|
275
280
|
}
|
|
276
281
|
);
|
|
@@ -279,39 +284,39 @@ function gt({
|
|
|
279
284
|
default:
|
|
280
285
|
console.warn(
|
|
281
286
|
"Unsupported safety zone shape type:",
|
|
282
|
-
|
|
283
|
-
),
|
|
287
|
+
o.shape.shape_type
|
|
288
|
+
), m = null;
|
|
284
289
|
}
|
|
285
|
-
return /* @__PURE__ */
|
|
290
|
+
return /* @__PURE__ */ w(
|
|
286
291
|
"mesh",
|
|
287
292
|
{
|
|
288
|
-
renderOrder:
|
|
289
|
-
position:
|
|
290
|
-
quaternion: Ae(
|
|
293
|
+
renderOrder: c,
|
|
294
|
+
position: y,
|
|
295
|
+
quaternion: Ae(s),
|
|
291
296
|
children: [
|
|
292
|
-
|
|
293
|
-
/* @__PURE__ */ r("meshStandardMaterial", { ...
|
|
297
|
+
m,
|
|
298
|
+
/* @__PURE__ */ r("meshStandardMaterial", { ...a, polygonOffsetFactor: -c })
|
|
294
299
|
]
|
|
295
300
|
},
|
|
296
|
-
`safety-zone-${
|
|
301
|
+
`safety-zone-${o.shape.shape_type}-${c}`
|
|
297
302
|
);
|
|
298
|
-
},
|
|
299
|
-
(
|
|
300
|
-
), [e,
|
|
301
|
-
return /* @__PURE__ */ r("group", { ...t, children:
|
|
303
|
+
}, f = A(() => Object.values(e ?? {}).map(
|
|
304
|
+
(c, o) => i(o, c)
|
|
305
|
+
), [e, l]);
|
|
306
|
+
return /* @__PURE__ */ r("group", { ...t, children: f });
|
|
302
307
|
}
|
|
303
|
-
function
|
|
308
|
+
function xt({
|
|
304
309
|
trajectory: e,
|
|
305
310
|
...n
|
|
306
311
|
}) {
|
|
307
|
-
const t = (e == null ? void 0 : e.map((
|
|
308
|
-
if (
|
|
309
|
-
const [i,
|
|
310
|
-
if (Number.isFinite(i) && Number.isFinite(
|
|
311
|
-
return new b.Vector3(i / 1e3,
|
|
312
|
+
const t = (e == null ? void 0 : e.map((l) => {
|
|
313
|
+
if (l.position && l.position.length >= 3) {
|
|
314
|
+
const [i, f, c] = l.position;
|
|
315
|
+
if (Number.isFinite(i) && Number.isFinite(f) && Number.isFinite(c))
|
|
316
|
+
return new b.Vector3(i / 1e3, c / 1e3, -f / 1e3);
|
|
312
317
|
}
|
|
313
318
|
return null;
|
|
314
|
-
}).filter((
|
|
319
|
+
}).filter((l) => l !== null)) || [];
|
|
315
320
|
return /* @__PURE__ */ r("group", { ...n, children: t.length > 0 && /* @__PURE__ */ r(
|
|
316
321
|
$,
|
|
317
322
|
{
|
|
@@ -328,180 +333,178 @@ async function J(e, n) {
|
|
|
328
333
|
if (B.has(e))
|
|
329
334
|
return B.get(e);
|
|
330
335
|
const t = (async () => {
|
|
331
|
-
var
|
|
332
|
-
const
|
|
333
|
-
(
|
|
334
|
-
var
|
|
335
|
-
return (
|
|
336
|
+
var c;
|
|
337
|
+
const l = n || "", i = new Ce({ instanceUrl: l }), f = i.api.motionGroupModels;
|
|
338
|
+
(c = f.axios) != null && c.interceptors && f.axios.interceptors.request.use((o) => {
|
|
339
|
+
var y;
|
|
340
|
+
return (y = o.url) != null && y.includes("/glb") && (o.responseType = "blob"), o;
|
|
336
341
|
});
|
|
337
342
|
try {
|
|
338
|
-
const
|
|
343
|
+
const o = await i.api.motionGroupModels.getMotionGroupGlbModel(
|
|
339
344
|
e
|
|
340
345
|
);
|
|
341
|
-
return URL.createObjectURL(
|
|
342
|
-
} catch (
|
|
343
|
-
throw console.error("Failed to fetch model:",
|
|
346
|
+
return URL.createObjectURL(o);
|
|
347
|
+
} catch (o) {
|
|
348
|
+
throw console.error("Failed to fetch model:", o), o;
|
|
344
349
|
}
|
|
345
350
|
})();
|
|
346
351
|
return B.set(e, t), t;
|
|
347
352
|
}
|
|
348
|
-
function
|
|
353
|
+
function de(e) {
|
|
349
354
|
function n(t) {
|
|
350
|
-
return t.children.length === 0 ? [t] : [t, ...t.children.flatMap((
|
|
355
|
+
return t.children.length === 0 ? [t] : [t, ...t.children.flatMap((l) => n(l))];
|
|
351
356
|
}
|
|
352
|
-
return n(e).filter((t) =>
|
|
357
|
+
return n(e).filter((t) => me(t));
|
|
353
358
|
}
|
|
354
|
-
function
|
|
359
|
+
function he(e) {
|
|
355
360
|
return e.name.endsWith("_FLG");
|
|
356
361
|
}
|
|
357
|
-
function
|
|
362
|
+
function me(e) {
|
|
358
363
|
return /_J[0-9]+$/.test(e.name);
|
|
359
364
|
}
|
|
360
|
-
function
|
|
365
|
+
function $e(e, n) {
|
|
361
366
|
let t;
|
|
362
|
-
function
|
|
363
|
-
if (
|
|
367
|
+
function l(i) {
|
|
368
|
+
if (he(i)) {
|
|
364
369
|
if (t)
|
|
365
370
|
throw Error(
|
|
366
371
|
`Found multiple flange groups in robot model ${n}; first ${t.name} then ${i.name}. Only one _FLG group is allowed.`
|
|
367
372
|
);
|
|
368
373
|
t = i;
|
|
369
374
|
}
|
|
370
|
-
|
|
375
|
+
me(i), i.children.map(l);
|
|
371
376
|
}
|
|
372
|
-
if (
|
|
377
|
+
if (l(e.scene), !t)
|
|
373
378
|
throw Error(
|
|
374
379
|
`No flange group found in robot model ${n}. Flange must be identified with a name ending in _FLG.`
|
|
375
380
|
);
|
|
376
381
|
return { gltf: e };
|
|
377
382
|
}
|
|
378
|
-
function
|
|
383
|
+
function ye({
|
|
379
384
|
rapidlyChangingMotionState: e,
|
|
380
385
|
dhParameters: n,
|
|
381
386
|
onRotationChanged: t,
|
|
382
|
-
children:
|
|
387
|
+
children: l
|
|
383
388
|
}) {
|
|
384
|
-
const i = M([]),
|
|
385
|
-
T(() => {
|
|
386
|
-
const
|
|
387
|
-
(
|
|
389
|
+
const i = M([]), f = M(null), { invalidate: c } = le(), o = M(e);
|
|
390
|
+
o.current = e, T(() => {
|
|
391
|
+
const a = e.joint_position.filter(
|
|
392
|
+
(u) => u !== void 0
|
|
388
393
|
);
|
|
389
|
-
return
|
|
394
|
+
return f.current = new ue(a, {
|
|
390
395
|
tension: 120,
|
|
391
396
|
// Controls spring stiffness - higher values create faster, more responsive motion
|
|
392
397
|
friction: 20,
|
|
393
398
|
// Controls damping - higher values reduce oscillation and create smoother settling
|
|
394
399
|
threshold: 1e-3
|
|
395
400
|
}), () => {
|
|
396
|
-
var
|
|
397
|
-
(
|
|
401
|
+
var u;
|
|
402
|
+
(u = f.current) == null || u.destroy();
|
|
398
403
|
};
|
|
399
|
-
}, []),
|
|
400
|
-
if (
|
|
401
|
-
const d =
|
|
402
|
-
s(), d ||
|
|
404
|
+
}, []), ce((a, u) => {
|
|
405
|
+
if (f.current) {
|
|
406
|
+
const d = f.current.update(u);
|
|
407
|
+
s(), d || c();
|
|
403
408
|
}
|
|
404
409
|
});
|
|
405
|
-
function
|
|
406
|
-
|
|
410
|
+
function y(a) {
|
|
411
|
+
a && (i.current = de(a), s(), c());
|
|
407
412
|
}
|
|
408
413
|
function s() {
|
|
409
|
-
var
|
|
410
|
-
const
|
|
414
|
+
var u;
|
|
415
|
+
const a = ((u = f.current) == null ? void 0 : u.getCurrentValues()) || [];
|
|
411
416
|
if (t)
|
|
412
|
-
t(
|
|
417
|
+
t(i.current, a);
|
|
413
418
|
else
|
|
414
|
-
for (const [d,
|
|
415
|
-
const
|
|
416
|
-
|
|
419
|
+
for (const [d, p] of i.current.entries()) {
|
|
420
|
+
const h = n[d], g = h.theta || 0, x = h.reverse_rotation_direction ? -1 : 1;
|
|
421
|
+
p.rotation.y = x * (a[d] || 0) + g;
|
|
417
422
|
}
|
|
418
423
|
}
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
424
|
+
function m(a) {
|
|
425
|
+
var d;
|
|
426
|
+
const u = a.joint_position.filter(
|
|
427
|
+
(p) => p !== void 0
|
|
422
428
|
);
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
},
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
}, [e, m]), ue(() => {
|
|
431
|
-
m();
|
|
432
|
-
}), /* @__PURE__ */ r("group", { ref: l, children: a });
|
|
429
|
+
(d = f.current) == null || d.setTarget(u), c();
|
|
430
|
+
}
|
|
431
|
+
return fe(() => {
|
|
432
|
+
m(o.current);
|
|
433
|
+
}), T(() => {
|
|
434
|
+
m(e);
|
|
435
|
+
}, [e]), /* @__PURE__ */ r("group", { ref: y, children: l });
|
|
433
436
|
}
|
|
434
|
-
const
|
|
435
|
-
function
|
|
437
|
+
const Ne = "line", He = "mesh";
|
|
438
|
+
function Ye({
|
|
436
439
|
rapidlyChangingMotionState: e,
|
|
437
440
|
dhParameters: n,
|
|
438
441
|
...t
|
|
439
442
|
}) {
|
|
440
|
-
const
|
|
441
|
-
|
|
442
|
-
i.current = new Array(n.length).fill(null),
|
|
443
|
+
const l = new R(), i = M([]), f = M([]);
|
|
444
|
+
Se.useEffect(() => {
|
|
445
|
+
i.current = new Array(n.length).fill(null), f.current = new Array(n.length).fill(null);
|
|
443
446
|
}, [n.length]);
|
|
444
|
-
function
|
|
445
|
-
const
|
|
446
|
-
|
|
447
|
-
const
|
|
447
|
+
function c(s, m) {
|
|
448
|
+
const a = new L(), u = new W(), d = new L();
|
|
449
|
+
l.decompose(a, u, d);
|
|
450
|
+
const p = a.clone(), h = new R().makeRotationY(
|
|
448
451
|
s.theta + m * (s.reverse_rotation_direction ? -1 : 1)
|
|
449
452
|
).multiply(new R().makeTranslation(0, s.d / 1e3, 0)).multiply(new R().makeTranslation(s.a / 1e3, 0, 0)).multiply(new R().makeRotationX(s.alpha));
|
|
450
|
-
return
|
|
453
|
+
return l.multiply(h), l.decompose(a, u, d), { a: p, b: a };
|
|
451
454
|
}
|
|
452
|
-
function
|
|
455
|
+
function o(s, m, a, u) {
|
|
453
456
|
if (!n)
|
|
454
457
|
return;
|
|
455
458
|
const d = n[s];
|
|
456
459
|
if (!d)
|
|
457
460
|
return;
|
|
458
|
-
const { a:
|
|
459
|
-
m.geometry.setPositions([
|
|
461
|
+
const { a: p, b: h } = c(d, u);
|
|
462
|
+
m.geometry.setPositions([p.toArray(), h.toArray()].flat()), a.position.set(h.x, h.y, h.z);
|
|
460
463
|
}
|
|
461
|
-
function
|
|
462
|
-
|
|
463
|
-
for (let
|
|
464
|
-
const
|
|
465
|
-
|
|
464
|
+
function y(s, m) {
|
|
465
|
+
l.identity();
|
|
466
|
+
for (let a = 0; a < Math.min(s.length, m.length); a++) {
|
|
467
|
+
const u = i.current[a], d = f.current[a];
|
|
468
|
+
u && d && o(a, u, d, m[a]);
|
|
466
469
|
}
|
|
467
470
|
}
|
|
468
471
|
return /* @__PURE__ */ r(
|
|
469
|
-
|
|
472
|
+
ye,
|
|
470
473
|
{
|
|
471
474
|
rapidlyChangingMotionState: e,
|
|
472
475
|
dhParameters: n,
|
|
473
|
-
onRotationChanged:
|
|
474
|
-
children: /* @__PURE__ */
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
+
onRotationChanged: y,
|
|
477
|
+
children: /* @__PURE__ */ w("group", { ...t, name: "Scene", children: [
|
|
478
|
+
/* @__PURE__ */ w("mesh", { children: [
|
|
476
479
|
/* @__PURE__ */ r("sphereGeometry", { args: [0.01, 32, 32] }),
|
|
477
480
|
/* @__PURE__ */ r("meshStandardMaterial", { color: "black", depthTest: !0 })
|
|
478
481
|
] }),
|
|
479
482
|
n == null ? void 0 : n.map((s, m) => {
|
|
480
|
-
const { a
|
|
483
|
+
const { a, b: u } = c(
|
|
481
484
|
s,
|
|
482
485
|
e.joint_position[m] ?? 0
|
|
483
486
|
), d = `dhrobot_J0${m}`;
|
|
484
|
-
return /* @__PURE__ */
|
|
487
|
+
return /* @__PURE__ */ w("group", { name: d, children: [
|
|
485
488
|
/* @__PURE__ */ r(
|
|
486
489
|
$,
|
|
487
490
|
{
|
|
488
|
-
ref: (
|
|
489
|
-
i.current[m] =
|
|
491
|
+
ref: (p) => {
|
|
492
|
+
i.current[m] = p;
|
|
490
493
|
},
|
|
491
|
-
name:
|
|
492
|
-
points: [
|
|
494
|
+
name: Ne,
|
|
495
|
+
points: [a, u],
|
|
493
496
|
color: "white",
|
|
494
497
|
lineWidth: 5
|
|
495
498
|
}
|
|
496
499
|
),
|
|
497
|
-
/* @__PURE__ */
|
|
500
|
+
/* @__PURE__ */ w(
|
|
498
501
|
"mesh",
|
|
499
502
|
{
|
|
500
|
-
ref: (
|
|
501
|
-
|
|
503
|
+
ref: (p) => {
|
|
504
|
+
f.current[m] = p;
|
|
502
505
|
},
|
|
503
|
-
name:
|
|
504
|
-
position:
|
|
506
|
+
name: He,
|
|
507
|
+
position: u,
|
|
505
508
|
children: [
|
|
506
509
|
/* @__PURE__ */ r("sphereGeometry", { args: [0.01, 32, 32] }),
|
|
507
510
|
/* @__PURE__ */ r("meshStandardMaterial", { color: "black", depthTest: !0 })
|
|
@@ -515,32 +518,32 @@ function Ne({
|
|
|
515
518
|
}
|
|
516
519
|
);
|
|
517
520
|
}
|
|
518
|
-
const
|
|
519
|
-
function
|
|
521
|
+
const qe = console.warn;
|
|
522
|
+
function ge() {
|
|
520
523
|
return T(() => {
|
|
521
524
|
console.warn = (e) => {
|
|
522
|
-
e !== "Cannot call the manual advancement of rafz whilst frameLoop is not set as demand" &&
|
|
525
|
+
e !== "Cannot call the manual advancement of rafz whilst frameLoop is not set as demand" && qe(e);
|
|
523
526
|
};
|
|
524
527
|
}, []), null;
|
|
525
528
|
}
|
|
526
|
-
function
|
|
529
|
+
function Xe(e) {
|
|
527
530
|
return e.type === "Mesh";
|
|
528
531
|
}
|
|
529
|
-
function
|
|
532
|
+
function Ke({
|
|
530
533
|
url: e,
|
|
531
534
|
flangeRef: n,
|
|
532
535
|
postModelRender: t,
|
|
533
|
-
...
|
|
536
|
+
...l
|
|
534
537
|
}) {
|
|
535
|
-
const i =
|
|
538
|
+
const i = Fe(e), c = $e(i, "robot.glb").gltf, o = G(
|
|
536
539
|
(s) => {
|
|
537
540
|
s && t && t();
|
|
538
541
|
},
|
|
539
542
|
[t]
|
|
540
543
|
);
|
|
541
|
-
function
|
|
544
|
+
function y(s) {
|
|
542
545
|
try {
|
|
543
|
-
return
|
|
546
|
+
return Xe(s) ? s.geometry ? /* @__PURE__ */ r(
|
|
544
547
|
"mesh",
|
|
545
548
|
{
|
|
546
549
|
name: s.name,
|
|
@@ -564,8 +567,8 @@ function Ye({
|
|
|
564
567
|
name: s.name,
|
|
565
568
|
position: s.position,
|
|
566
569
|
rotation: s.rotation,
|
|
567
|
-
ref:
|
|
568
|
-
children: s.children.map(
|
|
570
|
+
ref: he(s) ? n : void 0,
|
|
571
|
+
children: s.children.map(y)
|
|
569
572
|
},
|
|
570
573
|
s.uuid
|
|
571
574
|
);
|
|
@@ -573,51 +576,50 @@ function Ye({
|
|
|
573
576
|
return console.warn("Error rendering node", s.name, m), null;
|
|
574
577
|
}
|
|
575
578
|
}
|
|
576
|
-
return /* @__PURE__ */ r("group", { ...
|
|
579
|
+
return /* @__PURE__ */ r("group", { ...l, dispose: null, ref: o, children: y(c.scene) });
|
|
577
580
|
}
|
|
578
|
-
function
|
|
581
|
+
function be({
|
|
579
582
|
modelURL: e,
|
|
580
583
|
flangeRef: n,
|
|
581
584
|
postModelRender: t,
|
|
582
|
-
...
|
|
585
|
+
...l
|
|
583
586
|
}) {
|
|
584
|
-
const [i,
|
|
587
|
+
const [i, f] = S(null);
|
|
585
588
|
return T(() => {
|
|
586
|
-
|
|
589
|
+
let c = !1;
|
|
590
|
+
return (async () => {
|
|
587
591
|
try {
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
p(h);
|
|
593
|
-
}
|
|
594
|
-
} catch (h) {
|
|
595
|
-
console.error("Failed to resolve model URL:", h);
|
|
592
|
+
const y = typeof e == "string" ? e : await e;
|
|
593
|
+
c || f((s) => s === y ? s : y);
|
|
594
|
+
} catch (y) {
|
|
595
|
+
console.error("Failed to resolve model URL:", y);
|
|
596
596
|
}
|
|
597
|
-
})()
|
|
597
|
+
})(), () => {
|
|
598
|
+
c = !0;
|
|
599
|
+
};
|
|
598
600
|
}, [e]), i ? /* @__PURE__ */ r(
|
|
599
|
-
|
|
601
|
+
Ke,
|
|
600
602
|
{
|
|
601
603
|
url: i,
|
|
602
604
|
flangeRef: n,
|
|
603
605
|
postModelRender: t,
|
|
604
|
-
...
|
|
606
|
+
...l
|
|
605
607
|
}
|
|
606
608
|
) : null;
|
|
607
609
|
}
|
|
608
|
-
const
|
|
610
|
+
const we = (e, n) => {
|
|
609
611
|
e.userData.isGhost || (e.traverse((t) => {
|
|
610
612
|
if (t instanceof b.Mesh) {
|
|
611
613
|
t.material instanceof b.Material && (t.material.colorWrite = !1);
|
|
612
|
-
const
|
|
613
|
-
|
|
614
|
+
const l = t.clone(), i = t.clone();
|
|
615
|
+
l.material = new b.MeshStandardMaterial({
|
|
614
616
|
depthTest: !0,
|
|
615
617
|
depthWrite: !0,
|
|
616
618
|
colorWrite: !1,
|
|
617
619
|
polygonOffset: !0,
|
|
618
620
|
polygonOffsetFactor: -1,
|
|
619
621
|
side: b.DoubleSide
|
|
620
|
-
}),
|
|
622
|
+
}), l.userData.isGhost = !0, i.material = new b.MeshStandardMaterial({
|
|
621
623
|
color: n,
|
|
622
624
|
opacity: 0.3,
|
|
623
625
|
depthTest: !0,
|
|
@@ -626,169 +628,169 @@ const be = (e, n) => {
|
|
|
626
628
|
polygonOffset: !0,
|
|
627
629
|
polygonOffsetFactor: -2,
|
|
628
630
|
side: b.DoubleSide
|
|
629
|
-
}), i.userData.isGhost = !0, t.parent && (t.parent.add(
|
|
631
|
+
}), i.userData.isGhost = !0, t.parent && (t.parent.add(l), t.parent.add(i));
|
|
630
632
|
}
|
|
631
633
|
}), e.userData.isGhost = !0);
|
|
632
|
-
},
|
|
634
|
+
}, xe = (e) => {
|
|
633
635
|
if (!e.userData.isGhost) return;
|
|
634
636
|
const n = [];
|
|
635
637
|
e.traverse((t) => {
|
|
636
|
-
var
|
|
637
|
-
t instanceof b.Mesh && ((
|
|
638
|
+
var l;
|
|
639
|
+
t instanceof b.Mesh && ((l = t.userData) != null && l.isGhost ? n.push(t) : t.material instanceof b.Material && (t.material.colorWrite = !0));
|
|
638
640
|
}), n.forEach((t) => {
|
|
639
641
|
t.parent && t.parent.remove(t);
|
|
640
642
|
}), e.userData.isGhost = !1;
|
|
641
|
-
},
|
|
643
|
+
}, Re = j(
|
|
642
644
|
({
|
|
643
645
|
rapidlyChangingMotionState: e,
|
|
644
646
|
modelFromController: n,
|
|
645
647
|
dhParameters: t,
|
|
646
|
-
getModel:
|
|
648
|
+
getModel: l = J,
|
|
647
649
|
flangeRef: i,
|
|
648
|
-
postModelRender:
|
|
649
|
-
transparentColor:
|
|
650
|
-
instanceUrl:
|
|
651
|
-
...
|
|
650
|
+
postModelRender: f,
|
|
651
|
+
transparentColor: c,
|
|
652
|
+
instanceUrl: o,
|
|
653
|
+
...y
|
|
652
654
|
}) => {
|
|
653
|
-
const [s, m] = S(null),
|
|
654
|
-
m(
|
|
655
|
+
const [s, m] = S(null), a = G((p) => {
|
|
656
|
+
m(p);
|
|
655
657
|
}, []);
|
|
656
658
|
T(() => {
|
|
657
|
-
s && (
|
|
658
|
-
}, [s,
|
|
659
|
-
const
|
|
660
|
-
|
|
659
|
+
s && (c ? we(s, c) : xe(s));
|
|
660
|
+
}, [s, c]);
|
|
661
|
+
const u = A(() => {
|
|
662
|
+
const p = l(n, o);
|
|
663
|
+
if (!p) {
|
|
664
|
+
const h = new Blob([], { type: "model/gltf-binary" }), g = new File(
|
|
665
|
+
[h],
|
|
666
|
+
`${n}.glb`,
|
|
667
|
+
{ type: "model/gltf-binary" }
|
|
668
|
+
);
|
|
669
|
+
return Promise.resolve(URL.createObjectURL(g));
|
|
670
|
+
}
|
|
671
|
+
return p;
|
|
672
|
+
}, [n, o, l]), d = /* @__PURE__ */ r(
|
|
673
|
+
Ye,
|
|
661
674
|
{
|
|
662
675
|
rapidlyChangingMotionState: e,
|
|
663
676
|
dhParameters: t,
|
|
664
|
-
...
|
|
677
|
+
...y
|
|
665
678
|
}
|
|
666
679
|
);
|
|
667
|
-
return /* @__PURE__ */
|
|
680
|
+
return /* @__PURE__ */ w(
|
|
668
681
|
pe,
|
|
669
682
|
{
|
|
670
|
-
fallback:
|
|
671
|
-
onError: (
|
|
672
|
-
console.warn(
|
|
683
|
+
fallback: d,
|
|
684
|
+
onError: (p) => {
|
|
685
|
+
console.warn(p);
|
|
673
686
|
},
|
|
674
687
|
children: [
|
|
675
|
-
/* @__PURE__ */ r(
|
|
676
|
-
|
|
688
|
+
/* @__PURE__ */ r(ae, { fallback: d, children: /* @__PURE__ */ r("group", { ref: a, children: /* @__PURE__ */ r(
|
|
689
|
+
ye,
|
|
677
690
|
{
|
|
678
691
|
rapidlyChangingMotionState: e,
|
|
679
692
|
dhParameters: t,
|
|
680
693
|
children: /* @__PURE__ */ r(
|
|
681
|
-
|
|
694
|
+
be,
|
|
682
695
|
{
|
|
683
|
-
modelURL:
|
|
684
|
-
|
|
685
|
-
if (!d) {
|
|
686
|
-
const y = new Blob([], { type: "model/gltf-binary" }), f = new File(
|
|
687
|
-
[y],
|
|
688
|
-
`${n}.glb`,
|
|
689
|
-
{ type: "model/gltf-binary" }
|
|
690
|
-
);
|
|
691
|
-
return Promise.resolve(URL.createObjectURL(f));
|
|
692
|
-
}
|
|
693
|
-
return d;
|
|
694
|
-
})(),
|
|
695
|
-
postModelRender: p,
|
|
696
|
+
modelURL: u,
|
|
697
|
+
postModelRender: f,
|
|
696
698
|
flangeRef: i,
|
|
697
|
-
...
|
|
699
|
+
...y
|
|
698
700
|
}
|
|
699
701
|
)
|
|
700
702
|
}
|
|
701
703
|
) }) }),
|
|
702
|
-
/* @__PURE__ */ r(
|
|
704
|
+
/* @__PURE__ */ r(ge, {})
|
|
703
705
|
]
|
|
704
706
|
}
|
|
705
707
|
);
|
|
706
708
|
}
|
|
707
709
|
);
|
|
708
|
-
function
|
|
710
|
+
function Ze({
|
|
709
711
|
connectedMotionGroup: e,
|
|
710
712
|
getModel: n = J,
|
|
711
713
|
flangeRef: t,
|
|
712
|
-
transparentColor:
|
|
714
|
+
transparentColor: l,
|
|
713
715
|
postModelRender: i,
|
|
714
|
-
...
|
|
716
|
+
...f
|
|
715
717
|
}) {
|
|
716
718
|
return e.dhParameters ? /* @__PURE__ */ r(
|
|
717
|
-
|
|
719
|
+
Re,
|
|
718
720
|
{
|
|
719
721
|
rapidlyChangingMotionState: e.rapidlyChangingMotionState,
|
|
720
722
|
modelFromController: e.modelFromController || "",
|
|
721
723
|
dhParameters: e.dhParameters,
|
|
722
724
|
getModel: n,
|
|
723
725
|
flangeRef: t,
|
|
724
|
-
transparentColor:
|
|
726
|
+
transparentColor: l,
|
|
725
727
|
postModelRender: i,
|
|
726
|
-
...
|
|
728
|
+
...f
|
|
727
729
|
}
|
|
728
730
|
) : null;
|
|
729
731
|
}
|
|
730
|
-
const
|
|
731
|
-
|
|
732
|
+
const Rt = j(
|
|
733
|
+
Ve(
|
|
732
734
|
({
|
|
733
735
|
robotName: e,
|
|
734
736
|
programState: n,
|
|
735
737
|
safetyState: t,
|
|
736
|
-
operationMode:
|
|
738
|
+
operationMode: l,
|
|
737
739
|
driveToHomeEnabled: i = !1,
|
|
738
|
-
onDriveToHomePress:
|
|
739
|
-
onDriveToHomeRelease:
|
|
740
|
-
connectedMotionGroup:
|
|
741
|
-
robotComponent:
|
|
740
|
+
onDriveToHomePress: f,
|
|
741
|
+
onDriveToHomeRelease: c,
|
|
742
|
+
connectedMotionGroup: o,
|
|
743
|
+
robotComponent: y = Ze,
|
|
742
744
|
customContentComponent: s,
|
|
743
745
|
className: m
|
|
744
746
|
}) => {
|
|
745
|
-
var
|
|
746
|
-
const
|
|
747
|
+
var Y;
|
|
748
|
+
const a = De(), { t: u } = Ue(), [d, p] = S(!1), h = M(null), g = M(null), [x, I] = S(!1), [F, Te] = S({ width: 400, height: 600 }), [ze, ke] = S(0);
|
|
747
749
|
T(() => {
|
|
748
|
-
const
|
|
749
|
-
if (
|
|
750
|
-
const { offsetWidth: X, offsetHeight: K } =
|
|
751
|
-
|
|
750
|
+
const U = () => {
|
|
751
|
+
if (g.current) {
|
|
752
|
+
const { offsetWidth: X, offsetHeight: K } = g.current;
|
|
753
|
+
I(X > K), Te({ width: X, height: K });
|
|
752
754
|
}
|
|
753
755
|
};
|
|
754
|
-
|
|
755
|
-
const
|
|
756
|
-
return
|
|
757
|
-
|
|
756
|
+
U();
|
|
757
|
+
const q = new ResizeObserver(U);
|
|
758
|
+
return g.current && q.observe(g.current), () => {
|
|
759
|
+
q.disconnect();
|
|
758
760
|
};
|
|
759
761
|
}, []);
|
|
760
|
-
const N =
|
|
761
|
-
|
|
762
|
-
}, []),
|
|
763
|
-
!i || !
|
|
764
|
-
}, [i,
|
|
765
|
-
!i || !
|
|
766
|
-
}, [i,
|
|
767
|
-
d &&
|
|
768
|
-
}, [d,
|
|
762
|
+
const N = G(() => {
|
|
763
|
+
ke((U) => U + 1);
|
|
764
|
+
}, []), D = G(() => {
|
|
765
|
+
!i || !f || (p(!0), f());
|
|
766
|
+
}, [i, f]), O = G(() => {
|
|
767
|
+
!i || !c || (p(!1), c());
|
|
768
|
+
}, [i, c]), H = G(() => {
|
|
769
|
+
d && c && (p(!1), c());
|
|
770
|
+
}, [d, c]), k = x ? F.width < 350 : F.height < 200, V = x ? F.height < 310 : F.height < 450;
|
|
769
771
|
return /* @__PURE__ */ r(
|
|
770
|
-
|
|
772
|
+
Oe,
|
|
771
773
|
{
|
|
772
|
-
ref:
|
|
774
|
+
ref: g,
|
|
773
775
|
className: m,
|
|
774
776
|
sx: {
|
|
775
777
|
width: "100%",
|
|
776
778
|
height: "100%",
|
|
777
779
|
display: "flex",
|
|
778
|
-
flexDirection:
|
|
780
|
+
flexDirection: x ? "row" : "column",
|
|
779
781
|
position: "relative",
|
|
780
782
|
overflow: "hidden",
|
|
781
783
|
minWidth: { xs: 180, sm: 220, md: 250 },
|
|
782
|
-
minHeight:
|
|
784
|
+
minHeight: x ? { xs: 200, sm: 240, md: 260 } : { xs: 150, sm: 180, md: 220 },
|
|
783
785
|
// Allow progressive hiding in portrait mode
|
|
784
|
-
border: `1px solid ${
|
|
786
|
+
border: `1px solid ${a.palette.divider}`,
|
|
785
787
|
borderRadius: "18px",
|
|
786
788
|
boxShadow: "none",
|
|
787
|
-
backgroundColor: ((
|
|
789
|
+
backgroundColor: ((Y = a.palette.backgroundPaperElevation) == null ? void 0 : Y[8]) || "#2A2A3F",
|
|
788
790
|
backgroundImage: "none"
|
|
789
791
|
// Override any gradient from elevation
|
|
790
792
|
},
|
|
791
|
-
children:
|
|
793
|
+
children: x ? /* @__PURE__ */ w(E, { children: [
|
|
792
794
|
/* @__PURE__ */ r(
|
|
793
795
|
v,
|
|
794
796
|
{
|
|
@@ -805,7 +807,7 @@ const wt = E(
|
|
|
805
807
|
// Prevent content from affecting container size
|
|
806
808
|
display: k ? "none" : "block"
|
|
807
809
|
},
|
|
808
|
-
children: !k && /* @__PURE__ */
|
|
810
|
+
children: !k && /* @__PURE__ */ w(
|
|
809
811
|
te,
|
|
810
812
|
{
|
|
811
813
|
orthographic: !0,
|
|
@@ -816,7 +818,7 @@ const wt = E(
|
|
|
816
818
|
shadows: !0,
|
|
817
819
|
frameloop: "demand",
|
|
818
820
|
style: {
|
|
819
|
-
borderRadius:
|
|
821
|
+
borderRadius: a.shape.borderRadius,
|
|
820
822
|
width: "100%",
|
|
821
823
|
height: "100%",
|
|
822
824
|
background: "transparent",
|
|
@@ -829,9 +831,9 @@ const wt = E(
|
|
|
829
831
|
children: [
|
|
830
832
|
/* @__PURE__ */ r(ne, {}),
|
|
831
833
|
/* @__PURE__ */ r(Z, { fit: !0, observe: !0, margin: 1, maxDuration: 1, children: /* @__PURE__ */ r(
|
|
832
|
-
|
|
834
|
+
y,
|
|
833
835
|
{
|
|
834
|
-
connectedMotionGroup:
|
|
836
|
+
connectedMotionGroup: o,
|
|
835
837
|
postModelRender: N
|
|
836
838
|
}
|
|
837
839
|
) })
|
|
@@ -840,7 +842,7 @@ const wt = E(
|
|
|
840
842
|
)
|
|
841
843
|
}
|
|
842
844
|
),
|
|
843
|
-
/* @__PURE__ */
|
|
845
|
+
/* @__PURE__ */ w(
|
|
844
846
|
v,
|
|
845
847
|
{
|
|
846
848
|
sx: {
|
|
@@ -851,7 +853,7 @@ const wt = E(
|
|
|
851
853
|
width: k ? "100%" : "50%"
|
|
852
854
|
},
|
|
853
855
|
children: [
|
|
854
|
-
/* @__PURE__ */
|
|
856
|
+
/* @__PURE__ */ w(
|
|
855
857
|
v,
|
|
856
858
|
{
|
|
857
859
|
sx: {
|
|
@@ -866,13 +868,13 @@ const wt = E(
|
|
|
866
868
|
{
|
|
867
869
|
programState: n,
|
|
868
870
|
safetyState: t,
|
|
869
|
-
operationMode:
|
|
871
|
+
operationMode: l
|
|
870
872
|
}
|
|
871
873
|
)
|
|
872
874
|
]
|
|
873
875
|
}
|
|
874
876
|
),
|
|
875
|
-
/* @__PURE__ */
|
|
877
|
+
/* @__PURE__ */ w(
|
|
876
878
|
v,
|
|
877
879
|
{
|
|
878
880
|
sx: {
|
|
@@ -884,7 +886,7 @@ const wt = E(
|
|
|
884
886
|
justifyContent: "space-between"
|
|
885
887
|
},
|
|
886
888
|
children: [
|
|
887
|
-
!
|
|
889
|
+
!V && s && /* @__PURE__ */ w(v, { children: [
|
|
888
890
|
/* @__PURE__ */ r(s, {}),
|
|
889
891
|
/* @__PURE__ */ r(
|
|
890
892
|
z,
|
|
@@ -892,7 +894,7 @@ const wt = E(
|
|
|
892
894
|
sx: {
|
|
893
895
|
mt: 1,
|
|
894
896
|
mb: 0,
|
|
895
|
-
borderColor:
|
|
897
|
+
borderColor: a.palette.divider,
|
|
896
898
|
opacity: 0.5
|
|
897
899
|
}
|
|
898
900
|
}
|
|
@@ -902,7 +904,7 @@ const wt = E(
|
|
|
902
904
|
v,
|
|
903
905
|
{
|
|
904
906
|
sx: {
|
|
905
|
-
mt: !
|
|
907
|
+
mt: !V && s ? "auto" : 0
|
|
906
908
|
},
|
|
907
909
|
children: /* @__PURE__ */ r(
|
|
908
910
|
v,
|
|
@@ -916,22 +918,22 @@ const wt = E(
|
|
|
916
918
|
children: /* @__PURE__ */ r(
|
|
917
919
|
Q,
|
|
918
920
|
{
|
|
919
|
-
ref:
|
|
921
|
+
ref: h,
|
|
920
922
|
variant: "contained",
|
|
921
923
|
color: "secondary",
|
|
922
924
|
size: "small",
|
|
923
925
|
disabled: !i,
|
|
924
|
-
onMouseDown:
|
|
925
|
-
onMouseUp:
|
|
926
|
+
onMouseDown: D,
|
|
927
|
+
onMouseUp: O,
|
|
926
928
|
onMouseLeave: H,
|
|
927
|
-
onTouchStart:
|
|
928
|
-
onTouchEnd:
|
|
929
|
+
onTouchStart: D,
|
|
930
|
+
onTouchEnd: O,
|
|
929
931
|
sx: {
|
|
930
932
|
textTransform: "none",
|
|
931
933
|
px: 1.5,
|
|
932
934
|
py: 0.5
|
|
933
935
|
},
|
|
934
|
-
children:
|
|
936
|
+
children: u("RobotCard.DriveToHome.bt")
|
|
935
937
|
}
|
|
936
938
|
)
|
|
937
939
|
}
|
|
@@ -944,7 +946,7 @@ const wt = E(
|
|
|
944
946
|
]
|
|
945
947
|
}
|
|
946
948
|
)
|
|
947
|
-
] }) : /* @__PURE__ */ r(
|
|
949
|
+
] }) : /* @__PURE__ */ r(E, { children: /* @__PURE__ */ w(
|
|
948
950
|
v,
|
|
949
951
|
{
|
|
950
952
|
sx: {
|
|
@@ -954,14 +956,14 @@ const wt = E(
|
|
|
954
956
|
flexDirection: "column"
|
|
955
957
|
},
|
|
956
958
|
children: [
|
|
957
|
-
/* @__PURE__ */
|
|
959
|
+
/* @__PURE__ */ w(v, { children: [
|
|
958
960
|
/* @__PURE__ */ r(ee, { variant: "h6", component: "h2", sx: { mb: 1 }, children: e }),
|
|
959
961
|
/* @__PURE__ */ r(
|
|
960
962
|
re,
|
|
961
963
|
{
|
|
962
964
|
programState: n,
|
|
963
965
|
safetyState: t,
|
|
964
|
-
operationMode:
|
|
966
|
+
operationMode: l
|
|
965
967
|
}
|
|
966
968
|
)
|
|
967
969
|
] }),
|
|
@@ -977,7 +979,7 @@ const wt = E(
|
|
|
977
979
|
overflow: "hidden",
|
|
978
980
|
display: k ? "none" : "block"
|
|
979
981
|
},
|
|
980
|
-
children: !k && /* @__PURE__ */
|
|
982
|
+
children: !k && /* @__PURE__ */ w(
|
|
981
983
|
te,
|
|
982
984
|
{
|
|
983
985
|
orthographic: !0,
|
|
@@ -988,7 +990,7 @@ const wt = E(
|
|
|
988
990
|
shadows: !0,
|
|
989
991
|
frameloop: "demand",
|
|
990
992
|
style: {
|
|
991
|
-
borderRadius:
|
|
993
|
+
borderRadius: a.shape.borderRadius,
|
|
992
994
|
width: "100%",
|
|
993
995
|
height: "100%",
|
|
994
996
|
background: "transparent",
|
|
@@ -999,9 +1001,9 @@ const wt = E(
|
|
|
999
1001
|
children: [
|
|
1000
1002
|
/* @__PURE__ */ r(ne, {}),
|
|
1001
1003
|
/* @__PURE__ */ r(Z, { fit: !0, clip: !0, observe: !0, margin: 1, maxDuration: 1, children: /* @__PURE__ */ r(
|
|
1002
|
-
|
|
1004
|
+
y,
|
|
1003
1005
|
{
|
|
1004
|
-
connectedMotionGroup:
|
|
1006
|
+
connectedMotionGroup: o,
|
|
1005
1007
|
postModelRender: N
|
|
1006
1008
|
}
|
|
1007
1009
|
) })
|
|
@@ -1010,8 +1012,8 @@ const wt = E(
|
|
|
1010
1012
|
)
|
|
1011
1013
|
}
|
|
1012
1014
|
),
|
|
1013
|
-
/* @__PURE__ */
|
|
1014
|
-
!
|
|
1015
|
+
/* @__PURE__ */ w(v, { children: [
|
|
1016
|
+
!V && s && /* @__PURE__ */ w(E, { children: [
|
|
1015
1017
|
/* @__PURE__ */ r(s, {}),
|
|
1016
1018
|
/* @__PURE__ */ r(
|
|
1017
1019
|
z,
|
|
@@ -1019,7 +1021,7 @@ const wt = E(
|
|
|
1019
1021
|
sx: {
|
|
1020
1022
|
mt: 1,
|
|
1021
1023
|
mb: 0,
|
|
1022
|
-
borderColor:
|
|
1024
|
+
borderColor: a.palette.divider,
|
|
1023
1025
|
opacity: 0.5
|
|
1024
1026
|
}
|
|
1025
1027
|
}
|
|
@@ -1031,28 +1033,28 @@ const wt = E(
|
|
|
1031
1033
|
sx: {
|
|
1032
1034
|
display: "flex",
|
|
1033
1035
|
justifyContent: "flex-start",
|
|
1034
|
-
mt: !
|
|
1036
|
+
mt: !V && s ? { xs: 1, sm: 2, md: 5 } : { xs: 0.5, sm: 1, md: 2 },
|
|
1035
1037
|
mb: { xs: 0.5, sm: 0.75, md: 1 }
|
|
1036
1038
|
},
|
|
1037
1039
|
children: /* @__PURE__ */ r(
|
|
1038
1040
|
Q,
|
|
1039
1041
|
{
|
|
1040
|
-
ref:
|
|
1042
|
+
ref: h,
|
|
1041
1043
|
variant: "contained",
|
|
1042
1044
|
color: "secondary",
|
|
1043
1045
|
size: "small",
|
|
1044
1046
|
disabled: !i,
|
|
1045
|
-
onMouseDown:
|
|
1046
|
-
onMouseUp:
|
|
1047
|
+
onMouseDown: D,
|
|
1048
|
+
onMouseUp: O,
|
|
1047
1049
|
onMouseLeave: H,
|
|
1048
|
-
onTouchStart:
|
|
1049
|
-
onTouchEnd:
|
|
1050
|
+
onTouchStart: D,
|
|
1051
|
+
onTouchEnd: O,
|
|
1050
1052
|
sx: {
|
|
1051
1053
|
textTransform: "none",
|
|
1052
1054
|
px: 1.5,
|
|
1053
1055
|
py: 0.5
|
|
1054
1056
|
},
|
|
1055
|
-
children:
|
|
1057
|
+
children: u("RobotCard.DriveToHome.bt")
|
|
1056
1058
|
}
|
|
1057
1059
|
)
|
|
1058
1060
|
}
|
|
@@ -1065,138 +1067,138 @@ const wt = E(
|
|
|
1065
1067
|
);
|
|
1066
1068
|
}
|
|
1067
1069
|
)
|
|
1068
|
-
),
|
|
1069
|
-
function
|
|
1070
|
+
), vt = Array(6).fill(2 * Math.PI);
|
|
1071
|
+
function ve({
|
|
1070
1072
|
rapidlyChangingMotionState: e,
|
|
1071
1073
|
dhParameters: n,
|
|
1072
1074
|
onTranslationChanged: t,
|
|
1073
|
-
children:
|
|
1075
|
+
children: l
|
|
1074
1076
|
}) {
|
|
1075
|
-
const i = M([]),
|
|
1077
|
+
const i = M([]), f = M([]), c = M(null), { invalidate: o } = le();
|
|
1076
1078
|
T(() => {
|
|
1077
|
-
const
|
|
1078
|
-
(
|
|
1079
|
+
const a = e.joint_position.filter(
|
|
1080
|
+
(u) => u !== void 0
|
|
1079
1081
|
);
|
|
1080
|
-
return
|
|
1082
|
+
return c.current = new ue(a, {
|
|
1081
1083
|
tension: 120,
|
|
1082
1084
|
// Controls spring stiffness - higher values create faster, more responsive motion
|
|
1083
1085
|
friction: 20,
|
|
1084
1086
|
// Controls damping - higher values reduce oscillation and create smoother settling
|
|
1085
1087
|
threshold: 1e-3
|
|
1086
1088
|
}), () => {
|
|
1087
|
-
var
|
|
1088
|
-
(
|
|
1089
|
+
var u;
|
|
1090
|
+
(u = c.current) == null || u.destroy();
|
|
1089
1091
|
};
|
|
1090
|
-
}, []),
|
|
1091
|
-
if (
|
|
1092
|
-
const d =
|
|
1093
|
-
s(), d ||
|
|
1092
|
+
}, []), ce((a, u) => {
|
|
1093
|
+
if (c.current) {
|
|
1094
|
+
const d = c.current.update(u);
|
|
1095
|
+
s(), d || o();
|
|
1094
1096
|
}
|
|
1095
1097
|
});
|
|
1096
|
-
function
|
|
1097
|
-
|
|
1098
|
+
function y(a) {
|
|
1099
|
+
a && (f.current = de(a), s(), o());
|
|
1098
1100
|
}
|
|
1099
1101
|
function s() {
|
|
1100
|
-
var
|
|
1101
|
-
const
|
|
1102
|
+
var u;
|
|
1103
|
+
const a = ((u = c.current) == null ? void 0 : u.getCurrentValues()) || [];
|
|
1102
1104
|
if (t)
|
|
1103
|
-
t(
|
|
1105
|
+
t(f.current, a);
|
|
1104
1106
|
else
|
|
1105
|
-
for (const [d,
|
|
1106
|
-
const
|
|
1107
|
-
|
|
1107
|
+
for (const [d, p] of f.current.entries()) {
|
|
1108
|
+
const g = n[d].reverse_rotation_direction ? -1 : 1;
|
|
1109
|
+
p.position.y = g * (a[d] || 0) / 1e3;
|
|
1108
1110
|
}
|
|
1109
1111
|
}
|
|
1110
|
-
const m =
|
|
1111
|
-
const
|
|
1112
|
-
(
|
|
1112
|
+
const m = G(() => {
|
|
1113
|
+
const a = e.joint_position.filter(
|
|
1114
|
+
(u) => u !== void 0
|
|
1113
1115
|
);
|
|
1114
1116
|
requestAnimationFrame(() => {
|
|
1115
|
-
var
|
|
1116
|
-
i.current =
|
|
1117
|
+
var u;
|
|
1118
|
+
i.current = a, (u = c.current) == null || u.setTarget(a);
|
|
1117
1119
|
});
|
|
1118
1120
|
}, [e]);
|
|
1119
1121
|
return T(() => {
|
|
1120
1122
|
m();
|
|
1121
|
-
}, [e, m]),
|
|
1123
|
+
}, [e, m]), fe(() => {
|
|
1122
1124
|
m();
|
|
1123
|
-
}), /* @__PURE__ */ r("group", { ref:
|
|
1125
|
+
}), /* @__PURE__ */ r("group", { ref: y, children: l });
|
|
1124
1126
|
}
|
|
1125
|
-
function
|
|
1127
|
+
function Me({
|
|
1126
1128
|
rapidlyChangingMotionState: e,
|
|
1127
1129
|
dhParameters: n,
|
|
1128
1130
|
...t
|
|
1129
1131
|
}) {
|
|
1130
|
-
const
|
|
1131
|
-
function
|
|
1132
|
+
const l = new R(), i = M(null), f = M(null);
|
|
1133
|
+
function c(s) {
|
|
1132
1134
|
const m = new R();
|
|
1133
|
-
for (let
|
|
1134
|
-
const
|
|
1135
|
+
for (let p = 0; p < n.length; p++) {
|
|
1136
|
+
const h = n[p], g = s[p] ?? 0, x = new R().makeRotationY(h.theta).multiply(
|
|
1135
1137
|
new R().makeTranslation(
|
|
1136
|
-
|
|
1137
|
-
(
|
|
1138
|
+
h.a / 1e3,
|
|
1139
|
+
(h.d + g * (h.reverse_rotation_direction ? -1 : 1)) / 1e3,
|
|
1138
1140
|
0
|
|
1139
1141
|
)
|
|
1140
|
-
).multiply(new R().makeRotationX(
|
|
1141
|
-
m.multiply(
|
|
1142
|
+
).multiply(new R().makeRotationX(h.alpha));
|
|
1143
|
+
m.multiply(x);
|
|
1142
1144
|
}
|
|
1143
|
-
const
|
|
1144
|
-
return m.decompose(
|
|
1145
|
+
const a = new L(), u = new W(), d = new L();
|
|
1146
|
+
return m.decompose(a, u, d), a;
|
|
1145
1147
|
}
|
|
1146
|
-
const
|
|
1148
|
+
const o = c(
|
|
1147
1149
|
e.joint_position
|
|
1148
1150
|
);
|
|
1149
|
-
function
|
|
1150
|
-
|
|
1151
|
-
let
|
|
1152
|
-
for (let
|
|
1153
|
-
const
|
|
1151
|
+
function y(s, m) {
|
|
1152
|
+
l.identity();
|
|
1153
|
+
let a = new L();
|
|
1154
|
+
for (let h = 0; h < n.length; h++) {
|
|
1155
|
+
const g = m[h] ?? 0, x = n[h], I = new R().makeRotationY(x.theta).multiply(
|
|
1154
1156
|
new R().makeTranslation(
|
|
1155
|
-
|
|
1156
|
-
(
|
|
1157
|
+
x.a / 1e3,
|
|
1158
|
+
(x.d + g * (x.reverse_rotation_direction ? -1 : 1)) / 1e3,
|
|
1157
1159
|
0
|
|
1158
1160
|
)
|
|
1159
|
-
).multiply(new R().makeRotationX(
|
|
1160
|
-
|
|
1161
|
+
).multiply(new R().makeRotationX(x.alpha));
|
|
1162
|
+
l.multiply(I);
|
|
1161
1163
|
}
|
|
1162
|
-
const
|
|
1163
|
-
if (
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
),
|
|
1168
|
-
const
|
|
1169
|
-
|
|
1164
|
+
const u = new L(), d = new W(), p = new L();
|
|
1165
|
+
if (l.decompose(u, d, p), a = u, i.current && i.current.position.set(
|
|
1166
|
+
a.x,
|
|
1167
|
+
a.y,
|
|
1168
|
+
a.z
|
|
1169
|
+
), f.current) {
|
|
1170
|
+
const h = f.current.geometry;
|
|
1171
|
+
h != null && h.setPositions && h.setPositions([
|
|
1170
1172
|
0,
|
|
1171
1173
|
0,
|
|
1172
1174
|
0,
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1175
|
+
a.x,
|
|
1176
|
+
a.y,
|
|
1177
|
+
a.z
|
|
1176
1178
|
]);
|
|
1177
1179
|
}
|
|
1178
1180
|
}
|
|
1179
1181
|
return /* @__PURE__ */ r(
|
|
1180
|
-
|
|
1182
|
+
ve,
|
|
1181
1183
|
{
|
|
1182
1184
|
rapidlyChangingMotionState: e,
|
|
1183
1185
|
dhParameters: n,
|
|
1184
|
-
onTranslationChanged:
|
|
1185
|
-
children: /* @__PURE__ */
|
|
1186
|
-
/* @__PURE__ */
|
|
1186
|
+
onTranslationChanged: y,
|
|
1187
|
+
children: /* @__PURE__ */ w("group", { ...t, name: "Scene", children: [
|
|
1188
|
+
/* @__PURE__ */ w("mesh", { name: "Base", position: [0, 0, 0], children: [
|
|
1187
1189
|
/* @__PURE__ */ r("sphereGeometry", { args: [0.02, 32, 32] }),
|
|
1188
1190
|
/* @__PURE__ */ r("meshStandardMaterial", { color: "green", depthTest: !0 })
|
|
1189
1191
|
] }),
|
|
1190
1192
|
/* @__PURE__ */ r(
|
|
1191
1193
|
$,
|
|
1192
1194
|
{
|
|
1193
|
-
ref:
|
|
1194
|
-
points: [new
|
|
1195
|
+
ref: f,
|
|
1196
|
+
points: [new L(0, 0, 0), o],
|
|
1195
1197
|
color: "White",
|
|
1196
1198
|
lineWidth: 5
|
|
1197
1199
|
}
|
|
1198
1200
|
),
|
|
1199
|
-
/* @__PURE__ */
|
|
1201
|
+
/* @__PURE__ */ w("mesh", { ref: i, name: "TCP", position: o, children: [
|
|
1200
1202
|
/* @__PURE__ */ r("sphereGeometry", { args: [0.025, 32, 32] }),
|
|
1201
1203
|
/* @__PURE__ */ r("meshStandardMaterial", { color: "red", depthTest: !0 })
|
|
1202
1204
|
] })
|
|
@@ -1204,106 +1206,106 @@ function ve({
|
|
|
1204
1206
|
}
|
|
1205
1207
|
);
|
|
1206
1208
|
}
|
|
1207
|
-
const
|
|
1209
|
+
const _e = j(
|
|
1208
1210
|
({
|
|
1209
1211
|
rapidlyChangingMotionState: e,
|
|
1210
1212
|
modelFromController: n,
|
|
1211
1213
|
dhParameters: t,
|
|
1212
|
-
getModel:
|
|
1214
|
+
getModel: l = J,
|
|
1213
1215
|
flangeRef: i,
|
|
1214
|
-
postModelRender:
|
|
1215
|
-
transparentColor:
|
|
1216
|
-
instanceUrl:
|
|
1217
|
-
...
|
|
1216
|
+
postModelRender: f,
|
|
1217
|
+
transparentColor: c,
|
|
1218
|
+
instanceUrl: o,
|
|
1219
|
+
...y
|
|
1218
1220
|
}) => {
|
|
1219
|
-
const [s, m] = S(null),
|
|
1221
|
+
const [s, m] = S(null), a = G((d) => {
|
|
1220
1222
|
m(d);
|
|
1221
1223
|
}, []);
|
|
1222
1224
|
T(() => {
|
|
1223
|
-
s && (
|
|
1224
|
-
}, [s,
|
|
1225
|
-
const
|
|
1226
|
-
|
|
1225
|
+
s && (c ? we(s, c) : xe(s));
|
|
1226
|
+
}, [s, c]);
|
|
1227
|
+
const u = /* @__PURE__ */ r(
|
|
1228
|
+
Me,
|
|
1227
1229
|
{
|
|
1228
1230
|
rapidlyChangingMotionState: e,
|
|
1229
1231
|
dhParameters: t,
|
|
1230
|
-
...
|
|
1232
|
+
...y
|
|
1231
1233
|
}
|
|
1232
1234
|
);
|
|
1233
|
-
return /* @__PURE__ */
|
|
1235
|
+
return /* @__PURE__ */ w(
|
|
1234
1236
|
pe,
|
|
1235
1237
|
{
|
|
1236
|
-
fallback:
|
|
1238
|
+
fallback: u,
|
|
1237
1239
|
onError: (d) => {
|
|
1238
1240
|
console.warn(d);
|
|
1239
1241
|
},
|
|
1240
1242
|
children: [
|
|
1241
|
-
/* @__PURE__ */ r(
|
|
1242
|
-
|
|
1243
|
+
/* @__PURE__ */ r(ae, { fallback: u, children: /* @__PURE__ */ r("group", { ref: a, children: /* @__PURE__ */ r(
|
|
1244
|
+
ve,
|
|
1243
1245
|
{
|
|
1244
1246
|
rapidlyChangingMotionState: e,
|
|
1245
1247
|
dhParameters: t,
|
|
1246
1248
|
children: /* @__PURE__ */ r(
|
|
1247
|
-
|
|
1249
|
+
be,
|
|
1248
1250
|
{
|
|
1249
1251
|
modelURL: (() => {
|
|
1250
|
-
const d =
|
|
1252
|
+
const d = l(n, o);
|
|
1251
1253
|
if (!d) {
|
|
1252
|
-
const
|
|
1253
|
-
[
|
|
1254
|
+
const p = new Blob([], { type: "model/gltf-binary" }), h = new File(
|
|
1255
|
+
[p],
|
|
1254
1256
|
`${n}.glb`,
|
|
1255
1257
|
{ type: "model/gltf-binary" }
|
|
1256
1258
|
);
|
|
1257
|
-
return Promise.resolve(URL.createObjectURL(
|
|
1259
|
+
return Promise.resolve(URL.createObjectURL(h));
|
|
1258
1260
|
}
|
|
1259
1261
|
return d;
|
|
1260
1262
|
})(),
|
|
1261
|
-
postModelRender:
|
|
1263
|
+
postModelRender: f,
|
|
1262
1264
|
flangeRef: i,
|
|
1263
|
-
...
|
|
1265
|
+
...y
|
|
1264
1266
|
}
|
|
1265
1267
|
)
|
|
1266
1268
|
}
|
|
1267
1269
|
) }) }),
|
|
1268
|
-
/* @__PURE__ */ r(
|
|
1270
|
+
/* @__PURE__ */ r(ge, {})
|
|
1269
1271
|
]
|
|
1270
1272
|
}
|
|
1271
1273
|
);
|
|
1272
1274
|
}
|
|
1273
1275
|
);
|
|
1274
|
-
function
|
|
1276
|
+
function Mt({
|
|
1275
1277
|
connectedMotionGroup: e,
|
|
1276
1278
|
getModel: n = J,
|
|
1277
1279
|
flangeRef: t,
|
|
1278
|
-
transparentColor:
|
|
1280
|
+
transparentColor: l,
|
|
1279
1281
|
postModelRender: i,
|
|
1280
|
-
...
|
|
1282
|
+
...f
|
|
1281
1283
|
}) {
|
|
1282
1284
|
if (!e.dhParameters)
|
|
1283
1285
|
return null;
|
|
1284
|
-
const
|
|
1285
|
-
return
|
|
1286
|
-
|
|
1286
|
+
const c = e.modelFromController || "";
|
|
1287
|
+
return c && n(c) ? /* @__PURE__ */ r(
|
|
1288
|
+
_e,
|
|
1287
1289
|
{
|
|
1288
1290
|
rapidlyChangingMotionState: e.rapidlyChangingMotionState,
|
|
1289
|
-
modelFromController:
|
|
1291
|
+
modelFromController: c,
|
|
1290
1292
|
dhParameters: e.dhParameters,
|
|
1291
1293
|
getModel: n,
|
|
1292
1294
|
flangeRef: t,
|
|
1293
|
-
transparentColor:
|
|
1295
|
+
transparentColor: l,
|
|
1294
1296
|
postModelRender: i,
|
|
1295
|
-
...
|
|
1297
|
+
...f
|
|
1296
1298
|
}
|
|
1297
1299
|
) : /* @__PURE__ */ r(
|
|
1298
|
-
|
|
1300
|
+
Me,
|
|
1299
1301
|
{
|
|
1300
1302
|
rapidlyChangingMotionState: e.rapidlyChangingMotionState,
|
|
1301
1303
|
dhParameters: e.dhParameters,
|
|
1302
|
-
...
|
|
1304
|
+
...f
|
|
1303
1305
|
}
|
|
1304
1306
|
);
|
|
1305
1307
|
}
|
|
1306
|
-
const
|
|
1308
|
+
const ie = {
|
|
1307
1309
|
[_.Abb]: [0, 0, 0, 0, Math.PI / 2, 0, 0],
|
|
1308
1310
|
[_.Fanuc]: [0, 0, 0, 0, -Math.PI / 2, 0, 0],
|
|
1309
1311
|
[_.Yaskawa]: [0, 0, 0, 0, -Math.PI / 2, 0, 0],
|
|
@@ -1326,7 +1328,7 @@ const oe = {
|
|
|
1326
1328
|
0
|
|
1327
1329
|
]
|
|
1328
1330
|
};
|
|
1329
|
-
function
|
|
1331
|
+
function Qe(e) {
|
|
1330
1332
|
const [n] = e.split("_");
|
|
1331
1333
|
switch (n) {
|
|
1332
1334
|
case "ABB":
|
|
@@ -1343,34 +1345,34 @@ function Ke(e) {
|
|
|
1343
1345
|
return null;
|
|
1344
1346
|
}
|
|
1345
1347
|
}
|
|
1346
|
-
function
|
|
1347
|
-
const t =
|
|
1348
|
-
return t && t in
|
|
1348
|
+
function _t(e, n) {
|
|
1349
|
+
const t = Qe(e);
|
|
1350
|
+
return t && t in ie ? ie[t] : n || null;
|
|
1349
1351
|
}
|
|
1350
|
-
const
|
|
1351
|
-
const { inverseSolver: n, dhParameters: t, ...
|
|
1352
|
-
|
|
1352
|
+
const Tt = j((e) => {
|
|
1353
|
+
const { inverseSolver: n, dhParameters: t, ...l } = e, [i, f] = S(
|
|
1354
|
+
C.RevoluteJoint
|
|
1353
1355
|
);
|
|
1354
1356
|
T(() => {
|
|
1355
|
-
t.length &&
|
|
1357
|
+
t.length && f(t[0].type ?? C.RevoluteJoint);
|
|
1356
1358
|
}, [t]);
|
|
1357
|
-
const
|
|
1358
|
-
return
|
|
1359
|
+
const c = A(() => n === null && i === C.RevoluteJoint, [n, i]), o = A(() => n === null && i === C.PrismaticJoint, [n, i]);
|
|
1360
|
+
return A(() => !!n, [n]) || c ? /* @__PURE__ */ r(Re, { dhParameters: t, ...l }) : o ? /* @__PURE__ */ r(_e, { dhParameters: t, ...l }) : null;
|
|
1359
1361
|
});
|
|
1360
1362
|
export {
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1363
|
+
bt as C,
|
|
1364
|
+
Mt as L,
|
|
1365
|
+
ie as M,
|
|
1364
1366
|
ne as P,
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1367
|
+
Rt as R,
|
|
1368
|
+
wt as S,
|
|
1369
|
+
xt as T,
|
|
1370
|
+
vt as a,
|
|
1371
|
+
Ze as b,
|
|
1372
|
+
_e as c,
|
|
1371
1373
|
J as d,
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1374
|
+
Qe as e,
|
|
1375
|
+
Re as f,
|
|
1376
|
+
_t as g,
|
|
1377
|
+
Tt as h
|
|
1376
1378
|
};
|