@wandelbots/wandelbots-js-react-components 1.23.0 → 1.24.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wandelbots/wandelbots-js-react-components",
3
- "version": "1.23.0",
3
+ "version": "1.24.1",
4
4
  "description": "React UI toolkit for building applications on top of the Wandelbots platform",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -128,13 +128,13 @@ const JoggingPanelInner = observer(
128
128
  // Update jogging mode on jogger based on user selections
129
129
  useReaction(
130
130
  () => [
131
- store.currentTab,
131
+ store.currentTab.id,
132
132
  store.selectedTcpId,
133
133
  store.activeCoordSystemId,
134
134
  store.activeDiscreteIncrement,
135
135
  ],
136
136
  () => {
137
- if (store.activationState === "active") store.activate()
137
+ if (store.activationState !== "inactive") store.activate()
138
138
  },
139
139
  )
140
140
 
@@ -49,6 +49,9 @@ export class JoggingStore {
49
49
  */
50
50
  activationError: unknown | null = null
51
51
 
52
+ /** To avoid activation race conditions */
53
+ activationCounter: number = 0
54
+
52
55
  /** Locks to prevent UI interactions during certain operations */
53
56
  locks = new Set<string>()
54
57
 
@@ -195,16 +198,7 @@ export class JoggingStore {
195
198
 
196
199
  /** Activate the jogger with current settings */
197
200
  async activate(opts: { manual?: boolean } = {}) {
198
- const {
199
- currentTab,
200
- selectedTcpId,
201
- activeCoordSystemId,
202
- activeDiscreteIncrement,
203
- jogger,
204
- } = this
205
-
206
- if (this.activationState === "loading") return
207
-
201
+ console.log("activate!!")
208
202
  if (this.manualActivationRequired && !opts.manual) return
209
203
 
210
204
  runInAction(() => {
@@ -224,25 +218,25 @@ export class JoggingStore {
224
218
  console.error(err)
225
219
  }
226
220
 
227
- if (currentTab.id === "cartesian") {
221
+ if (this.currentTab.id === "cartesian") {
228
222
  const cartesianJoggingOpts = {
229
- tcpId: selectedTcpId,
230
- coordSystemId: activeCoordSystemId,
223
+ tcpId: this.selectedTcpId,
224
+ coordSystemId: this.activeCoordSystemId,
231
225
  }
232
226
 
233
- if (activeDiscreteIncrement) {
234
- jogger.setJoggingMode("increment", cartesianJoggingOpts)
227
+ if (this.activeDiscreteIncrement) {
228
+ this.jogger.setJoggingMode("increment", cartesianJoggingOpts)
235
229
  } else {
236
- jogger.setJoggingMode("cartesian", cartesianJoggingOpts)
230
+ this.jogger.setJoggingMode("cartesian", cartesianJoggingOpts)
237
231
  }
238
232
  } else {
239
- jogger.setJoggingMode("joint")
233
+ this.jogger.setJoggingMode("joint")
240
234
  }
241
235
 
242
- if (jogger.activeWebsocket) {
236
+ if (this.jogger.activeWebsocket) {
243
237
  try {
244
- jogger.stop()
245
- await jogger.activeWebsocket.nextMessage()
238
+ this.jogger.stop()
239
+ await this.jogger.activeWebsocket.nextMessage()
246
240
  } catch (err) {
247
241
  runInAction(() => {
248
242
  this.activationState = "inactive"
@@ -0,0 +1,142 @@
1
+ import { animated } from "@react-spring/three"
2
+ import { useGLTF } from "@react-three/drei"
3
+ import type { RobotModelProps } from "./types"
4
+
5
+ ABB_1300_115_10.config = {
6
+ rotationOffsets: [0, -Math.PI / 2, 0, 0, 0, 0],
7
+ }
8
+
9
+ export function ABB_1300_115_10({ modelURL, ...props }: RobotModelProps) {
10
+ const gltf = useGLTF(modelURL) as any
11
+ const nodes = gltf.nodes
12
+ const materials = gltf.materials
13
+
14
+ return (
15
+ <group {...props} dispose={null}>
16
+ <group name="Scene">
17
+ <mesh
18
+ name="link_0"
19
+ castShadow
20
+ receiveShadow
21
+ geometry={nodes.link_0.geometry}
22
+ material={materials.Plastic}
23
+ />
24
+ <animated.group name="ABB_IRB_1300_115_10_J00">
25
+ <animated.group
26
+ name="ABB_IRB_1300_115_10_J01"
27
+ position={[0.15, 0.544, 0]}
28
+ rotation={[-Math.PI / 2, -Math.PI / 2, 0]}
29
+ >
30
+ <animated.group
31
+ name="ABB_IRB_1300_115_10_J02"
32
+ position={[0.575, 0, 0]}
33
+ >
34
+ <animated.group
35
+ name="ABB_IRB_1300_115_10_J03"
36
+ position={[0.04, 0, 0]}
37
+ rotation={[-Math.PI / 2, 0, 0]}
38
+ >
39
+ <animated.group
40
+ name="ABB_IRB_1300_115_10_J04"
41
+ position={[0, 0.425, 0]}
42
+ rotation={[Math.PI / 2, 0, 0]}
43
+ >
44
+ <animated.group
45
+ name="ABB_IRB_1300_115_10_J05"
46
+ rotation={[Math.PI / 2, 0, -Math.PI]}
47
+ >
48
+ <group
49
+ name="ABB_IRB_1300_115_10_FLG"
50
+ position={[0, 0.092, 0]}
51
+ />
52
+ <mesh
53
+ name="link_6"
54
+ castShadow
55
+ receiveShadow
56
+ geometry={nodes.link_6.geometry}
57
+ material={materials.Metal}
58
+ position={[1.159, -0.575, 0]}
59
+ rotation={[0, 0, Math.PI / 2]}
60
+ />
61
+ </animated.group>
62
+ <mesh
63
+ name="link_5"
64
+ castShadow
65
+ receiveShadow
66
+ geometry={nodes.link_5.geometry}
67
+ material={materials.Plastic}
68
+ position={[-1.159, 0, 0.575]}
69
+ rotation={[Math.PI / 2, 0, -Math.PI / 2]}
70
+ />
71
+ </animated.group>
72
+ <group
73
+ name="link_4"
74
+ position={[-1.159, -0.15, 0]}
75
+ rotation={[-Math.PI, 0, -Math.PI / 2]}
76
+ >
77
+ <mesh
78
+ name="visuals004"
79
+ castShadow
80
+ receiveShadow
81
+ geometry={nodes.visuals004.geometry}
82
+ material={materials.Plastic}
83
+ />
84
+ <mesh
85
+ name="visuals004_1"
86
+ castShadow
87
+ receiveShadow
88
+ geometry={nodes.visuals004_1.geometry}
89
+ material={materials.PlasticRed}
90
+ />
91
+ </group>
92
+ </animated.group>
93
+ <group
94
+ name="link_3"
95
+ position={[-1.119, 0, 0.15]}
96
+ rotation={[Math.PI / 2, 0, -Math.PI / 2]}
97
+ >
98
+ <mesh
99
+ name="visuals003"
100
+ castShadow
101
+ receiveShadow
102
+ geometry={nodes.visuals003.geometry}
103
+ material={materials.Plastic}
104
+ />
105
+ <mesh
106
+ name="visuals003_1"
107
+ castShadow
108
+ receiveShadow
109
+ geometry={nodes.visuals003_1.geometry}
110
+ material={materials.PlasticRed}
111
+ />
112
+ <mesh
113
+ name="visuals003_2"
114
+ castShadow
115
+ receiveShadow
116
+ geometry={nodes.visuals003_2.geometry}
117
+ material={materials.Plastic}
118
+ />
119
+ </group>
120
+ </animated.group>
121
+ <mesh
122
+ name="link_2"
123
+ castShadow
124
+ receiveShadow
125
+ geometry={nodes.link_2.geometry}
126
+ material={materials.Plastic}
127
+ position={[-0.544, 0, 0.15]}
128
+ rotation={[Math.PI / 2, 0, -Math.PI / 2]}
129
+ />
130
+ </animated.group>
131
+ <mesh
132
+ name="link_1"
133
+ castShadow
134
+ receiveShadow
135
+ geometry={nodes.link_1.geometry}
136
+ material={materials.Plastic}
137
+ />
138
+ </animated.group>
139
+ </group>
140
+ </group>
141
+ )
142
+ }
@@ -1,6 +1,7 @@
1
1
  import { Suspense, useCallback, useEffect, useRef } from "react"
2
2
 
3
3
  import { ABB_1200_07_7 } from "./ABB_1200_07_7"
4
+ import { ABB_1300_115_10 } from "./ABB_1300_115_10"
4
5
  import { FANUC_ARC_Mate_100iD } from "./FANUC_ARC_Mate_100iD"
5
6
  import { FANUC_ARC_Mate_120iD } from "./FANUC_ARC_Mate_120iD"
6
7
  import { FANUC_CRX10iA } from "./FANUC_CRX10iA"
@@ -234,6 +235,9 @@ export const SupportedRobot = externalizeComponent(
234
235
  case "ABB_1200_07_7":
235
236
  Robot = ABB_1200_07_7
236
237
  break
238
+ case "ABB_1300_115_10":
239
+ Robot = ABB_1300_115_10
240
+ break
237
241
  default:
238
242
  console.warn(`Unknown robot type: ${modelFromController}`)
239
243
  Robot = null