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