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