@wandelbots/wandelbots-js-react-components 6.3.0 → 6.4.0-pr.chore-playground-tool-steps.664.4537d63
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 +323 -120
- package/dist/3d.cjs +1 -1
- package/dist/3d.d.ts +5 -3
- package/dist/3d.js +24 -23
- package/dist/CurrentPoseBar/index.cjs +1 -0
- package/dist/CurrentPoseBar/index.d.ts +2 -0
- package/dist/CurrentPoseBar/index.js +5 -0
- package/dist/JoggingButtons/index.cjs +1 -0
- package/dist/JoggingButtons/index.d.ts +3 -0
- package/dist/JoggingButtons/index.js +5 -0
- package/dist/JoggingGizmo/index.cjs +1 -0
- package/dist/JoggingGizmo/index.d.ts +4 -0
- package/dist/JoggingGizmo/index.js +7 -0
- package/dist/JoggingJointSlider/index.cjs +1 -0
- package/dist/JoggingJointSlider/index.d.ts +2 -0
- package/dist/JoggingJointSlider/index.js +5 -0
- package/dist/RobotControlPanel/index.cjs +1 -0
- package/dist/RobotControlPanel/index.d.ts +2 -0
- package/dist/RobotControlPanel/index.js +5 -0
- package/dist/RobotHeader/index.cjs +1 -0
- package/dist/RobotHeader/index.d.ts +4 -0
- package/dist/RobotHeader/index.js +5 -0
- package/dist/SafetyBar/index.cjs +1 -1
- package/dist/SafetyBar/index.js +1 -1
- package/dist/chunks/CurrentPoseBar-CyHUWmjM.cjs +1 -0
- package/dist/chunks/CurrentPoseBar-zTZi68tY.js +505 -0
- package/dist/chunks/JoggingButtons-CXaozFVz.js +108 -0
- package/dist/chunks/JoggingButtons-CbL-5LMK.cjs +1 -0
- package/dist/chunks/JoggingGizmo-DGbFLWgT.cjs +1 -0
- package/dist/chunks/JoggingGizmo-SuS9MmL7.js +810 -0
- package/dist/chunks/JoggingGizmoOrientation-dzned4f4.cjs +1 -0
- package/dist/chunks/JoggingGizmoOrientation-x_crT_64.js +14 -0
- package/dist/chunks/JoggingJointSlider-CZ-k6XCa.js +406 -0
- package/dist/chunks/JoggingJointSlider-R3_A9Ppj.cjs +1 -0
- package/dist/chunks/Robot-D0ZqUCn3.cjs +1 -0
- package/dist/chunks/Robot-UoykZeYH.js +1272 -0
- package/dist/chunks/RobotControlPanel-BnMfmO41.js +822 -0
- package/dist/chunks/RobotControlPanel-BuDGcxPR.cjs +1 -0
- package/dist/chunks/RobotHeader-BZci9ahT.js +244 -0
- package/dist/chunks/RobotHeader-CqK0700U.cjs +1 -0
- package/dist/chunks/SafetyBar-Bbg-o8h9.cjs +1 -0
- package/dist/chunks/{SafetyBar-Cy9DiXp9.js → SafetyBar-Cuak4ffd.js} +11 -10
- package/dist/chunks/SmallSelect-BdD9uLKK.js +52 -0
- package/dist/chunks/SmallSelect-Dcsd7_6_.cjs +1 -0
- package/dist/chunks/TrajectoryExecutionStore-DPqfDcfn.js +3398 -0
- package/dist/chunks/TrajectoryExecutionStore-DV6mLEx9.cjs +3 -0
- package/dist/chunks/converters-C8I_A_tA.cjs +1 -0
- package/dist/chunks/converters-DpNB_WNQ.js +39 -0
- package/dist/chunks/externalizeComponent-BdxGBLIv.cjs +2 -0
- package/dist/chunks/externalizeComponent-_w2d1_pz.js +283 -0
- package/dist/chunks/holdSafety-BtoZ5We3.cjs +1 -0
- package/dist/chunks/holdSafety-Di1GZAWg.js +37 -0
- package/dist/chunks/joggingColors-CuT5u0H8.js +135 -0
- package/dist/chunks/joggingColors-ZDc_2UCp.cjs +1 -0
- package/dist/chunks/useEveryFrame-G_-ma1nC.js +142 -0
- package/dist/chunks/useEveryFrame-dmPPTKtT.cjs +1 -0
- package/dist/chunks/useSmoothedMotionState-COMJRcOt.js +214 -0
- package/dist/chunks/useSmoothedMotionState-Con0E5Bx.cjs +1 -0
- package/dist/components/AppHeader.d.ts +1 -1
- package/dist/components/currentPoseBar/CurrentPoseBar.d.ts +48 -0
- package/dist/components/currentPoseBar/OrientationFormatPopover.d.ts +19 -0
- package/dist/components/currentPoseBar/StreamStatus.d.ts +10 -0
- package/dist/components/currentPoseBar/orientation.d.ts +34 -0
- package/dist/components/currentPoseBar/poseValues.d.ts +15 -0
- package/dist/components/jogging/JoggingButtons.d.ts +16 -0
- 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 +96 -19
- package/dist/components/jogging/gizmo/JoggingGizmo.d.ts +43 -0
- package/dist/components/jogging/gizmo/JoggingGizmoOrientation.d.ts +26 -0
- package/dist/components/jogging/gizmo/RotationHandles.d.ts +7 -0
- package/dist/components/jogging/gizmo/RotationScene.d.ts +6 -0
- package/dist/components/jogging/gizmo/TranslationHandles.d.ts +6 -0
- package/dist/components/jogging/gizmo/TranslationScene.d.ts +6 -0
- package/dist/components/jogging/gizmo/arcGrabAreas.d.ts +58 -0
- package/dist/components/jogging/gizmo/arcs.d.ts +54 -0
- package/dist/components/jogging/gizmo/arrows.d.ts +63 -0
- package/dist/components/jogging/gizmo/gizmoShared.d.ts +125 -0
- package/dist/components/jogging/gizmo/gizmoView.d.ts +42 -0
- package/dist/components/jogging/gizmo/useGizmoTurn.d.ts +11 -0
- package/dist/components/jogging/holdSafety.d.ts +44 -0
- package/dist/components/jogging/jogError.d.ts +9 -0
- package/dist/components/jogging/jogHandle.d.ts +23 -0
- package/dist/components/jogging/joggingColors.d.ts +24 -0
- package/dist/components/jogging/joggingVelocity.d.ts +21 -0
- package/dist/components/jogging/joint/JoggingJointSlider.d.ts +52 -0
- package/dist/components/jogging/joint/JointSliderTrack.d.ts +27 -0
- package/dist/components/jogging/joint/jointJog.d.ts +55 -0
- package/dist/components/jogging/joint/useJointJogHold.d.ts +48 -0
- package/dist/components/jogging/useHold.d.ts +38 -0
- package/dist/components/jogging/useJogControls.d.ts +45 -0
- package/dist/components/robotControl/CartesianJogTab.d.ts +21 -0
- package/dist/components/robotControl/HoldToMoveButton.d.ts +25 -0
- package/dist/components/robotControl/JogArea.d.ts +22 -0
- package/dist/components/robotControl/JogModeToggle.d.ts +8 -0
- package/dist/components/robotControl/JointJogTab.d.ts +11 -0
- package/dist/components/robotControl/MoveToTab.d.ts +18 -0
- package/dist/components/robotControl/PanelSelect.d.ts +13 -0
- package/dist/components/robotControl/PoseField.d.ts +21 -0
- package/dist/components/robotControl/RobotControlPanel.d.ts +212 -0
- package/dist/components/robotControl/Section.d.ts +5 -0
- package/dist/components/robotControl/SmallSelect.d.ts +15 -0
- package/dist/components/robotControl/VelocityRow.d.ts +14 -0
- package/dist/components/robotControl/atPose.d.ts +8 -0
- package/dist/components/robotControl/poseText.d.ts +15 -0
- package/dist/components/robotControl/units.d.ts +16 -0
- package/dist/components/robotControl/useCopyText.d.ts +12 -0
- package/dist/components/robotControl/useEveryFrame.d.ts +6 -0
- package/dist/components/robotHeader/ActivationSwitch.d.ts +7 -0
- package/dist/components/robotHeader/AppNavigation.d.ts +15 -0
- package/dist/components/robotHeader/RobotHeader.d.ts +42 -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 +13 -18
- package/dist/core.js +37 -51
- package/dist/index.cjs +1 -1
- package/dist/index.js +58 -71
- package/dist/lib/ConnectedMotionGroup.d.ts +5 -7
- package/dist/lib/JoggerConnection.d.ts +137 -27
- package/dist/lib/MotionStreamConnection.d.ts +15 -6
- package/dist/lib/Pose3.d.ts +22 -0
- package/dist/lib/PoseTransformer.d.ts +25 -0
- package/dist/lib/TrajectoryExecutionStore.d.ts +129 -0
- package/dist/lib/connectionLogger.d.ts +9 -0
- package/dist/lib/incrementalCartesianMotion.d.ts +40 -0
- package/dist/lib/motionStateUpdate.d.ts +27 -0
- package/dist/lib/novaConnection.d.ts +23 -0
- package/dist/lib/planErrorTranslation.d.ts +8 -0
- package/dist/lib/rotation.d.ts +12 -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/SafetyBar-DPrv_OQA.cjs +0 -1
- package/dist/chunks/externalizeComponent-EDymnaGR.js +0 -268
- 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,82 @@ 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
|
|
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).
|
|
72
|
+
- **`/JoggingGizmo`** — Only `JoggingGizmo` (also as the default export) and `JoggingGizmoOrientation`. Requires in addition three and @react-three/fiber.
|
|
73
|
+
- **`/JoggingButtons`** — Only `JoggingButtons` (also as the default export). No 3D packages needed.
|
|
74
|
+
- **`/JoggingJointSlider`** — Only `JoggingJointSlider` (also as the default export). No 3D packages needed.
|
|
75
|
+
- **`/RobotControlPanel`** — The whole Robot control panel, `RobotControlPanel` (also as the default export). It shows the jog gizmo, so it requires in addition three and @react-three/fiber, as `/JoggingGizmo` does.
|
|
76
|
+
|
|
77
|
+
A component's own entry point brings only what that component needs, e.g. `/JoggingButtons` no three.js and no NOVA client, unlike `/core`. The entry points share their common code, so an app that imports a component from both `/core` and its own entry point gets one copy of it:
|
|
78
|
+
|
|
79
|
+
```tsx
|
|
80
|
+
import JoggingJointSlider from "@wandelbots/wandelbots-js-react-components/JoggingJointSlider"
|
|
52
81
|
```
|
|
53
82
|
|
|
54
|
-
|
|
83
|
+
### Peer dependencies
|
|
84
|
+
|
|
85
|
+
| Package | Version |
|
|
86
|
+
| --- | --- |
|
|
87
|
+
| `react`, `react-dom` | ^19 |
|
|
88
|
+
| `@mui/material`, `@mui/icons-material` | ^7 |
|
|
89
|
+
| `@emotion/react`, `@emotion/styled` | ^11 |
|
|
90
|
+
| `@wandelbots/mui` | ^2 |
|
|
91
|
+
| `mobx` | ^6.13.6 |
|
|
92
|
+
| `mobx-react-lite` | ^4.1.0 |
|
|
93
|
+
| `three` (only `/3d`, `/JoggingGizmo`, `/RobotControlPanel`) | >=0.182 |
|
|
94
|
+
| `three-stdlib` (only `/3d`) | >=2 |
|
|
95
|
+
| `@react-three/fiber` (only `/3d`, `/JoggingGizmo`, `/RobotControlPanel`) | ^9 |
|
|
96
|
+
| `@react-three/drei` (only `/3d`) | ^10 |
|
|
55
97
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
-
|
|
98
|
+
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.
|
|
99
|
+
|
|
100
|
+
`@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
101
|
|
|
60
102
|
## Migration & Breaking Changes
|
|
61
103
|
|
|
62
|
-
|
|
104
|
+
### From 6.x to 7.0.0
|
|
105
|
+
|
|
106
|
+
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
107
|
|
|
64
|
-
|
|
108
|
+
**Removed exports.** A removed component also takes its `…Props` type with it.
|
|
109
|
+
|
|
110
|
+
| Removed in 7.0.0 | Use instead |
|
|
111
|
+
| --- | --- |
|
|
112
|
+
| `createNovaTheme`, `createNovaMuiTheme` | `createNovaMuiTheme` of `@wandelbots/mui` (same name). The parts use the theme of the app. |
|
|
113
|
+
| 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. |
|
|
114
|
+
| `AdornedTextField` | `AdornedTextField` of `@wandelbots/mui` |
|
|
115
|
+
| `SelectableFab` | No replacement |
|
|
116
|
+
| `useAnimationFrame`, `useAutorun`, `useMounted`, `useReaction` | No replacement |
|
|
117
|
+
| `PoseCartesianValues`, `PoseJointValues` | No replacement in 7.0.0. Copy them from 6.3.0 until a 7.x version has a replacement. |
|
|
118
|
+
| `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 |
|
|
119
|
+
| `AxisConfig`, `defaultAxisConfig` | No replacement |
|
|
120
|
+
| `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. |
|
|
121
|
+
|
|
122
|
+
**Other changes:**
|
|
123
|
+
|
|
124
|
+
- **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.
|
|
125
|
+
- **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.
|
|
126
|
+
- **`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`.
|
|
127
|
+
- **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"]`.
|
|
128
|
+
- **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.
|
|
129
|
+
- **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.
|
|
130
|
+
- **Look:** `AppHeader` and `LoadingCover` use the styles of the design system, so they look a little different.
|
|
131
|
+
- **Release asset:** `no-draco-models.zip` is gone. The models come from the NOVA API (since 4.0.0).
|
|
132
|
+
|
|
133
|
+
### 4.x Core Changes
|
|
65
134
|
|
|
66
135
|
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
136
|
|
|
68
|
-
It is still possible to
|
|
137
|
+
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
138
|
|
|
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
|
|
139
|
+
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
140
|
|
|
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
|
|
141
|
+
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
142
|
|
|
74
143
|
Robot dh-parameters are now using a new format.
|
|
75
144
|
|
|
@@ -83,13 +152,17 @@ interface DHParameter {
|
|
|
83
152
|
}
|
|
84
153
|
```
|
|
85
154
|
|
|
155
|
+
### Other versions
|
|
156
|
+
|
|
157
|
+
Breaking changes for each major version are documented in the [GitHub Releases](https://github.com/wandelbotsgmbh/wandelbots-js-react-components/releases).
|
|
158
|
+
|
|
86
159
|
## Components
|
|
87
160
|
|
|
88
161
|
### Robot Control & Jogging
|
|
89
162
|
|
|
90
163
|
Manual robot control interfaces.
|
|
91
164
|
|
|
92
|
-
**
|
|
165
|
+
**JoggingPanel** - Complete jogging interface with cartesian and joint controls
|
|
93
166
|
|
|
94
167
|
- Dual-mode operation (Cartesian & Joint space)
|
|
95
168
|
- Real-time velocity control
|
|
@@ -97,98 +170,202 @@ Manual robot control interfaces.
|
|
|
97
170
|
|
|
98
171
|
**Individual Jogging Controls**
|
|
99
172
|
|
|
100
|
-
- **
|
|
101
|
-
- **
|
|
102
|
-
- **
|
|
103
|
-
|
|
104
|
-
|
|
173
|
+
- **JoggingCartesianAxisControl** - Single-axis cartesian movement
|
|
174
|
+
- **JoggingJointValueControl** - Individual joint controls
|
|
175
|
+
- **VelocitySlider** (and **VelocitySliderLabel**) - Speed adjustment interface
|
|
176
|
+
- **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.
|
|
177
|
+
|
|
178
|
+
**JoggingGizmo** and **JoggingGizmoOrientation** (from `/3d` or `/JoggingGizmo`) - 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.
|
|
179
|
+
|
|
180
|
+
- 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.
|
|
181
|
+
- `JoggingGizmoOrientation` goes anywhere in the scene. It follows the camera's up: in a scene that is Y up, like that of this library's robots, it translates NOVA's axes (Z up), so NOVA's Z is the scene's Y. In a scene that is Z up like NOVA's world, whose camera has Z up, it takes NOVA's axes as they are.
|
|
182
|
+
- `frameQuaternion` of `JoggingGizmo` is the frame the gizmo jogs along, in NOVA's coordinates: by default NOVA's world frame. The app gives it to the gizmo where it picks the frame, e.g. "Move along the axes of: Tool". Only the camera's view comes from the 3D scene. A frame that turns, such as the tool's, can be a function: the gizmo calls it every animation frame.
|
|
183
|
+
- `motion` is `"translate"` (arrows, the default) or `"rotate"`: a circle about each axis with an arc per direction, whose arrowhead shows the way it turns (`+` counterclockwise seen from the tip of the axis). The handles are named as the jog buttons: "Jog X+", or "Jog Rx+" when rotating. A jog that runs when `motion` changes stops.
|
|
184
|
+
- The gizmo moves nothing itself: `onJogStart(axis, direction)` and `onJogStop` leave that to the app, in the frame it jogs in. The app knows its `motion`, so it knows whether to move along the axis or turn about it.
|
|
185
|
+
- A press jogs along the arrow drawn where it lands. Where a press could not tell two handles apart, it jogs neither: an arrow that points (almost) at or away from the viewer, or the farther of two arrowheads drawn over each other. The keyboard reaches every handle by its name.
|
|
186
|
+
- When rotating, a press turns the way the arc drawn there points: an arc is grabbed anywhere along it, an arrowhead above everything else. Where two arcs cross, the one drawn nearer there takes the press. An axis seen (almost) edge on, whose arcs lie over each other, takes no press.
|
|
187
|
+
|
|
188
|
+
```tsx
|
|
189
|
+
const orientation = useRef<Quaternion | null>(null)
|
|
190
|
+
|
|
191
|
+
<Canvas>
|
|
192
|
+
{/* … the 3D view with the robot */}
|
|
193
|
+
<JoggingGizmoOrientation target={orientation} />
|
|
194
|
+
</Canvas>
|
|
195
|
+
|
|
196
|
+
<JoggingGizmo
|
|
197
|
+
orientation={orientation}
|
|
198
|
+
frameQuaternion={jogFrame} // optional: NOVA's world frame by default
|
|
199
|
+
motion={motion} // "translate" or "rotate"
|
|
200
|
+
onJogStart={(axis, direction) =>
|
|
201
|
+
motion === "rotate"
|
|
202
|
+
? startRotating(axis, direction)
|
|
203
|
+
: startJogging(axis, direction)
|
|
204
|
+
}
|
|
205
|
+
onJogStop={() => stopJogging()}
|
|
206
|
+
/>
|
|
207
|
+
```
|
|
105
208
|
|
|
106
|
-
|
|
209
|
+
**JoggingButtons** (from `/core` or `/JoggingButtons`) - Jogging by buttons: a row per axis with a minus and a plus button, held to jog (X-, X+; or Rx-, Rx+ when `motion` is `"rotate"`). It takes the same props as `JoggingGizmo` (`JogControlsProps`: `motion`, `onJogStart`, `onJogStop`, `activeHandle`, `disabled`), so an app wires both the same way and can offer both. Unlike the gizmo, the buttons do not turn with the 3D view: X+ is X+ of the jog frame, wherever the camera looks from. They draw nothing in 3D, so they need no `<Canvas>` and no `JoggingGizmoOrientation`.
|
|
210
|
+
|
|
211
|
+
```tsx
|
|
212
|
+
<JoggingButtons
|
|
213
|
+
motion={motion} // "translate" or "rotate"
|
|
214
|
+
onJogStart={(axis, direction) =>
|
|
215
|
+
motion === "rotate"
|
|
216
|
+
? startRotating(axis, direction)
|
|
217
|
+
: startJogging(axis, direction)
|
|
218
|
+
}
|
|
219
|
+
onJogStop={() => stopJogging()}
|
|
220
|
+
/>
|
|
221
|
+
```
|
|
107
222
|
|
|
108
|
-
**
|
|
223
|
+
**JoggingJointSlider** (from `/core` or `/JoggingJointSlider`) - One joint as a slider across its limits, with the thumb at the joint's value and the limits below; an app shows one per joint. Hover the track to see the goal under the pointer, and press there to jog the joint toward it: it stops when it gets there or when the slider is let go. While held, the goal follows the pointer, and the joint turns around when the goal passes it. An arrow key held on the focused slider jogs toward that limit.
|
|
224
|
+
|
|
225
|
+
- `value`, `min` and `max` are in NOVA's units: radians, or mm with `linear`. A revolute joint with one limit spans one turn from it, and without limits the turn it stands in. A linear axis needs both limits to be jogged with the slider; without them it only shows its value. `angleUnit` shows degrees (default) or radians.
|
|
226
|
+
- `onJogStart(direction)` and `onJogStop` leave the jogging to the app, as for `JoggingGizmo` and `JoggingButtons`. One press can bring several starts and stops, always in turn: the joint stops at the goal, and starts again when the goal moves on. When the goal passes the joint, `onJogStop` and the `onJogStart` of the other way come in the same event: an app with asynchronous jog commands must apply them in that order, and must not tear down its jogging connection on that stop.
|
|
227
|
+
- One joint at a time is up to the app. Keep the jogging joint in a ref, which changes at once, and ignore the others' calls: `disabled` alone changes only with the next render, too late for two fingers that move in the same frame.
|
|
228
|
+
|
|
229
|
+
```tsx
|
|
230
|
+
const jogging = useRef<number | null>(null)
|
|
231
|
+
const [active, setActive] = useState<number | null>(null)
|
|
232
|
+
|
|
233
|
+
{jointValues.map((value, index) => (
|
|
234
|
+
<JoggingJointSlider
|
|
235
|
+
key={index}
|
|
236
|
+
label={`J${index + 1}`}
|
|
237
|
+
value={value}
|
|
238
|
+
min={limits[index].lower_limit}
|
|
239
|
+
max={limits[index].upper_limit}
|
|
240
|
+
onJogStart={(direction) => {
|
|
241
|
+
if (jogging.current !== null && jogging.current !== index) return
|
|
242
|
+
jogging.current = index
|
|
243
|
+
setActive(index)
|
|
244
|
+
startJointJogging(index, direction)
|
|
245
|
+
}}
|
|
246
|
+
onJogStop={() => {
|
|
247
|
+
if (jogging.current !== index) return
|
|
248
|
+
jogging.current = null
|
|
249
|
+
setActive(null)
|
|
250
|
+
stopJogging()
|
|
251
|
+
}}
|
|
252
|
+
// Shows the others as unavailable; the ref does the excluding
|
|
253
|
+
disabled={active !== null && active !== index}
|
|
254
|
+
/>
|
|
255
|
+
))}
|
|
256
|
+
```
|
|
109
257
|
|
|
110
|
-
-
|
|
111
|
-
|
|
112
|
-
-
|
|
258
|
+
**RobotControlPanel** (from `/3d` or `/RobotControlPanel`) - The Robot control panel of the design, built from the parts above: the tabs Translate and Rotate, with the TCP and the frame to jog along, Continuous or Increment, the velocity, the step size, and the gizmo or the buttons with a switch between them; the tab Joint, with a `JoggingJointSlider` per joint and the joint velocity; and the tab Move to, with a typed target pose (or the current one), the frame it is relative to, and a button to hold to move there. An app that wants the whole panel imports this; an app that wants one part imports that part.
|
|
259
|
+
|
|
260
|
+
- It moves nothing itself, as its parts: `onJogStart(motion, axis, direction)` and `onJogStop` for jogging while held, and `increments.onStep(motion, axis, direction, distance)` for one step per press. The app keeps the velocity and the selects in its own store; the panel keeps the tab, the mode, the step size and the view.
|
|
261
|
+
- Velocities and step sizes are in NOVA's units: mm and mm/s to translate, rad and rad/s to rotate. The panel shows mm/s and °/s.
|
|
262
|
+
- `tcp` and `jogFrame` show a select each, filled by the app. Without `increments`, there is no Continuous/Increment toggle. Without `gizmoOrientation` (from a `JoggingGizmoOrientation` in the app's 3D scene), it jogs with buttons only.
|
|
263
|
+
- `onJogStop` also comes when the tab, the mode or the view changes while a control is held: the jog of that press must not go on.
|
|
264
|
+
- `disabled` turns off every control: nothing may move. `jogDisabled` turns off only the jogging of Translate, Rotate and Joint, e.g. while a trajectory moves the robot; Move to stays usable, so a move of its own does not end when the app locks jogging during it.
|
|
265
|
+
- The panel keeps its tab, jog mode and step size itself. An app that keeps them in its own store (to remember them, or because its jogging depends on them) gives `tab`, `jogMode` and `increments.step`, and gets `onTabChange`, `onJogModeChange` and `increments.onStepChange`; each also works alone, to follow a choice without keeping it.
|
|
266
|
+
- `joints` gives the Joint tab: the joints' values and limits (rad, or mm with `linear`), their names, the joint velocity, and `onJogStart(index, direction)` and `onJogStop`. The panel jogs one joint at a time; the turn-around of a slider brings `onJogStop` and `onJogStart` in the same event, as described for `JoggingJointSlider`. Without `joints`, there is no Joint tab.
|
|
267
|
+
- `moveTo` gives the Move to tab. It works as RobotPad's pose field: the coordinates `(x, y, z, rx, ry, rz)` (mm, rotation vector in rad: the format RobotPad copies and pastes) show the TCP's current pose (`getCurrentPose`, read every animation frame), with Copy and Edit pose, and Move to, off until a pose is the target. Edit pose, or a click on the field, makes it editable; Save pose edit (Enter) makes the typed pose the target (`onTargetChange(pose)`): the app plans the move and loads it, and reports `state` (`"planning"`, `"planned"`, `"moving"`, `"stopping"` or `"idle"`, as RobotPad's trajectory) and an `error` (e.g. out of reach). Then Reset shows. Held for 200 ms while `"planned"`, Move to calls `onMoveStart(pose)`, the release `onMoveStop`: the app starts and pauses its trajectory; the button says Moving… and Stopping…. At the target (within 0.5 mm and 0.01 rad) it turns off; once the move no longer runs, the field shows the current pose again (`onTargetChange(null)`), as do Reset, another tab and another TCP or frame (a held move gets its `onMoveStop` first). While another pose is typed, Move to stays off. `frame` is the "Relative to" select. It moves with `velocity.translate`. Without `moveTo`, there is no Move to tab.
|
|
268
|
+
|
|
269
|
+
```tsx
|
|
270
|
+
const orientation = useRef<Quaternion | null>(null)
|
|
271
|
+
|
|
272
|
+
<RobotControlPanel
|
|
273
|
+
gizmoOrientation={orientation}
|
|
274
|
+
tcp={{ options: tcps, value: tcp, onChange: setTcp }}
|
|
275
|
+
jogFrame={{ options: frames, value: frame, onChange: setFrame }}
|
|
276
|
+
velocity={{
|
|
277
|
+
translate: { value: mmPerSec, min: 1, max: 250 },
|
|
278
|
+
rotate: { value: radPerSec, min: 0.02, max: 1 },
|
|
279
|
+
}}
|
|
280
|
+
onVelocityChange={(motion, value) => setVelocity(motion, value)}
|
|
281
|
+
onJogStart={(motion, axis, direction) => startJogging(motion, axis, direction)}
|
|
282
|
+
onJogStop={() => stopJogging()}
|
|
283
|
+
increments={{
|
|
284
|
+
steps: { translate: [0.1, 1, 5, 10], rotate: [0.001, 0.01, 0.05] },
|
|
285
|
+
onStep: (motion, axis, direction, distance) =>
|
|
286
|
+
jogStep(motion, axis, direction, distance),
|
|
287
|
+
}}
|
|
288
|
+
joints={{
|
|
289
|
+
joints: jointValues.map((value, index) => ({
|
|
290
|
+
value,
|
|
291
|
+
min: limits[index].lower_limit,
|
|
292
|
+
max: limits[index].upper_limit,
|
|
293
|
+
})),
|
|
294
|
+
velocity: { value: jointRadPerSec, min: 0.02, max: 1 },
|
|
295
|
+
onVelocityChange: setJointVelocity,
|
|
296
|
+
onJogStart: (index, direction) => startJointJogging(index, direction),
|
|
297
|
+
onJogStop: () => stopJogging(),
|
|
298
|
+
}}
|
|
299
|
+
moveTo={{
|
|
300
|
+
getCurrentPose: () => currentTcpPose(),
|
|
301
|
+
onTargetChange: (pose) => planAndLoad(pose), // or drop the plan (null)
|
|
302
|
+
state: trajectoryState, // "planning" | "planned" | "moving" | "stopping" | "idle"
|
|
303
|
+
error,
|
|
304
|
+
onMoveStart: () => startTrajectory(),
|
|
305
|
+
onMoveStop: () => pauseTrajectory(),
|
|
306
|
+
}}
|
|
307
|
+
/>
|
|
308
|
+
```
|
|
113
309
|
|
|
114
|
-
|
|
310
|
+
### 3D Visualization & Robotics
|
|
115
311
|
|
|
116
|
-
|
|
117
|
-
- Error state visualization
|
|
312
|
+
3D components for robot visualization. They render inside the `<Canvas>` of React Three Fiber.
|
|
118
313
|
|
|
119
|
-
|
|
314
|
+
**Robot** - Real-time 3D robot rendering
|
|
120
315
|
|
|
121
|
-
|
|
316
|
+
- Live pose updates from a `ConnectedMotionGroup`
|
|
317
|
+
- The model of the motion group from the NOVA instance (`defaultGetModel`)
|
|
122
318
|
|
|
123
|
-
**
|
|
319
|
+
**LinearAxis** - The same for a linear axis
|
|
124
320
|
|
|
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
|
|
321
|
+
**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
322
|
|
|
130
|
-
**
|
|
323
|
+
**SafetyZonesRenderer** - 3D safety visualization
|
|
131
324
|
|
|
132
325
|
- Real-time safety zone rendering
|
|
133
326
|
- Visual collision boundaries
|
|
134
327
|
|
|
135
|
-
**
|
|
328
|
+
**CollisionSceneRenderer** - The colliders of a collision setup
|
|
329
|
+
|
|
330
|
+
**TrajectoryRenderer** - Motion path visualization
|
|
136
331
|
|
|
137
332
|
- Real-time trajectory display
|
|
138
333
|
- Path planning visualization
|
|
139
334
|
|
|
335
|
+
**JointLimitGizmo** - The joint axes of a robot and their position ranges (the joint limits)
|
|
336
|
+
|
|
337
|
+
**PresetEnvironment** - Lights and an environment for the 3D scene
|
|
338
|
+
|
|
140
339
|
### Safety & Monitoring
|
|
141
340
|
|
|
142
341
|
Safety components for production environments.
|
|
143
342
|
|
|
144
|
-
**
|
|
343
|
+
**SafetyBar** - Centralized safety status
|
|
145
344
|
|
|
146
345
|
- Real-time safety monitoring
|
|
147
346
|
- Emergency stop integration
|
|
148
347
|
|
|
149
|
-
###
|
|
348
|
+
### App Frame
|
|
150
349
|
|
|
151
|
-
|
|
350
|
+
- **AppHeader** - Application header with an app menu
|
|
351
|
+
- **LoadingCover** (and **LoadingErrorMessage**) - A loading screen, with the error when the loading fails
|
|
352
|
+
- **NoMotionGroupModal** - A modal for a cell without a motion group
|
|
152
353
|
|
|
153
|
-
|
|
354
|
+
### Logic
|
|
154
355
|
|
|
155
|
-
- **
|
|
156
|
-
- **
|
|
157
|
-
- **
|
|
158
|
-
|
|
159
|
-
**
|
|
160
|
-
|
|
161
|
-
- **[RobotCard](https://wandelbotsgmbh.github.io/wandelbots-js-react-components/?path=/docs/components-robotcard--docs)** - Robot overview cards with status
|
|
162
|
-
- **[RobotListItem](https://wandelbotsgmbh.github.io/wandelbots-js-react-components/?path=/docs/components-robotlistitem--docs)** - List view for multiple robots
|
|
163
|
-
- **[RobotSetupReadinessIndicator](https://wandelbotsgmbh.github.io/wandelbots-js-react-components/?path=/docs/components-robotsetupreadinessindicator--docs)** - Setup validation status
|
|
164
|
-
|
|
165
|
-
**Navigation**
|
|
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
|
|
356
|
+
- **ConnectedMotionGroup** - A motion group with its live motion state, safety state and operation mode
|
|
357
|
+
- **MotionStreamConnection** and **JoggerConnection** - The motion state stream and the jogging connection of a motion group
|
|
358
|
+
- **jointValuesEqual**, **poseEqual**, **tcpMotionEqual**, **unwrapRotationVector** - Helpers for the motion state
|
|
359
|
+
- **ValueInterpolator**, **useInterpolation**, **useSmoothedMotionState** - Smooth joint values for the 3D view
|
|
360
|
+
- **i18n** - The translations of the library
|
|
184
361
|
|
|
185
362
|
## Architecture & Integration
|
|
186
363
|
|
|
187
|
-
###
|
|
364
|
+
### Connecting to NOVA
|
|
188
365
|
|
|
189
366
|
Components integrate with the Wandelbots Nova ecosystem:
|
|
190
367
|
|
|
191
|
-
- **
|
|
368
|
+
- **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
369
|
- **Real-time Updates** - WebSocket connections for live robot state updates
|
|
193
370
|
- **Motion Group Management** - Direct integration with `ConnectedMotionGroup` objects
|
|
194
371
|
- **State Synchronization** - Automatic state management with MobX reactivity
|
|
@@ -196,30 +373,11 @@ Components integrate with the Wandelbots Nova ecosystem:
|
|
|
196
373
|
### Technical Foundation
|
|
197
374
|
|
|
198
375
|
- **TypeScript** - Full type safety and enhanced developer experience
|
|
199
|
-
- **
|
|
376
|
+
- **MUI 7 and the Nova Design System** - The theme of the app, from `@wandelbots/mui`
|
|
200
377
|
- **React Three Fiber** - High-performance 3D rendering for robotics visualization
|
|
201
378
|
- **MobX** - Reactive state management for real-time updates
|
|
202
379
|
- **i18next** - Internationalization support for global deployment
|
|
203
380
|
|
|
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
381
|
## Development
|
|
224
382
|
|
|
225
383
|
To set up the project for development:
|
|
@@ -228,22 +386,16 @@ To set up the project for development:
|
|
|
228
386
|
git clone https://github.com/wandelbotsgmbh/wandelbots-js-react-components.git
|
|
229
387
|
cd wandelbots-js-react-components
|
|
230
388
|
pnpm install
|
|
231
|
-
pnpm dev # Start Storybook development server
|
|
232
389
|
```
|
|
233
390
|
|
|
234
|
-
|
|
391
|
+
### A NOVA instance
|
|
235
392
|
|
|
236
|
-
|
|
393
|
+
The playground and the e2e tests need a real NOVA instance. They read it from:
|
|
237
394
|
|
|
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
|
-
```
|
|
395
|
+
- `NOVA_INSTANCE_URL`, and `NOVA_ACCESS_TOKEN` for a cloud instance, or
|
|
396
|
+
- `WANDELAPI_BASE_URL` in `.env.local`.
|
|
245
397
|
|
|
246
|
-
instanceProviderConfig.json file:
|
|
398
|
+
`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
399
|
|
|
248
400
|
```
|
|
249
401
|
{
|
|
@@ -255,9 +407,60 @@ instanceProviderConfig.json file:
|
|
|
255
407
|
|
|
256
408
|
```
|
|
257
409
|
WANDELAPI_BASE_URL=http://<instance-ip>
|
|
258
|
-
CELL_ID=cell
|
|
259
410
|
```
|
|
260
411
|
|
|
412
|
+
### Playground
|
|
413
|
+
|
|
414
|
+
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.
|
|
415
|
+
|
|
416
|
+
```bash
|
|
417
|
+
pnpm playground # dev server on http://localhost:5180
|
|
418
|
+
pnpm playground:build # builds playground/dist
|
|
419
|
+
pnpm playground:preview # serves playground/dist on http://localhost:4180
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
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`.
|
|
423
|
+
|
|
424
|
+
The pages are Jogging, Joint limits, Safety and collisions, Robot models, Layouts and Building blocks. Each page combines parts that work together. Layouts puts `RobotControlPanel` and `CurrentPoseBar` over the robot's 3D view as the Figma design does; Building blocks shows the smaller parts alone. 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.
|
|
425
|
+
|
|
426
|
+
The built playground contains the URL and the access token of the instance: never publish or upload `playground/dist`.
|
|
427
|
+
|
|
428
|
+
### Tests
|
|
429
|
+
|
|
430
|
+
```bash
|
|
431
|
+
pnpm test:unit # unit tests in src/ (vitest, jsdom), in watch mode
|
|
432
|
+
pnpm test:unit:run # the same, one run (the check "test" of each pull request)
|
|
433
|
+
pnpm test:consumer # builds the package and imports it as an app does
|
|
434
|
+
pnpm test:e2e # against a NOVA instance, see "e2e Tests"
|
|
435
|
+
pnpm test:playground # against a NOVA instance, see "e2e Tests"
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
`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.
|
|
439
|
+
|
|
440
|
+
### e2e Tests
|
|
441
|
+
|
|
442
|
+
The e2e tests run against a real NOVA instance. There are two kinds:
|
|
443
|
+
|
|
444
|
+
- The vitest tests in `e2e/` test the NOVA connections of the library (motion state, jogging), without a browser.
|
|
445
|
+
- 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.
|
|
446
|
+
|
|
447
|
+
Both kinds use the same instance values:
|
|
448
|
+
|
|
449
|
+
- `NOVA_INSTANCE_URL`, and `NOVA_ACCESS_TOKEN` for a cloud instance, or
|
|
450
|
+
- `WANDELAPI_BASE_URL` in `.env.local`, which `pnpm td` writes for a test instance (see above).
|
|
451
|
+
|
|
452
|
+
Without an instance, the tests fail. To run them on your computer:
|
|
453
|
+
|
|
454
|
+
```bash
|
|
455
|
+
pnpm exec playwright install chromium # once, for the Playwright tests
|
|
456
|
+
pnpm run test:e2e # vitest
|
|
457
|
+
pnpm run test:playground # builds the playground, then runs Playwright
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
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/`.
|
|
461
|
+
|
|
462
|
+
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.
|
|
463
|
+
|
|
261
464
|
### Local Testing
|
|
262
465
|
|
|
263
466
|
Build and test the package locally:
|
|
@@ -272,7 +475,7 @@ pnpm add /path/to/wandelbots-wandelbots-js-react-components-x.x.x.tgz
|
|
|
272
475
|
|
|
273
476
|
## Contributing
|
|
274
477
|
|
|
275
|
-
We welcome contributions! Please see our contributing guidelines and feel free to submit issues and pull requests.
|
|
478
|
+
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
479
|
|
|
277
480
|
## License
|
|
278
481
|
|
|
@@ -280,4 +483,4 @@ This project is licensed under the terms specified in the LICENSE file.
|
|
|
280
483
|
|
|
281
484
|
---
|
|
282
485
|
|
|
283
|
-
[
|
|
486
|
+
[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
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./chunks/Robot-D0ZqUCn3.cjs"),t=require("./chunks/JoggingGizmo-DGbFLWgT.cjs"),i=require("./chunks/JoggingGizmoOrientation-dzned4f4.cjs"),r=require("./chunks/RobotControlPanel-BuDGcxPR.cjs"),e=require("./chunks/useSmoothedMotionState-Con0E5Bx.cjs");exports.CollisionSceneRenderer=o.CollisionSceneRenderer;exports.JointLimitGizmo=o.JointLimitGizmo;exports.LinearAxis=o.LinearAxis;exports.MotionGroupVisualizer=o.MotionGroupVisualizer;exports.MotionGroupVisualizerExact=o.MotionGroupVisualizerExact;exports.PresetEnvironment=o.PresetEnvironment;exports.Robot=o.Robot;exports.SafetyZonesRenderer=o.SafetyZonesRenderer;exports.SupportedLinearAxis=o.SupportedLinearAxis;exports.SupportedLinearAxisExact=o.SupportedLinearAxisExact;exports.SupportedRobot=o.SupportedRobot;exports.SupportedRobotExact=o.SupportedRobotExact;exports.TrajectoryRenderer=o.TrajectoryRenderer;exports.defaultGetModel=o.defaultGetModel;exports.JoggingGizmo=t.JoggingGizmo;exports.JoggingGizmoOrientation=i.JoggingGizmoOrientation;exports.RobotControlPanel=r.RobotControlPanel;exports.ValueInterpolator=e.ValueInterpolator;exports.useSmoothedMotionState=e.useSmoothedMotionState;
|
package/dist/3d.d.ts
CHANGED
|
@@ -3,10 +3,12 @@ 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";
|
|
9
|
+
export type { JogControlsProps } from "./components/jogging/useJogControls";
|
|
10
|
+
export { type JogMotion, RobotControlPanel, type RobotControlIncrements, type RobotControlJogMode, type RobotControlJoint, type RobotControlJoints, type RobotControlMoveState, type RobotControlMoveTo, type RobotControlOption, type RobotControlPanelProps, type RobotControlPose, type RobotControlSelect, type RobotControlTab, type RobotControlVelocity, } from "./components/robotControl/RobotControlPanel";
|
|
8
11
|
export * from "./components/robots/LinearAxis";
|
|
9
|
-
export { extractManufacturer, getDefaultHomeConfig, MANUFACTURER_HOME_CONFIGS, } from "./components/robots/manufacturerHomePositions";
|
|
10
12
|
export * from "./components/robots/MotionGroupVisualizer";
|
|
11
13
|
export * from "./components/robots/Robot";
|
|
12
14
|
export { defaultGetModel } from "./components/robots/robotModelLogic";
|