@wandelbots/wandelbots-js-react-components 6.3.0 → 6.4.0-pr.feat-jogging-gizmo.649.179415f
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 +202 -120
- package/dist/3d.cjs +1 -1
- package/dist/3d.d.ts +3 -3
- package/dist/3d.js +19 -22
- package/dist/SafetyBar/index.cjs +1 -1
- package/dist/SafetyBar/index.js +1 -1
- package/dist/chunks/ConnectedMotionGroup-_YUOhOLL.cjs +4 -0
- package/dist/chunks/ConnectedMotionGroup-neDeA3uW.js +2617 -0
- package/dist/chunks/Robot-CvviE5MR.js +1684 -0
- package/dist/chunks/Robot-VZaqKPxi.cjs +1 -0
- package/dist/chunks/{SafetyBar-Cy9DiXp9.js → SafetyBar-B9OQgerp.js} +1 -1
- package/dist/chunks/{SafetyBar-DPrv_OQA.cjs → SafetyBar-D7QT6J0m.cjs} +1 -1
- package/dist/chunks/{externalizeComponent-EDymnaGR.js → externalizeComponent-CZu38L-d.js} +29 -105
- package/dist/chunks/externalizeComponent-CdX5L_lW.cjs +2 -0
- package/dist/chunks/useSmoothedMotionState-BidFV3kQ.js +255 -0
- package/dist/chunks/useSmoothedMotionState-CdhkBCqt.cjs +1 -0
- package/dist/components/AppHeader.d.ts +1 -1
- package/dist/components/jogging/JoggingCartesianAxisControl.d.ts +1 -1
- package/dist/components/jogging/JoggingJointTab.d.ts +1 -1
- package/dist/components/jogging/JoggingPanel.d.ts +6 -3
- package/dist/components/jogging/JoggingStore.d.ts +5 -1
- package/dist/components/jogging/gizmo/JoggingGizmo.d.ts +42 -0
- package/dist/components/jogging/gizmo/JoggingGizmoOrientation.d.ts +31 -0
- package/dist/components/jogging/gizmo/gizmoShared.d.ts +60 -0
- package/dist/components/jogging/gizmo/gizmoTranslation.d.ts +11 -0
- package/dist/components/jogging/gizmo/jogGizmoProjection.d.ts +65 -0
- package/dist/components/jogging/jogHandle.d.ts +26 -0
- package/dist/components/jogging/joggingColors.d.ts +18 -0
- package/dist/components/jogging/useHold.d.ts +33 -0
- package/dist/components/jogging/useHoldToJog.d.ts +23 -0
- package/dist/components/robots/GenericRobot.d.ts +2 -1
- package/dist/components/robots/LinearAxis.d.ts +1 -1
- package/dist/components/robots/LinearAxisAnimator.d.ts +11 -2
- package/dist/components/robots/Robot.d.ts +1 -1
- package/dist/components/robots/robotModelLogic.d.ts +11 -9
- package/dist/components/utils/hooks.d.ts +1 -6
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +3 -18
- package/dist/core.js +27 -54
- package/dist/index.cjs +1 -1
- package/dist/index.js +42 -72
- package/dist/lib/ConnectedMotionGroup.d.ts +5 -7
- package/dist/lib/JoggerConnection.d.ts +29 -5
- package/dist/lib/MotionStreamConnection.d.ts +4 -6
- package/dist/lib/novaConnection.d.ts +23 -0
- package/package.json +31 -66
- package/dist/Setup.d.ts +0 -11
- package/dist/chunks/MotionGroupVisualizer-DshWR1wY.js +0 -1653
- package/dist/chunks/MotionGroupVisualizer-eD7yFEcF.cjs +0 -1
- package/dist/chunks/externalizeComponent-OO4jcrz5.cjs +0 -2
- package/dist/chunks/theming-DfSy4-Ic.cjs +0 -4
- package/dist/chunks/theming-mF9Rt8SS.js +0 -5542
- package/dist/chunks/useSmoothedMotionState-DyDgSVYX.js +0 -478
- package/dist/chunks/useSmoothedMotionState-VYxEIyfr.cjs +0 -1
- package/dist/components/3d-viewport/CoordinateSystemTransform.d.ts +0 -11
- package/dist/components/AdornedTextField.d.ts +0 -7
- package/dist/components/CopyableText.d.ts +0 -6
- package/dist/components/CycleTimer/CycleTimer.d.ts +0 -3
- package/dist/components/CycleTimer/DefaultVariant.d.ts +0 -9
- package/dist/components/CycleTimer/SmallVariant.d.ts +0 -10
- package/dist/components/CycleTimer/index.d.ts +0 -27
- package/dist/components/CycleTimer/types.d.ts +0 -49
- package/dist/components/CycleTimer/useAnimations.d.ts +0 -14
- package/dist/components/CycleTimer/useTimerLogic.d.ts +0 -24
- package/dist/components/CycleTimer/utils.d.ts +0 -21
- package/dist/components/CycleTimer.d.ts +0 -3
- package/dist/components/DataGrid.d.ts +0 -66
- package/dist/components/LogPanel.d.ts +0 -38
- package/dist/components/LogStore.d.ts +0 -12
- package/dist/components/LogViewer.d.ts +0 -46
- package/dist/components/ProgramControl.d.ts +0 -55
- package/dist/components/ProgramStateIndicator.d.ts +0 -26
- package/dist/components/RobotCard.d.ts +0 -98
- package/dist/components/RobotListItem.d.ts +0 -34
- package/dist/components/RobotSetupReadinessIndicator.d.ts +0 -37
- package/dist/components/SelectableFab.d.ts +0 -7
- package/dist/components/TabBar.d.ts +0 -45
- package/dist/components/ThemeSelect.d.ts +0 -6
- package/dist/components/Timer/Timer.d.ts +0 -3
- package/dist/components/Timer/TimerDefaultVariant.d.ts +0 -9
- package/dist/components/Timer/TimerSmallVariant.d.ts +0 -10
- package/dist/components/Timer/index.d.ts +0 -19
- package/dist/components/Timer/types.d.ts +0 -35
- package/dist/components/Timer/useTimerAnimations.d.ts +0 -10
- package/dist/components/Timer/useTimerLogic.d.ts +0 -19
- package/dist/components/Timer/utils.d.ts +0 -17
- package/dist/components/Timer.d.ts +0 -3
- package/dist/components/TransparentOverlay.d.ts +0 -4
- package/dist/components/jogging/JoggingFreedriveTab.d.ts +0 -1
- package/dist/components/jogging/PoseCartesianValues.d.ts +0 -9
- package/dist/components/jogging/PoseJointValues.d.ts +0 -8
- package/dist/components/robots/AxisConfig.d.ts +0 -2
- package/dist/components/robots/manufacturerHomePositions.d.ts +0 -20
- package/dist/icons/DropdownArrowIcon.d.ts +0 -2
- package/dist/icons/index.d.ts +0 -12
- package/dist/lib/novaCompat.d.ts +0 -16
- package/dist/themes/createDarkTheme.d.ts +0 -7
- package/dist/themes/themeTypes.d.ts +0 -40
- package/dist/themes/theming.d.ts +0 -24
package/README.md
CHANGED
|
@@ -1,36 +1,57 @@
|
|
|
1
1
|
# @wandelbots/wandelbots-js-react-components
|
|
2
2
|
|
|
3
|
-
[](https://npmjs.org/package/@wandelbots/wandelbots-js-react-components) [](https://bundlephobia.com/package/@wandelbots/wandelbots-js-react-components) [](https://github.com/wandelbotsgmbh/wandelbots-js-react-components/actions/workflows/release.yml)
|
|
3
|
+
[](https://npmjs.org/package/@wandelbots/wandelbots-js-react-components) [](https://bundlephobia.com/package/@wandelbots/wandelbots-js-react-components) [](https://github.com/wandelbotsgmbh/wandelbots-js-react-components/actions/workflows/release.yml)
|
|
4
4
|
|
|
5
|
-
React UI components for
|
|
5
|
+
React UI components for robotics applications on the [Wandelbots NOVA platform](https://www.wandelbots.com/).
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The library contains robotics parts (jogging, a 3D view of the robot, the safety state) and the logic that connects them to a NOVA instance. All styles come from the Nova Design System ([`@wandelbots/mui`](https://www.npmjs.com/package/@wandelbots/mui)): the parts use the MUI theme of the app. Built with TypeScript, MUI, React Three Fiber and MobX.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
See the [Storybook](https://wandelbotsgmbh.github.io/wandelbots-js-react-components) for interactive examples and API documentation.
|
|
9
|
+
To see the parts on a NOVA instance, start the [playground](#playground).
|
|
12
10
|
|
|
13
11
|
## Install
|
|
14
12
|
|
|
15
13
|
```bash
|
|
16
|
-
pnpm add @wandelbots/wandelbots-js-react-components
|
|
14
|
+
pnpm add @wandelbots/wandelbots-js-react-components \
|
|
15
|
+
react react-dom \
|
|
16
|
+
@mui/material @mui/icons-material @emotion/react @emotion/styled \
|
|
17
|
+
@wandelbots/mui mobx mobx-react-lite
|
|
17
18
|
```
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
The 3D parts need three.js and React Three Fiber in addition. If you don't need 3D rendering in your application, always import from `/core`.
|
|
20
21
|
|
|
21
22
|
```typescript
|
|
22
23
|
import {
|
|
23
|
-
SafetyBar,
|
|
24
24
|
JoggingPanel,
|
|
25
|
-
|
|
26
|
-
Timer,
|
|
25
|
+
SafetyBar,
|
|
27
26
|
} from "@wandelbots/wandelbots-js-react-components/core"
|
|
28
27
|
```
|
|
29
28
|
|
|
30
|
-
For 3D-enabled components, use `/3d
|
|
29
|
+
For 3D-enabled components, use `/3d`, and add the 3D packages:
|
|
31
30
|
|
|
32
31
|
```typescript
|
|
33
|
-
import {
|
|
32
|
+
import {
|
|
33
|
+
MotionGroupVisualizer,
|
|
34
|
+
Robot,
|
|
35
|
+
} from "@wandelbots/wandelbots-js-react-components/3d"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pnpm add three three-stdlib @react-three/fiber @react-three/drei
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
You can also import from the top-level package, but then you'll need to provide all optional dependencies.
|
|
43
|
+
|
|
44
|
+
The parts use the theme of your app. Create it with `createNovaMuiTheme` of `@wandelbots/mui`:
|
|
45
|
+
|
|
46
|
+
```tsx
|
|
47
|
+
import { ThemeProvider } from "@mui/material/styles"
|
|
48
|
+
import { createNovaMuiTheme } from "@wandelbots/mui"
|
|
49
|
+
|
|
50
|
+
const theme = createNovaMuiTheme()
|
|
51
|
+
|
|
52
|
+
export function App() {
|
|
53
|
+
return <ThemeProvider theme={theme}>{/* your app */}</ThemeProvider>
|
|
54
|
+
}
|
|
34
55
|
```
|
|
35
56
|
|
|
36
57
|
For icons, use the dedicated [`@wandelbots/icons`](https://www.npmjs.com/package/@wandelbots/icons) package (the `/wb-icons` entry point has been removed). Each icon is imported from its own subpath — there is no bulk export:
|
|
@@ -42,34 +63,72 @@ import { Robot } from "@wandelbots/icons/Robot"
|
|
|
42
63
|
|
|
43
64
|
Browse the full icon set at https://wandelbotsgmbh.github.io/nova-design-system/#icons
|
|
44
65
|
|
|
45
|
-
|
|
66
|
+
**Available Entry Points:**
|
|
46
67
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
react react-
|
|
50
|
-
|
|
51
|
-
three @react-three/fiber @react-three/drei three-stdlib
|
|
52
|
-
```
|
|
68
|
+
- **`.`** (Main) — All components. Requires the peer dependencies of `/core` and `/3d`.
|
|
69
|
+
- **`/core`** — The parts without 3D (jogging, `SafetyBar`, `AppHeader`, `LoadingCover`, `NoMotionGroupModal`), the NOVA connections and `JoggingStore`, the motion state helpers and `i18n`.
|
|
70
|
+
- **`/3d`** — The 3D parts (`Robot`, `MotionGroupVisualizer`, `SafetyZonesRenderer`, …). Requires in addition three, three-stdlib, @react-three/fiber and @react-three/drei.
|
|
71
|
+
- **`/SafetyBar`** — Only `SafetyBar` (also as the default export).
|
|
53
72
|
|
|
54
|
-
|
|
73
|
+
### Peer dependencies
|
|
74
|
+
|
|
75
|
+
| Package | Version |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| `react`, `react-dom` | ^19 |
|
|
78
|
+
| `@mui/material`, `@mui/icons-material` | ^7 |
|
|
79
|
+
| `@emotion/react`, `@emotion/styled` | ^11 |
|
|
80
|
+
| `@wandelbots/mui` | ^2 |
|
|
81
|
+
| `mobx` | ^6.13.6 |
|
|
82
|
+
| `mobx-react-lite` | ^4.1.0 |
|
|
83
|
+
| `three` (only `/3d`) | >=0.182 |
|
|
84
|
+
| `three-stdlib` (only `/3d`) | >=2 |
|
|
85
|
+
| `@react-three/fiber` (only `/3d`) | ^9 |
|
|
86
|
+
| `@react-three/drei` (only `/3d`) | ^10 |
|
|
55
87
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
-
|
|
88
|
+
These packages are peer dependencies because the app and the library must use the same copy: React, the MUI theme of the app, the MobX stores that the app reads with its own `observer`, and the `<Canvas>` of React Three Fiber.
|
|
89
|
+
|
|
90
|
+
`@wandelbots/nova-js` is a normal dependency with an exact version: the library has its own copy, see [Connecting to NOVA](#connecting-to-nova).
|
|
59
91
|
|
|
60
92
|
## Migration & Breaking Changes
|
|
61
93
|
|
|
62
|
-
|
|
94
|
+
### From 6.x to 7.0.0
|
|
95
|
+
|
|
96
|
+
7.0.0 keeps only the robotics parts and the logic that connects them to NOVA. All styles come from the Nova Design System.
|
|
63
97
|
|
|
64
|
-
|
|
98
|
+
**Removed exports.** A removed component also takes its `…Props` type with it.
|
|
99
|
+
|
|
100
|
+
| Removed in 7.0.0 | Use instead |
|
|
101
|
+
| --- | --- |
|
|
102
|
+
| `createNovaTheme`, `createNovaMuiTheme` | `createNovaMuiTheme` of `@wandelbots/mui` (same name). The parts use the theme of the app. |
|
|
103
|
+
| The `componentsExt` extension of the MUI types `Theme` and `ThemeOptions` | No replacement. The jogging parts have their colors built in. `JoggingCartesianAxisControl` keeps its `colors` prop. |
|
|
104
|
+
| `AdornedTextField` | `AdornedTextField` of `@wandelbots/mui` |
|
|
105
|
+
| `SelectableFab` | No replacement |
|
|
106
|
+
| `useAnimationFrame`, `useAutorun`, `useMounted`, `useReaction` | No replacement |
|
|
107
|
+
| `PoseCartesianValues`, `PoseJointValues` | No replacement in 7.0.0. Copy them from 6.3.0 until a 7.x version has a replacement. |
|
|
108
|
+
| `MANUFACTURER_HOME_CONFIGS`, `getDefaultHomeConfig`, `extractManufacturer` | `nova.api.motionGroupModels.getMotionGroupHomejoints(model)` of `@wandelbots/nova-js`: the home joints of a motion group model, from the NOVA instance |
|
|
109
|
+
| `AxisConfig`, `defaultAxisConfig` | No replacement |
|
|
110
|
+
| `ProgramControl`, `ProgramState`, `ProgramStateIndicator`, `Timer`, `TimerControls`, `CycleTimer`, `CycleTimerControls`, `CycleTimerState`, `RobotCard`, `RobotListItem`, `RobotSetupReadinessIndicator`, `RobotSetupReadinessState`, `TabBar`, `TabItem`, `WandelbotsDataGrid`, `LogPanel`, `LogViewer`, `LogStore`, `LogLevel`, `LogMessage`, `createLogMessage`, `createInfoMessage`, `createWarningMessage`, `createErrorMessage`, `createDebugMessage` | No replacement. Copy them from 6.3.0 if your app needs them. |
|
|
111
|
+
|
|
112
|
+
**Other changes:**
|
|
113
|
+
|
|
114
|
+
- **Peer dependencies** (see [Peer dependencies](#peer-dependencies)): React 19, MUI 7, `@react-three/fiber` 9 and `@react-three/drei` 10. New peers: `@wandelbots/mui` ^2 (an app with `@wandelbots/mui` 1.x must update it), `mobx` ^6.13.6 and `mobx-react-lite` ^4.1.0.
|
|
115
|
+
- **nova-js:** `@wandelbots/nova-js` 4.13.0 is a normal dependency with an exact version. The library creates its own NOVA client: from the client of the app (it reads only the URL and the access token), or from a URL string. The type of this parameter is `NovaConnection`. The calls of your app stay the same, also with another nova-js version in the app. `ConnectedMotionGroup`, `MotionStreamConnection` and `JoggerConnection` have no public `nova` field any more: use the client of your app.
|
|
116
|
+
- **`defaultGetModel(model, connection?)`:** the second parameter is a `NovaConnection`. A URL string works as before; a NOVA client also gives the access token. `Robot` and `LinearAxis` without `getModel` download the model with the connection of their `ConnectedMotionGroup`.
|
|
117
|
+
- **Model download without the token:** in an app that its NOVA instance does not serve (for example in local development with an access token), `MotionGroupVisualizer`, `SupportedRobot` and `SupportedLinearAxis` download the model without the token. Give them a `getModel` that uses the client of your app, `(model) => defaultGetModel(model, nova)` (as the playground does), or put the token into `localStorage["wbjs.access_token"]`.
|
|
118
|
+
- **Jogging:** a press of a jog button that ends before NOVA confirms the jogging connection (about 0.1 to 0.5 s) moves nothing. Before, such a press could move the robot briefly.
|
|
119
|
+
- **Websockets:** `JoggerConnection.dispose()` also closes the motion stream that `JoggerConnection.open()` opened (a motion stream that you give to the constructor stays open). `ConnectedMotionGroup.dispose()` also closes the websocket of the controller state.
|
|
120
|
+
- **Look:** `AppHeader` and `LoadingCover` use the styles of the design system, so they look a little different.
|
|
121
|
+
- **Release asset:** `no-draco-models.zip` is gone. The models come from the NOVA API (since 4.0.0).
|
|
122
|
+
|
|
123
|
+
### 4.x Core Changes
|
|
65
124
|
|
|
66
125
|
Robot data is now fetched from a running nova instance. This eliminates the need of shipping every react application with the robot data attached.
|
|
67
126
|
|
|
68
|
-
It is still possible to
|
|
127
|
+
It is still possible to load robot models from other files: give `Robot`, `SupportedRobot`, `MotionGroupVisualizer` or `LinearAxis` a `getModel` function that returns a promise of the URL of the model file.
|
|
69
128
|
|
|
70
|
-
The `wandelbots-js-react-components` library can be used both with and without a Nova connection. For details on connecting to a Nova instance, see
|
|
129
|
+
The `wandelbots-js-react-components` library can be used both with and without a Nova connection. For details on connecting to a Nova instance, see [Connecting to NOVA](#connecting-to-nova).
|
|
71
130
|
|
|
72
|
-
The list of available robots will now be automatically updated along with the nova version. There is no more need to update nova apps
|
|
131
|
+
The list of available robots will now be automatically updated along with the nova version. There is no more need to update nova apps whenever there is a new supported robot the app wants to feature.
|
|
73
132
|
|
|
74
133
|
Robot dh-parameters are now using a new format.
|
|
75
134
|
|
|
@@ -83,13 +142,17 @@ interface DHParameter {
|
|
|
83
142
|
}
|
|
84
143
|
```
|
|
85
144
|
|
|
145
|
+
### Other versions
|
|
146
|
+
|
|
147
|
+
Breaking changes for each major version are documented in the [GitHub Releases](https://github.com/wandelbotsgmbh/wandelbots-js-react-components/releases).
|
|
148
|
+
|
|
86
149
|
## Components
|
|
87
150
|
|
|
88
151
|
### Robot Control & Jogging
|
|
89
152
|
|
|
90
153
|
Manual robot control interfaces.
|
|
91
154
|
|
|
92
|
-
**
|
|
155
|
+
**JoggingPanel** - Complete jogging interface with cartesian and joint controls
|
|
93
156
|
|
|
94
157
|
- Dual-mode operation (Cartesian & Joint space)
|
|
95
158
|
- Real-time velocity control
|
|
@@ -97,98 +160,91 @@ Manual robot control interfaces.
|
|
|
97
160
|
|
|
98
161
|
**Individual Jogging Controls**
|
|
99
162
|
|
|
100
|
-
- **
|
|
101
|
-
- **
|
|
102
|
-
- **
|
|
103
|
-
|
|
104
|
-
### Program Execution
|
|
163
|
+
- **JoggingCartesianAxisControl** - Single-axis cartesian movement
|
|
164
|
+
- **JoggingJointValueControl** - Individual joint controls
|
|
165
|
+
- **VelocitySlider** (and **VelocitySliderLabel**) - Speed adjustment interface
|
|
166
|
+
- **JoggingStore** - The state of the jogging (velocity, coordinate system, the jogging connection). `JoggingPanel` gives it to `onSetup`, and `JoggingStore.loadFor` creates one for your own controls.
|
|
105
167
|
|
|
106
|
-
|
|
168
|
+
**JoggingGizmo** and **JoggingGizmoOrientation** (from `/3d`, beta) - Jogging by the axes of the jog frame as the camera of the 3D view sees them: orbit the view and the gizmo turns with it, so the arrow pointing right on screen moves the robot right on screen. Hold a handle to jog.
|
|
107
169
|
|
|
108
|
-
|
|
170
|
+
- The gizmo draws in its own small canvas, so it can sit in a panel next to the 3D view. `JoggingGizmoOrientation` goes inside the app's `<Canvas>` and passes the camera's view to the gizmo through a shared ref. Until it has, the gizmo stays disabled.
|
|
171
|
+
- `frameQuaternion` is the frame the gizmo jogs along, as the 3D scene has it. A frame that turns, such as the tool's, can be a function.
|
|
172
|
+
- The gizmo moves nothing itself: `onJogStart(axis, direction)` and `onJogStop` leave that to the app, in the frame it jogs in.
|
|
109
173
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
- Manual reset capabilities
|
|
174
|
+
```tsx
|
|
175
|
+
const orientation = useRef<Quaternion | null>(null)
|
|
113
176
|
|
|
114
|
-
|
|
177
|
+
<Canvas>
|
|
178
|
+
{/* … the 3D view */}
|
|
179
|
+
<JoggingGizmoOrientation target={orientation} />
|
|
180
|
+
</Canvas>
|
|
115
181
|
|
|
116
|
-
|
|
117
|
-
|
|
182
|
+
<JoggingGizmo
|
|
183
|
+
orientation={orientation}
|
|
184
|
+
onJogStart={(axis, direction) => startJogging(axis, direction)}
|
|
185
|
+
onJogStop={() => stopJogging()}
|
|
186
|
+
/>
|
|
187
|
+
```
|
|
118
188
|
|
|
119
189
|
### 3D Visualization & Robotics
|
|
120
190
|
|
|
121
|
-
3D components for robot visualization.
|
|
191
|
+
3D components for robot visualization. They render inside the `<Canvas>` of React Three Fiber.
|
|
192
|
+
|
|
193
|
+
**Robot** - Real-time 3D robot rendering
|
|
194
|
+
|
|
195
|
+
- Live pose updates from a `ConnectedMotionGroup`
|
|
196
|
+
- The model of the motion group from the NOVA instance (`defaultGetModel`)
|
|
122
197
|
|
|
123
|
-
**
|
|
198
|
+
**LinearAxis** - The same for a linear axis
|
|
124
199
|
|
|
125
|
-
-
|
|
126
|
-
- Extensive robot model support from major manufacturers
|
|
127
|
-
- [Supported Models](https://wandelbotsgmbh.github.io/wandelbots-js-react-components/?path=/story/3d-view-robot-supported-models--abb-1010-037-15) - ABB, FANUC, KUKA, Universal Robots, Yaskawa (100+ models)
|
|
128
|
-
- Automatic model loading from CDN
|
|
200
|
+
**SupportedRobot**, **SupportedLinearAxis** and **MotionGroupVisualizer** - The same without a `ConnectedMotionGroup`: they take a motion state, the model name and the DH parameters. `MotionGroupVisualizer` picks the robot or the linear axis. The `…Exact` variants show the pose without smoothing.
|
|
129
201
|
|
|
130
|
-
**
|
|
202
|
+
**SafetyZonesRenderer** - 3D safety visualization
|
|
131
203
|
|
|
132
204
|
- Real-time safety zone rendering
|
|
133
205
|
- Visual collision boundaries
|
|
134
206
|
|
|
135
|
-
**
|
|
207
|
+
**CollisionSceneRenderer** - The colliders of a collision setup
|
|
208
|
+
|
|
209
|
+
**TrajectoryRenderer** - Motion path visualization
|
|
136
210
|
|
|
137
211
|
- Real-time trajectory display
|
|
138
212
|
- Path planning visualization
|
|
139
213
|
|
|
214
|
+
**JointLimitGizmo** - The joint axes of a robot and their position ranges (the joint limits)
|
|
215
|
+
|
|
216
|
+
**PresetEnvironment** - Lights and an environment for the 3D scene
|
|
217
|
+
|
|
140
218
|
### Safety & Monitoring
|
|
141
219
|
|
|
142
220
|
Safety components for production environments.
|
|
143
221
|
|
|
144
|
-
**
|
|
222
|
+
**SafetyBar** - Centralized safety status
|
|
145
223
|
|
|
146
224
|
- Real-time safety monitoring
|
|
147
225
|
- Emergency stop integration
|
|
148
226
|
|
|
149
|
-
###
|
|
150
|
-
|
|
151
|
-
UI components for data display and user interaction.
|
|
152
|
-
|
|
153
|
-
**Data Components**
|
|
227
|
+
### App Frame
|
|
154
228
|
|
|
155
|
-
- **
|
|
156
|
-
- **
|
|
157
|
-
- **
|
|
229
|
+
- **AppHeader** - Application header with an app menu
|
|
230
|
+
- **LoadingCover** (and **LoadingErrorMessage**) - A loading screen, with the error when the loading fails
|
|
231
|
+
- **NoMotionGroupModal** - A modal for a cell without a motion group
|
|
158
232
|
|
|
159
|
-
|
|
233
|
+
### Logic
|
|
160
234
|
|
|
161
|
-
- **
|
|
162
|
-
- **
|
|
163
|
-
- **
|
|
164
|
-
|
|
165
|
-
**
|
|
166
|
-
|
|
167
|
-
- **[AppHeader](https://wandelbotsgmbh.github.io/wandelbots-js-react-components/?path=/docs/navigation-appheader--docs)** - Application header with branding
|
|
168
|
-
- **[TabBar](https://wandelbotsgmbh.github.io/wandelbots-js-react-components/?path=/docs/navigation-tabbar--docs)** - Multi-section navigation
|
|
169
|
-
|
|
170
|
-
### Theming & Styling
|
|
171
|
-
|
|
172
|
-
Styling system for consistent robotics applications.
|
|
173
|
-
|
|
174
|
-
**[Theming components](https://wandelbotsgmbh.github.io/wandelbots-js-react-components/?path=/docs/theming-theming-components--docs)** - Interactive theming examples
|
|
175
|
-
|
|
176
|
-
- Component theming demonstrations
|
|
177
|
-
- Customization patterns
|
|
178
|
-
|
|
179
|
-
**[Wandelbots MUI Theme](https://wandelbotsgmbh.github.io/wandelbots-js-react-components/?path=/docs/theming-wandelbots-mui-theme--docs)** - Material-UI theme
|
|
180
|
-
|
|
181
|
-
- Dark/light mode support
|
|
182
|
-
- Robotics-specific color schemes
|
|
183
|
-
- Material Design integration
|
|
235
|
+
- **ConnectedMotionGroup** - A motion group with its live motion state, safety state and operation mode
|
|
236
|
+
- **MotionStreamConnection** and **JoggerConnection** - The motion state stream and the jogging connection of a motion group
|
|
237
|
+
- **jointValuesEqual**, **poseEqual**, **tcpMotionEqual**, **unwrapRotationVector** - Helpers for the motion state
|
|
238
|
+
- **ValueInterpolator**, **useInterpolation**, **useSmoothedMotionState** - Smooth joint values for the 3D view
|
|
239
|
+
- **i18n** - The translations of the library
|
|
184
240
|
|
|
185
241
|
## Architecture & Integration
|
|
186
242
|
|
|
187
|
-
###
|
|
243
|
+
### Connecting to NOVA
|
|
188
244
|
|
|
189
245
|
Components integrate with the Wandelbots Nova ecosystem:
|
|
190
246
|
|
|
191
|
-
- **
|
|
247
|
+
- **NovaConnection** - Where the library connects to NOVA (`nova` of `JoggingPanel`, `ConnectedMotionGroup.connect`, `MotionStreamConnection.open`, `JoggerConnection.open`, `defaultGetModel`), it takes a `NovaConnection`: the URL of the instance, or the NOVA client of the app (`Nova` of `@wandelbots/nova-js`, of any version). The library reads only the URL and the access token of the client, and connects with its own client (nova-js 4.13.0). So the app configures the connection in one place.
|
|
192
248
|
- **Real-time Updates** - WebSocket connections for live robot state updates
|
|
193
249
|
- **Motion Group Management** - Direct integration with `ConnectedMotionGroup` objects
|
|
194
250
|
- **State Synchronization** - Automatic state management with MobX reactivity
|
|
@@ -196,30 +252,11 @@ Components integrate with the Wandelbots Nova ecosystem:
|
|
|
196
252
|
### Technical Foundation
|
|
197
253
|
|
|
198
254
|
- **TypeScript** - Full type safety and enhanced developer experience
|
|
199
|
-
- **
|
|
255
|
+
- **MUI 7 and the Nova Design System** - The theme of the app, from `@wandelbots/mui`
|
|
200
256
|
- **React Three Fiber** - High-performance 3D rendering for robotics visualization
|
|
201
257
|
- **MobX** - Reactive state management for real-time updates
|
|
202
258
|
- **i18next** - Internationalization support for global deployment
|
|
203
259
|
|
|
204
|
-
## Installation & Setup
|
|
205
|
-
|
|
206
|
-
### Prerequisites
|
|
207
|
-
|
|
208
|
-
**Required for all entry points:**
|
|
209
|
-
|
|
210
|
-
- React 18+ or 19+
|
|
211
|
-
- Material-UI v6 or v7
|
|
212
|
-
- @emotion/react and @emotion/styled
|
|
213
|
-
|
|
214
|
-
### Additional Peer Dependencies
|
|
215
|
-
|
|
216
|
-
**For `/3d` (3D visualization components):**
|
|
217
|
-
|
|
218
|
-
- three
|
|
219
|
-
- @react-three/fiber
|
|
220
|
-
- @react-three/drei
|
|
221
|
-
- three-stdlib
|
|
222
|
-
|
|
223
260
|
## Development
|
|
224
261
|
|
|
225
262
|
To set up the project for development:
|
|
@@ -228,22 +265,16 @@ To set up the project for development:
|
|
|
228
265
|
git clone https://github.com/wandelbotsgmbh/wandelbots-js-react-components.git
|
|
229
266
|
cd wandelbots-js-react-components
|
|
230
267
|
pnpm install
|
|
231
|
-
pnpm dev # Start Storybook development server
|
|
232
268
|
```
|
|
233
269
|
|
|
234
|
-
|
|
270
|
+
### A NOVA instance
|
|
235
271
|
|
|
236
|
-
|
|
272
|
+
The playground and the e2e tests need a real NOVA instance. They read it from:
|
|
237
273
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
cd wandelbots-js-react-components
|
|
241
|
-
pnpm install
|
|
242
|
-
pnpm td <instanceProviderURL> # instanceProviderURL can be provided via an instanceProviderConfig.json file. The entire command can be substituted by writing a nova instance ip into a file named .env.local
|
|
243
|
-
pnpm dev # Start Storybook development server
|
|
244
|
-
```
|
|
274
|
+
- `NOVA_INSTANCE_URL`, and `NOVA_ACCESS_TOKEN` for a cloud instance, or
|
|
275
|
+
- `WANDELAPI_BASE_URL` in `.env.local`.
|
|
245
276
|
|
|
246
|
-
instanceProviderConfig.json file:
|
|
277
|
+
`pnpm td <instanceProviderURL>` reserves a test instance for 12 hours and writes it into `.env.local`. Its cell `cell` gets a virtual UR5e. The instance provider URL can also come from an `instanceProviderConfig.json` file:
|
|
247
278
|
|
|
248
279
|
```
|
|
249
280
|
{
|
|
@@ -255,9 +286,60 @@ instanceProviderConfig.json file:
|
|
|
255
286
|
|
|
256
287
|
```
|
|
257
288
|
WANDELAPI_BASE_URL=http://<instance-ip>
|
|
258
|
-
CELL_ID=cell
|
|
259
289
|
```
|
|
260
290
|
|
|
291
|
+
### Playground
|
|
292
|
+
|
|
293
|
+
The playground (`playground/`) is a small Vite app that shows the parts of the library on a NOVA instance. It has no mock data. It imports the library from `src/`, so a change shows at once. It is not part of the npm package.
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
pnpm playground # dev server on http://localhost:5180
|
|
297
|
+
pnpm playground:build # builds playground/dist
|
|
298
|
+
pnpm playground:preview # serves playground/dist on http://localhost:4180
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
Vite reads these values when it starts (see [A NOVA instance](#a-nova-instance)). `CELL_ID` in the environment selects the cell (default `cell`). The cell needs a robot: without a motion group, the playground shows `NoMotionGroupModal`.
|
|
302
|
+
|
|
303
|
+
The pages are Jogging, Joint limits, Safety and collisions, Robot models and Building blocks. Each page combines parts that work together. The app menu of the `AppHeader` switches the pages, and the URL selects the page and the motion group, for example `?page=jogging&motionGroup=0@ur5e`. The dev server uses React StrictMode, so a part that leaves a connection open shows up.
|
|
304
|
+
|
|
305
|
+
The built playground contains the URL and the access token of the instance: never publish or upload `playground/dist`.
|
|
306
|
+
|
|
307
|
+
### Tests
|
|
308
|
+
|
|
309
|
+
```bash
|
|
310
|
+
pnpm test:unit # unit tests in src/ (vitest, jsdom), in watch mode
|
|
311
|
+
pnpm test:unit:run # the same, one run (the check "test" of each pull request)
|
|
312
|
+
pnpm test:consumer # builds the package and imports it as an app does
|
|
313
|
+
pnpm test:e2e # against a NOVA instance, see "e2e Tests"
|
|
314
|
+
pnpm test:playground # against a NOVA instance, see "e2e Tests"
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
`pnpm api:check` compares the public API with the reports in `etc/api-extractor/`. After an intended change of the public API, `pnpm api:update` writes the reports again; commit them with the change.
|
|
318
|
+
|
|
319
|
+
### e2e Tests
|
|
320
|
+
|
|
321
|
+
The e2e tests run against a real NOVA instance. There are two kinds:
|
|
322
|
+
|
|
323
|
+
- The vitest tests in `e2e/` test the NOVA connections of the library (motion state, jogging), without a browser.
|
|
324
|
+
- The Playwright tests in `e2e/playground/` test the playground app in Chromium. First they add a virtual robot with 2 safety zones and a stored collision setup to the cell. Then they open each page of the playground, jog the robot, check the values, the 3D view and the safety bar, and take screenshots. At the end, they remove the robot and the collision setup again.
|
|
325
|
+
|
|
326
|
+
Both kinds use the same instance values:
|
|
327
|
+
|
|
328
|
+
- `NOVA_INSTANCE_URL`, and `NOVA_ACCESS_TOKEN` for a cloud instance, or
|
|
329
|
+
- `WANDELAPI_BASE_URL` in `.env.local`, which `pnpm td` writes for a test instance (see above).
|
|
330
|
+
|
|
331
|
+
Without an instance, the tests fail. To run them on your computer:
|
|
332
|
+
|
|
333
|
+
```bash
|
|
334
|
+
pnpm exec playwright install chromium # once, for the Playwright tests
|
|
335
|
+
pnpm run test:e2e # vitest
|
|
336
|
+
pnpm run test:playground # builds the playground, then runs Playwright
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
The built playground (`playground/dist`) contains the URL and the access token of the instance, so `test:playground` builds it again each time. Never publish or upload it. The browser calls the instance through the server of the playground, which forwards `/api` to the instance, so a cloud instance works too (it does not allow requests from another origin). The results and the screenshots of the Playwright tests are in `e2e-results/`.
|
|
340
|
+
|
|
341
|
+
For each pull request, the workflow `e2e` creates a NOVA cloud instance with the newest released NOVA version, runs both kinds of tests, and deletes the instance again. The results are in the artifact `e2e-results` of the run: the output and the reports of the tests, the screenshots of the playground (`screenshots/`), and the state of the instance after the tests. The summary of the job lists the tests and the screenshots.
|
|
342
|
+
|
|
261
343
|
### Local Testing
|
|
262
344
|
|
|
263
345
|
Build and test the package locally:
|
|
@@ -272,7 +354,7 @@ pnpm add /path/to/wandelbots-wandelbots-js-react-components-x.x.x.tgz
|
|
|
272
354
|
|
|
273
355
|
## Contributing
|
|
274
356
|
|
|
275
|
-
We welcome contributions! Please see our contributing guidelines and feel free to submit issues and pull requests.
|
|
357
|
+
We welcome contributions! Please see our contributing guidelines and feel free to submit issues and pull requests. The checks before a pull request and the rules for commit messages are in [AGENTS.md](AGENTS.md).
|
|
276
358
|
|
|
277
359
|
## License
|
|
278
360
|
|
|
@@ -280,4 +362,4 @@ This project is licensed under the terms specified in the LICENSE file.
|
|
|
280
362
|
|
|
281
363
|
---
|
|
282
364
|
|
|
283
|
-
[
|
|
365
|
+
[Visit Wandelbots.com](https://www.wandelbots.com/)
|
package/dist/3d.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/Robot-VZaqKPxi.cjs"),o=require("./chunks/useSmoothedMotionState-CdhkBCqt.cjs");exports.CollisionSceneRenderer=e.CollisionSceneRenderer;exports.JoggingGizmo=e.JoggingGizmo;exports.JoggingGizmoOrientation=e.JoggingGizmoOrientation;exports.JointLimitGizmo=e.JointLimitGizmo;exports.LinearAxis=e.LinearAxis;exports.MotionGroupVisualizer=e.MotionGroupVisualizer;exports.MotionGroupVisualizerExact=e.MotionGroupVisualizerExact;exports.PresetEnvironment=e.PresetEnvironment;exports.Robot=e.Robot;exports.SafetyZonesRenderer=e.SafetyZonesRenderer;exports.SupportedLinearAxis=e.SupportedLinearAxis;exports.SupportedLinearAxisExact=e.SupportedLinearAxisExact;exports.SupportedRobot=e.SupportedRobot;exports.SupportedRobotExact=e.SupportedRobotExact;exports.TrajectoryRenderer=e.TrajectoryRenderer;exports.defaultGetModel=e.defaultGetModel;exports.ValueInterpolator=o.ValueInterpolator;exports.useSmoothedMotionState=o.useSmoothedMotionState;
|
package/dist/3d.d.ts
CHANGED
|
@@ -3,10 +3,10 @@ export { JointLimitGizmo, type GizmoChainOffset, type GizmoDhParameter, type Giz
|
|
|
3
3
|
export * from "./components/3d-viewport/PresetEnvironment";
|
|
4
4
|
export * from "./components/3d-viewport/SafetyZonesRenderer";
|
|
5
5
|
export * from "./components/3d-viewport/TrajectoryRenderer";
|
|
6
|
-
export
|
|
7
|
-
export
|
|
6
|
+
export { JoggingGizmo, type JoggingGizmoProps, } from "./components/jogging/gizmo/JoggingGizmo";
|
|
7
|
+
export { JoggingGizmoOrientation, type JoggingGizmoOrientationProps, } from "./components/jogging/gizmo/JoggingGizmoOrientation";
|
|
8
|
+
export type { JogAxis, JogDirection, JogHandle, } from "./components/jogging/jogHandle";
|
|
8
9
|
export * from "./components/robots/LinearAxis";
|
|
9
|
-
export { extractManufacturer, getDefaultHomeConfig, MANUFACTURER_HOME_CONFIGS, } from "./components/robots/manufacturerHomePositions";
|
|
10
10
|
export * from "./components/robots/MotionGroupVisualizer";
|
|
11
11
|
export * from "./components/robots/Robot";
|
|
12
12
|
export { defaultGetModel } from "./components/robots/robotModelLogic";
|
package/dist/3d.js
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { V as
|
|
1
|
+
import { C as a, J as t, a as r, b as s, L as i, M as n, c as p, P as d, R as u, S, d as l, e as m, f as x, g, T as R, h as c } from "./chunks/Robot-CvviE5MR.js";
|
|
2
|
+
import { V as f, a as z } from "./chunks/useSmoothedMotionState-BidFV3kQ.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
t as
|
|
6
|
-
r as
|
|
7
|
-
s as
|
|
8
|
-
i as
|
|
9
|
-
n as
|
|
10
|
-
|
|
11
|
-
d as
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
a as CollisionSceneRenderer,
|
|
5
|
+
t as JoggingGizmo,
|
|
6
|
+
r as JoggingGizmoOrientation,
|
|
7
|
+
s as JointLimitGizmo,
|
|
8
|
+
i as LinearAxis,
|
|
9
|
+
n as MotionGroupVisualizer,
|
|
10
|
+
p as MotionGroupVisualizerExact,
|
|
11
|
+
d as PresetEnvironment,
|
|
12
|
+
u as Robot,
|
|
13
|
+
S as SafetyZonesRenderer,
|
|
14
14
|
l as SupportedLinearAxis,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
C as extractManufacturer,
|
|
23
|
-
A as getDefaultHomeConfig,
|
|
24
|
-
g as useSmoothedMotionState
|
|
15
|
+
m as SupportedLinearAxisExact,
|
|
16
|
+
x as SupportedRobot,
|
|
17
|
+
g as SupportedRobotExact,
|
|
18
|
+
R as TrajectoryRenderer,
|
|
19
|
+
f as ValueInterpolator,
|
|
20
|
+
c as defaultGetModel,
|
|
21
|
+
z as useSmoothedMotionState
|
|
25
22
|
};
|
package/dist/SafetyBar/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/SafetyBar-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/SafetyBar-D7QT6J0m.cjs");exports.SafetyBar=e.SafetyBar;exports.default=e.SafetyBar;
|
package/dist/SafetyBar/index.js
CHANGED