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