@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.
Files changed (191) hide show
  1. package/README.md +323 -120
  2. package/dist/3d.cjs +1 -1
  3. package/dist/3d.d.ts +5 -3
  4. package/dist/3d.js +24 -23
  5. package/dist/CurrentPoseBar/index.cjs +1 -0
  6. package/dist/CurrentPoseBar/index.d.ts +2 -0
  7. package/dist/CurrentPoseBar/index.js +5 -0
  8. package/dist/JoggingButtons/index.cjs +1 -0
  9. package/dist/JoggingButtons/index.d.ts +3 -0
  10. package/dist/JoggingButtons/index.js +5 -0
  11. package/dist/JoggingGizmo/index.cjs +1 -0
  12. package/dist/JoggingGizmo/index.d.ts +4 -0
  13. package/dist/JoggingGizmo/index.js +7 -0
  14. package/dist/JoggingJointSlider/index.cjs +1 -0
  15. package/dist/JoggingJointSlider/index.d.ts +2 -0
  16. package/dist/JoggingJointSlider/index.js +5 -0
  17. package/dist/RobotControlPanel/index.cjs +1 -0
  18. package/dist/RobotControlPanel/index.d.ts +2 -0
  19. package/dist/RobotControlPanel/index.js +5 -0
  20. package/dist/RobotHeader/index.cjs +1 -0
  21. package/dist/RobotHeader/index.d.ts +4 -0
  22. package/dist/RobotHeader/index.js +5 -0
  23. package/dist/SafetyBar/index.cjs +1 -1
  24. package/dist/SafetyBar/index.js +1 -1
  25. package/dist/chunks/CurrentPoseBar-CyHUWmjM.cjs +1 -0
  26. package/dist/chunks/CurrentPoseBar-zTZi68tY.js +505 -0
  27. package/dist/chunks/JoggingButtons-CXaozFVz.js +108 -0
  28. package/dist/chunks/JoggingButtons-CbL-5LMK.cjs +1 -0
  29. package/dist/chunks/JoggingGizmo-DGbFLWgT.cjs +1 -0
  30. package/dist/chunks/JoggingGizmo-SuS9MmL7.js +810 -0
  31. package/dist/chunks/JoggingGizmoOrientation-dzned4f4.cjs +1 -0
  32. package/dist/chunks/JoggingGizmoOrientation-x_crT_64.js +14 -0
  33. package/dist/chunks/JoggingJointSlider-CZ-k6XCa.js +406 -0
  34. package/dist/chunks/JoggingJointSlider-R3_A9Ppj.cjs +1 -0
  35. package/dist/chunks/Robot-D0ZqUCn3.cjs +1 -0
  36. package/dist/chunks/Robot-UoykZeYH.js +1272 -0
  37. package/dist/chunks/RobotControlPanel-BnMfmO41.js +822 -0
  38. package/dist/chunks/RobotControlPanel-BuDGcxPR.cjs +1 -0
  39. package/dist/chunks/RobotHeader-BZci9ahT.js +244 -0
  40. package/dist/chunks/RobotHeader-CqK0700U.cjs +1 -0
  41. package/dist/chunks/SafetyBar-Bbg-o8h9.cjs +1 -0
  42. package/dist/chunks/{SafetyBar-Cy9DiXp9.js → SafetyBar-Cuak4ffd.js} +11 -10
  43. package/dist/chunks/SmallSelect-BdD9uLKK.js +52 -0
  44. package/dist/chunks/SmallSelect-Dcsd7_6_.cjs +1 -0
  45. package/dist/chunks/TrajectoryExecutionStore-DPqfDcfn.js +3398 -0
  46. package/dist/chunks/TrajectoryExecutionStore-DV6mLEx9.cjs +3 -0
  47. package/dist/chunks/converters-C8I_A_tA.cjs +1 -0
  48. package/dist/chunks/converters-DpNB_WNQ.js +39 -0
  49. package/dist/chunks/externalizeComponent-BdxGBLIv.cjs +2 -0
  50. package/dist/chunks/externalizeComponent-_w2d1_pz.js +283 -0
  51. package/dist/chunks/holdSafety-BtoZ5We3.cjs +1 -0
  52. package/dist/chunks/holdSafety-Di1GZAWg.js +37 -0
  53. package/dist/chunks/joggingColors-CuT5u0H8.js +135 -0
  54. package/dist/chunks/joggingColors-ZDc_2UCp.cjs +1 -0
  55. package/dist/chunks/useEveryFrame-G_-ma1nC.js +142 -0
  56. package/dist/chunks/useEveryFrame-dmPPTKtT.cjs +1 -0
  57. package/dist/chunks/useSmoothedMotionState-COMJRcOt.js +214 -0
  58. package/dist/chunks/useSmoothedMotionState-Con0E5Bx.cjs +1 -0
  59. package/dist/components/AppHeader.d.ts +1 -1
  60. package/dist/components/currentPoseBar/CurrentPoseBar.d.ts +48 -0
  61. package/dist/components/currentPoseBar/OrientationFormatPopover.d.ts +19 -0
  62. package/dist/components/currentPoseBar/StreamStatus.d.ts +10 -0
  63. package/dist/components/currentPoseBar/orientation.d.ts +34 -0
  64. package/dist/components/currentPoseBar/poseValues.d.ts +15 -0
  65. package/dist/components/jogging/JoggingButtons.d.ts +16 -0
  66. package/dist/components/jogging/JoggingCartesianAxisControl.d.ts +1 -1
  67. package/dist/components/jogging/JoggingJointTab.d.ts +1 -1
  68. package/dist/components/jogging/JoggingPanel.d.ts +6 -3
  69. package/dist/components/jogging/JoggingStore.d.ts +96 -19
  70. package/dist/components/jogging/gizmo/JoggingGizmo.d.ts +43 -0
  71. package/dist/components/jogging/gizmo/JoggingGizmoOrientation.d.ts +26 -0
  72. package/dist/components/jogging/gizmo/RotationHandles.d.ts +7 -0
  73. package/dist/components/jogging/gizmo/RotationScene.d.ts +6 -0
  74. package/dist/components/jogging/gizmo/TranslationHandles.d.ts +6 -0
  75. package/dist/components/jogging/gizmo/TranslationScene.d.ts +6 -0
  76. package/dist/components/jogging/gizmo/arcGrabAreas.d.ts +58 -0
  77. package/dist/components/jogging/gizmo/arcs.d.ts +54 -0
  78. package/dist/components/jogging/gizmo/arrows.d.ts +63 -0
  79. package/dist/components/jogging/gizmo/gizmoShared.d.ts +125 -0
  80. package/dist/components/jogging/gizmo/gizmoView.d.ts +42 -0
  81. package/dist/components/jogging/gizmo/useGizmoTurn.d.ts +11 -0
  82. package/dist/components/jogging/holdSafety.d.ts +44 -0
  83. package/dist/components/jogging/jogError.d.ts +9 -0
  84. package/dist/components/jogging/jogHandle.d.ts +23 -0
  85. package/dist/components/jogging/joggingColors.d.ts +24 -0
  86. package/dist/components/jogging/joggingVelocity.d.ts +21 -0
  87. package/dist/components/jogging/joint/JoggingJointSlider.d.ts +52 -0
  88. package/dist/components/jogging/joint/JointSliderTrack.d.ts +27 -0
  89. package/dist/components/jogging/joint/jointJog.d.ts +55 -0
  90. package/dist/components/jogging/joint/useJointJogHold.d.ts +48 -0
  91. package/dist/components/jogging/useHold.d.ts +38 -0
  92. package/dist/components/jogging/useJogControls.d.ts +45 -0
  93. package/dist/components/robotControl/CartesianJogTab.d.ts +21 -0
  94. package/dist/components/robotControl/HoldToMoveButton.d.ts +25 -0
  95. package/dist/components/robotControl/JogArea.d.ts +22 -0
  96. package/dist/components/robotControl/JogModeToggle.d.ts +8 -0
  97. package/dist/components/robotControl/JointJogTab.d.ts +11 -0
  98. package/dist/components/robotControl/MoveToTab.d.ts +18 -0
  99. package/dist/components/robotControl/PanelSelect.d.ts +13 -0
  100. package/dist/components/robotControl/PoseField.d.ts +21 -0
  101. package/dist/components/robotControl/RobotControlPanel.d.ts +212 -0
  102. package/dist/components/robotControl/Section.d.ts +5 -0
  103. package/dist/components/robotControl/SmallSelect.d.ts +15 -0
  104. package/dist/components/robotControl/VelocityRow.d.ts +14 -0
  105. package/dist/components/robotControl/atPose.d.ts +8 -0
  106. package/dist/components/robotControl/poseText.d.ts +15 -0
  107. package/dist/components/robotControl/units.d.ts +16 -0
  108. package/dist/components/robotControl/useCopyText.d.ts +12 -0
  109. package/dist/components/robotControl/useEveryFrame.d.ts +6 -0
  110. package/dist/components/robotHeader/ActivationSwitch.d.ts +7 -0
  111. package/dist/components/robotHeader/AppNavigation.d.ts +15 -0
  112. package/dist/components/robotHeader/RobotHeader.d.ts +42 -0
  113. package/dist/components/robots/GenericRobot.d.ts +2 -1
  114. package/dist/components/robots/LinearAxis.d.ts +1 -1
  115. package/dist/components/robots/LinearAxisAnimator.d.ts +11 -2
  116. package/dist/components/robots/Robot.d.ts +1 -1
  117. package/dist/components/robots/robotModelLogic.d.ts +11 -9
  118. package/dist/components/utils/hooks.d.ts +1 -6
  119. package/dist/core.cjs +1 -1
  120. package/dist/core.d.ts +13 -18
  121. package/dist/core.js +37 -51
  122. package/dist/index.cjs +1 -1
  123. package/dist/index.js +58 -71
  124. package/dist/lib/ConnectedMotionGroup.d.ts +5 -7
  125. package/dist/lib/JoggerConnection.d.ts +137 -27
  126. package/dist/lib/MotionStreamConnection.d.ts +15 -6
  127. package/dist/lib/Pose3.d.ts +22 -0
  128. package/dist/lib/PoseTransformer.d.ts +25 -0
  129. package/dist/lib/TrajectoryExecutionStore.d.ts +129 -0
  130. package/dist/lib/connectionLogger.d.ts +9 -0
  131. package/dist/lib/incrementalCartesianMotion.d.ts +40 -0
  132. package/dist/lib/motionStateUpdate.d.ts +27 -0
  133. package/dist/lib/novaConnection.d.ts +23 -0
  134. package/dist/lib/planErrorTranslation.d.ts +8 -0
  135. package/dist/lib/rotation.d.ts +12 -0
  136. package/package.json +31 -66
  137. package/dist/Setup.d.ts +0 -11
  138. package/dist/chunks/MotionGroupVisualizer-DshWR1wY.js +0 -1653
  139. package/dist/chunks/MotionGroupVisualizer-eD7yFEcF.cjs +0 -1
  140. package/dist/chunks/SafetyBar-DPrv_OQA.cjs +0 -1
  141. package/dist/chunks/externalizeComponent-EDymnaGR.js +0 -268
  142. package/dist/chunks/externalizeComponent-OO4jcrz5.cjs +0 -2
  143. package/dist/chunks/theming-DfSy4-Ic.cjs +0 -4
  144. package/dist/chunks/theming-mF9Rt8SS.js +0 -5542
  145. package/dist/chunks/useSmoothedMotionState-DyDgSVYX.js +0 -478
  146. package/dist/chunks/useSmoothedMotionState-VYxEIyfr.cjs +0 -1
  147. package/dist/components/3d-viewport/CoordinateSystemTransform.d.ts +0 -11
  148. package/dist/components/AdornedTextField.d.ts +0 -7
  149. package/dist/components/CopyableText.d.ts +0 -6
  150. package/dist/components/CycleTimer/CycleTimer.d.ts +0 -3
  151. package/dist/components/CycleTimer/DefaultVariant.d.ts +0 -9
  152. package/dist/components/CycleTimer/SmallVariant.d.ts +0 -10
  153. package/dist/components/CycleTimer/index.d.ts +0 -27
  154. package/dist/components/CycleTimer/types.d.ts +0 -49
  155. package/dist/components/CycleTimer/useAnimations.d.ts +0 -14
  156. package/dist/components/CycleTimer/useTimerLogic.d.ts +0 -24
  157. package/dist/components/CycleTimer/utils.d.ts +0 -21
  158. package/dist/components/CycleTimer.d.ts +0 -3
  159. package/dist/components/DataGrid.d.ts +0 -66
  160. package/dist/components/LogPanel.d.ts +0 -38
  161. package/dist/components/LogStore.d.ts +0 -12
  162. package/dist/components/LogViewer.d.ts +0 -46
  163. package/dist/components/ProgramControl.d.ts +0 -55
  164. package/dist/components/ProgramStateIndicator.d.ts +0 -26
  165. package/dist/components/RobotCard.d.ts +0 -98
  166. package/dist/components/RobotListItem.d.ts +0 -34
  167. package/dist/components/RobotSetupReadinessIndicator.d.ts +0 -37
  168. package/dist/components/SelectableFab.d.ts +0 -7
  169. package/dist/components/TabBar.d.ts +0 -45
  170. package/dist/components/ThemeSelect.d.ts +0 -6
  171. package/dist/components/Timer/Timer.d.ts +0 -3
  172. package/dist/components/Timer/TimerDefaultVariant.d.ts +0 -9
  173. package/dist/components/Timer/TimerSmallVariant.d.ts +0 -10
  174. package/dist/components/Timer/index.d.ts +0 -19
  175. package/dist/components/Timer/types.d.ts +0 -35
  176. package/dist/components/Timer/useTimerAnimations.d.ts +0 -10
  177. package/dist/components/Timer/useTimerLogic.d.ts +0 -19
  178. package/dist/components/Timer/utils.d.ts +0 -17
  179. package/dist/components/Timer.d.ts +0 -3
  180. package/dist/components/TransparentOverlay.d.ts +0 -4
  181. package/dist/components/jogging/JoggingFreedriveTab.d.ts +0 -1
  182. package/dist/components/jogging/PoseCartesianValues.d.ts +0 -9
  183. package/dist/components/jogging/PoseJointValues.d.ts +0 -8
  184. package/dist/components/robots/AxisConfig.d.ts +0 -2
  185. package/dist/components/robots/manufacturerHomePositions.d.ts +0 -20
  186. package/dist/icons/DropdownArrowIcon.d.ts +0 -2
  187. package/dist/icons/index.d.ts +0 -12
  188. package/dist/lib/novaCompat.d.ts +0 -16
  189. package/dist/themes/createDarkTheme.d.ts +0 -7
  190. package/dist/themes/themeTypes.d.ts +0 -40
  191. package/dist/themes/theming.d.ts +0 -24
package/dist/core.js CHANGED
@@ -1,56 +1,42 @@
1
- import { A as o, a as s, C as t, b as r, J as n, c as i, d as g, e as l, f as u, L as c, g as d, h as m, i as p, j as S, M, N as b, P as C, k as V, R as L, l as P, m as f, S as J, T as R, n as x, V as T, o as A, W as I, p as y, q as E, r as h, s as q, t as v, u as N, v as w, w as F, x as G, y as W, z as j } from "./chunks/theming-mF9Rt8SS.js";
2
- import { P as D, a as k, b as z, V as H, u as K, c as O, d as Q, e as U, f as X, g as Y } from "./chunks/useSmoothedMotionState-DyDgSVYX.js";
3
- import { i as _ } from "./chunks/externalizeComponent-EDymnaGR.js";
4
- import { S as aa } from "./chunks/SafetyBar-Cy9DiXp9.js";
1
+ import "@wandelbots/mui";
2
+ import { A as r, C as t, J as s, a as n, b as i, c as g, d as l, L as p, e as u, M as d, N as J, T as c, V as f, f as m, j as x, g as C, p as S, h as V, r as M, i as E, t as y, u as j } from "./chunks/TrajectoryExecutionStore-DPqfDcfn.js";
3
+ import { C as L } from "./chunks/CurrentPoseBar-zTZi68tY.js";
4
+ import { J as h } from "./chunks/JoggingButtons-CXaozFVz.js";
5
+ import { J as B } from "./chunks/JoggingJointSlider-CZ-k6XCa.js";
6
+ import { R as T } from "./chunks/RobotHeader-BZci9ahT.js";
7
+ import { V as H, u as I, a as N } from "./chunks/useSmoothedMotionState-COMJRcOt.js";
8
+ import { i as v } from "./chunks/externalizeComponent-_w2d1_pz.js";
9
+ import { S as K } from "./chunks/SafetyBar-Cuak4ffd.js";
5
10
  export {
6
- o as AdornedTextField,
7
- s as AppHeader,
11
+ r as AppHeader,
8
12
  t as ConnectedMotionGroup,
9
- r as CycleTimer,
10
- n as JoggerConnection,
11
- i as JoggingCartesianAxisControl,
12
- g as JoggingJointValueControl,
13
- l as JoggingPanel,
14
- u as JoggingStore,
15
- c as LoadingCover,
16
- d as LoadingErrorMessage,
17
- m as LogPanel,
18
- p as LogStore,
19
- S as LogViewer,
20
- M as MotionStreamConnection,
21
- b as NoMotionGroupModal,
22
- C as PoseCartesianValues,
23
- V as PoseJointValues,
24
- D as ProgramControl,
25
- k as ProgramState,
26
- z as ProgramStateIndicator,
27
- L as RobotListItem,
28
- P as RobotSetupReadinessIndicator,
29
- f as RobotSetupReadinessState,
30
- aa as SafetyBar,
31
- J as SelectableFab,
32
- R as TabBar,
33
- x as Timer,
13
+ L as CurrentPoseBar,
14
+ s as JoggerConnection,
15
+ h as JoggingButtons,
16
+ n as JoggingCartesianAxisControl,
17
+ B as JoggingJointSlider,
18
+ i as JoggingJointValueControl,
19
+ g as JoggingPanel,
20
+ l as JoggingStore,
21
+ p as LoadingCover,
22
+ u as LoadingErrorMessage,
23
+ d as MotionStreamConnection,
24
+ J as NoMotionGroupModal,
25
+ T as RobotHeader,
26
+ K as SafetyBar,
27
+ c as TrajectoryExecutionStore,
34
28
  H as ValueInterpolator,
35
- T as VelocitySlider,
36
- A as VelocitySliderLabel,
37
- I as WandelbotsDataGrid,
38
- y as createDebugMessage,
39
- E as createErrorMessage,
40
- h as createInfoMessage,
41
- q as createLogMessage,
42
- v as createNovaMuiTheme,
43
- N as createNovaTheme,
44
- w as createWarningMessage,
45
- _ as i18n,
46
- F as jointValuesEqual,
47
- G as poseEqual,
48
- W as tcpMotionEqual,
29
+ f as VelocitySlider,
30
+ m as VelocitySliderLabel,
31
+ v as i18n,
32
+ x as jointValuesEqual,
33
+ C as jointValuesUnchanged,
34
+ S as planErrorTranslationKey,
35
+ V as poseEqual,
36
+ M as readoutOf,
37
+ E as readoutsEqual,
38
+ y as tcpMotionEqual,
49
39
  j as unwrapRotationVector,
50
- K as useAnimationFrame,
51
- O as useAutorun,
52
- Q as useInterpolation,
53
- U as useMounted,
54
- X as useReaction,
55
- Y as useSmoothedMotionState
40
+ I as useInterpolation,
41
+ N as useSmoothedMotionState
56
42
  };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./chunks/MotionGroupVisualizer-eD7yFEcF.cjs"),t=require("./chunks/useSmoothedMotionState-VYxEIyfr.cjs"),e=require("./chunks/theming-DfSy4-Ic.cjs"),r=require("./chunks/externalizeComponent-OO4jcrz5.cjs"),a=require("./chunks/SafetyBar-DPrv_OQA.cjs");exports.CollisionSceneRenderer=o.CollisionSceneRenderer;exports.JointLimitGizmo=o.JointLimitGizmo;exports.LinearAxis=o.LinearAxis;exports.MANUFACTURER_HOME_CONFIGS=o.MANUFACTURER_HOME_CONFIGS;exports.MotionGroupVisualizer=o.MotionGroupVisualizer;exports.MotionGroupVisualizerExact=o.MotionGroupVisualizerExact;exports.PresetEnvironment=o.PresetEnvironment;exports.Robot=o.Robot;exports.RobotCard=o.RobotCard;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.defaultAxisConfig=o.defaultAxisConfig;exports.defaultGetModel=o.defaultGetModel;exports.extractManufacturer=o.extractManufacturer;exports.getDefaultHomeConfig=o.getDefaultHomeConfig;exports.ProgramControl=t.ProgramControl;exports.ProgramState=t.ProgramState;exports.ProgramStateIndicator=t.ProgramStateIndicator;exports.ValueInterpolator=t.ValueInterpolator;exports.useAnimationFrame=t.useAnimationFrame;exports.useAutorun=t.useAutorun;exports.useInterpolation=t.useInterpolation;exports.useMounted=t.useMounted;exports.useReaction=t.useReaction;exports.useSmoothedMotionState=t.useSmoothedMotionState;exports.AdornedTextField=e.AdornedTextField;exports.AppHeader=e.AppHeader;exports.ConnectedMotionGroup=e.ConnectedMotionGroup;exports.CycleTimer=e.CycleTimer;exports.JoggerConnection=e.JoggerConnection;exports.JoggingCartesianAxisControl=e.JoggingCartesianAxisControl;exports.JoggingJointValueControl=e.JoggingJointValueControl;exports.JoggingPanel=e.JoggingPanel;exports.JoggingStore=e.JoggingStore;exports.LoadingCover=e.LoadingCover;exports.LoadingErrorMessage=e.LoadingErrorMessage;exports.LogPanel=e.LogPanel;exports.LogStore=e.LogStore;exports.LogViewer=e.LogViewer;exports.MotionStreamConnection=e.MotionStreamConnection;exports.NoMotionGroupModal=e.NoMotionGroupModal;exports.PoseCartesianValues=e.PoseCartesianValues;exports.PoseJointValues=e.PoseJointValues;exports.RobotListItem=e.RobotListItem;exports.RobotSetupReadinessIndicator=e.RobotSetupReadinessIndicator;exports.RobotSetupReadinessState=e.RobotSetupReadinessState;exports.SelectableFab=e.SelectableFab;exports.TabBar=e.TabBar;exports.Timer=e.Timer;exports.VelocitySlider=e.VelocitySlider;exports.VelocitySliderLabel=e.VelocitySliderLabel;exports.WandelbotsDataGrid=e.WandelbotsDataGrid;exports.createDebugMessage=e.createDebugMessage;exports.createErrorMessage=e.createErrorMessage;exports.createInfoMessage=e.createInfoMessage;exports.createLogMessage=e.createLogMessage;exports.createNovaMuiTheme=e.createNovaMuiTheme;exports.createNovaTheme=e.createNovaTheme;exports.createWarningMessage=e.createWarningMessage;exports.jointValuesEqual=e.jointValuesEqual;exports.poseEqual=e.poseEqual;exports.tcpMotionEqual=e.tcpMotionEqual;exports.unwrapRotationVector=e.unwrapRotationVector;exports.i18n=r.i18n;exports.SafetyBar=a.SafetyBar;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/Robot-D0ZqUCn3.cjs"),n=require("./chunks/JoggingGizmo-DGbFLWgT.cjs"),r=require("./chunks/JoggingGizmoOrientation-dzned4f4.cjs"),i=require("./chunks/RobotControlPanel-BuDGcxPR.cjs"),t=require("./chunks/useSmoothedMotionState-Con0E5Bx.cjs");require("@wandelbots/mui");const o=require("./chunks/TrajectoryExecutionStore-DV6mLEx9.cjs"),a=require("./chunks/CurrentPoseBar-CyHUWmjM.cjs"),g=require("./chunks/JoggingButtons-CbL-5LMK.cjs"),u=require("./chunks/JoggingJointSlider-R3_A9Ppj.cjs"),l=require("./chunks/RobotHeader-CqK0700U.cjs"),s=require("./chunks/externalizeComponent-BdxGBLIv.cjs"),d=require("./chunks/SafetyBar-Bbg-o8h9.cjs");exports.CollisionSceneRenderer=e.CollisionSceneRenderer;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.JoggingGizmo=n.JoggingGizmo;exports.JoggingGizmoOrientation=r.JoggingGizmoOrientation;exports.RobotControlPanel=i.RobotControlPanel;exports.ValueInterpolator=t.ValueInterpolator;exports.useInterpolation=t.useInterpolation;exports.useSmoothedMotionState=t.useSmoothedMotionState;exports.AppHeader=o.AppHeader;exports.ConnectedMotionGroup=o.ConnectedMotionGroup;exports.JoggerConnection=o.JoggerConnection;exports.JoggingCartesianAxisControl=o.JoggingCartesianAxisControl;exports.JoggingJointValueControl=o.JoggingJointValueControl;exports.JoggingPanel=o.JoggingPanel;exports.JoggingStore=o.JoggingStore;exports.LoadingCover=o.LoadingCover;exports.LoadingErrorMessage=o.LoadingErrorMessage;exports.MotionStreamConnection=o.MotionStreamConnection;exports.NoMotionGroupModal=o.NoMotionGroupModal;exports.TrajectoryExecutionStore=o.TrajectoryExecutionStore;exports.VelocitySlider=o.VelocitySlider;exports.VelocitySliderLabel=o.VelocitySliderLabel;exports.jointValuesEqual=o.jointValuesEqual;exports.jointValuesUnchanged=o.jointValuesUnchanged;exports.planErrorTranslationKey=o.planErrorTranslationKey;exports.poseEqual=o.poseEqual;exports.readoutOf=o.readoutOf;exports.readoutsEqual=o.readoutsEqual;exports.tcpMotionEqual=o.tcpMotionEqual;exports.unwrapRotationVector=o.unwrapRotationVector;exports.CurrentPoseBar=a.CurrentPoseBar;exports.JoggingButtons=g.JoggingButtons;exports.JoggingJointSlider=u.JoggingJointSlider;exports.RobotHeader=l.RobotHeader;exports.i18n=s.i18n;exports.SafetyBar=d.SafetyBar;
package/dist/index.js CHANGED
@@ -1,76 +1,63 @@
1
- import { C as o, J as s, L as t, M as r, a as n, b as i, P as u, R as g, c as l, S as d, d as c, e as p, f as S, g as m, T as M, h as C, i as R, j as f, k as b } from "./chunks/MotionGroupVisualizer-DshWR1wY.js";
2
- import { P as L, a as V, b as A, V as E, u as P, c as J, d as T, e as G, f as y, g as I } from "./chunks/useSmoothedMotionState-DyDgSVYX.js";
3
- import { A as h, a as v, C as F, b as j, J as q, c as z, d as w, e as D, f as H, L as W, g as k, h as B, i as O, j as U, M as _, N as Z, P as K, k as Q, R as X, l as Y, m as $, S as aa, T as ea, n as oa, V as sa, o as ta, W as ra, p as na, q as ia, r as ua, s as ga, t as la, u as da, v as ca, w as pa, x as Sa, y as ma, z as Ma } from "./chunks/theming-mF9Rt8SS.js";
4
- import { i as Ra } from "./chunks/externalizeComponent-EDymnaGR.js";
5
- import { S as ba } from "./chunks/SafetyBar-Cy9DiXp9.js";
1
+ import { C as r, J as t, L as s, M as n, a as i, P as p, R as g, S as l, b as u, c as d, d as m, e as x, T as f, f as J } from "./chunks/Robot-UoykZeYH.js";
2
+ import { J as S } from "./chunks/JoggingGizmo-SuS9MmL7.js";
3
+ import { J as M } from "./chunks/JoggingGizmoOrientation-x_crT_64.js";
4
+ import { R as E } from "./chunks/RobotControlPanel-BnMfmO41.js";
5
+ import { V as L, u as b, a as G } from "./chunks/useSmoothedMotionState-COMJRcOt.js";
6
+ import "@wandelbots/mui";
7
+ import { A, C as j, J as z, a as P, b as T, c as q, d as h, L as B, e as v, M as H, N as I, T as N, V as O, f as w, j as K, g as U, p as Z, h as k, r as D, i as F, t as Q, u as W } from "./chunks/TrajectoryExecutionStore-DPqfDcfn.js";
8
+ import { C as Y } from "./chunks/CurrentPoseBar-zTZi68tY.js";
9
+ import { J as $ } from "./chunks/JoggingButtons-CXaozFVz.js";
10
+ import { J as ao } from "./chunks/JoggingJointSlider-CZ-k6XCa.js";
11
+ import { R as ro } from "./chunks/RobotHeader-BZci9ahT.js";
12
+ import { i as so } from "./chunks/externalizeComponent-_w2d1_pz.js";
13
+ import { S as io } from "./chunks/SafetyBar-Cuak4ffd.js";
6
14
  export {
7
- h as AdornedTextField,
8
- v as AppHeader,
9
- o as CollisionSceneRenderer,
10
- F as ConnectedMotionGroup,
11
- j as CycleTimer,
12
- q as JoggerConnection,
13
- z as JoggingCartesianAxisControl,
14
- w as JoggingJointValueControl,
15
- D as JoggingPanel,
16
- H as JoggingStore,
17
- s as JointLimitGizmo,
18
- t as LinearAxis,
19
- W as LoadingCover,
20
- k as LoadingErrorMessage,
21
- B as LogPanel,
22
- O as LogStore,
23
- U as LogViewer,
24
- r as MANUFACTURER_HOME_CONFIGS,
15
+ A as AppHeader,
16
+ r as CollisionSceneRenderer,
17
+ j as ConnectedMotionGroup,
18
+ Y as CurrentPoseBar,
19
+ z as JoggerConnection,
20
+ $ as JoggingButtons,
21
+ P as JoggingCartesianAxisControl,
22
+ S as JoggingGizmo,
23
+ M as JoggingGizmoOrientation,
24
+ ao as JoggingJointSlider,
25
+ T as JoggingJointValueControl,
26
+ q as JoggingPanel,
27
+ h as JoggingStore,
28
+ t as JointLimitGizmo,
29
+ s as LinearAxis,
30
+ B as LoadingCover,
31
+ v as LoadingErrorMessage,
25
32
  n as MotionGroupVisualizer,
26
33
  i as MotionGroupVisualizerExact,
27
- _ as MotionStreamConnection,
28
- Z as NoMotionGroupModal,
29
- K as PoseCartesianValues,
30
- Q as PoseJointValues,
31
- u as PresetEnvironment,
32
- L as ProgramControl,
33
- V as ProgramState,
34
- A as ProgramStateIndicator,
34
+ H as MotionStreamConnection,
35
+ I as NoMotionGroupModal,
36
+ p as PresetEnvironment,
35
37
  g as Robot,
36
- l as RobotCard,
37
- X as RobotListItem,
38
- Y as RobotSetupReadinessIndicator,
39
- $ as RobotSetupReadinessState,
40
- ba as SafetyBar,
41
- d as SafetyZonesRenderer,
42
- aa as SelectableFab,
43
- c as SupportedLinearAxis,
44
- p as SupportedLinearAxisExact,
45
- S as SupportedRobot,
46
- m as SupportedRobotExact,
47
- ea as TabBar,
48
- oa as Timer,
49
- M as TrajectoryRenderer,
50
- E as ValueInterpolator,
51
- sa as VelocitySlider,
52
- ta as VelocitySliderLabel,
53
- ra as WandelbotsDataGrid,
54
- na as createDebugMessage,
55
- ia as createErrorMessage,
56
- ua as createInfoMessage,
57
- ga as createLogMessage,
58
- la as createNovaMuiTheme,
59
- da as createNovaTheme,
60
- ca as createWarningMessage,
61
- C as defaultAxisConfig,
62
- R as defaultGetModel,
63
- f as extractManufacturer,
64
- b as getDefaultHomeConfig,
65
- Ra as i18n,
66
- pa as jointValuesEqual,
67
- Sa as poseEqual,
68
- ma as tcpMotionEqual,
69
- Ma as unwrapRotationVector,
70
- P as useAnimationFrame,
71
- J as useAutorun,
72
- T as useInterpolation,
73
- G as useMounted,
74
- y as useReaction,
75
- I as useSmoothedMotionState
38
+ E as RobotControlPanel,
39
+ ro as RobotHeader,
40
+ io as SafetyBar,
41
+ l as SafetyZonesRenderer,
42
+ u as SupportedLinearAxis,
43
+ d as SupportedLinearAxisExact,
44
+ m as SupportedRobot,
45
+ x as SupportedRobotExact,
46
+ N as TrajectoryExecutionStore,
47
+ f as TrajectoryRenderer,
48
+ L as ValueInterpolator,
49
+ O as VelocitySlider,
50
+ w as VelocitySliderLabel,
51
+ J as defaultGetModel,
52
+ so as i18n,
53
+ K as jointValuesEqual,
54
+ U as jointValuesUnchanged,
55
+ Z as planErrorTranslationKey,
56
+ k as poseEqual,
57
+ D as readoutOf,
58
+ F as readoutsEqual,
59
+ Q as tcpMotionEqual,
60
+ W as unwrapRotationVector,
61
+ b as useInterpolation,
62
+ G as useSmoothedMotionState
76
63
  };
@@ -1,8 +1,8 @@
1
1
  import { type AutoReconnectingWebsocket } from "@wandelbots/nova-js";
2
- import type { MotionGroupDescription, MotionGroupState, Nova, RobotControllerState } from "@wandelbots/nova-js/v2";
2
+ import type { MotionGroupDescription, MotionGroupState, RobotControllerState } from "@wandelbots/nova-js/v2";
3
3
  import * as THREE from "three";
4
4
  import type { Vector3Simple } from "./JoggerConnection";
5
- import { type AnyNovaClient } from "./novaCompat";
5
+ import { type NovaConnection } from "./novaConnection";
6
6
  export type RobotTcpLike = {
7
7
  id: string;
8
8
  readable_name: string;
@@ -31,8 +31,8 @@ export declare class ConnectedMotionGroup {
31
31
  readonly initialControllerState: RobotControllerState;
32
32
  readonly controllerStateSocket: AutoReconnectingWebsocket;
33
33
  readonly cellId: string;
34
- static connectMultiple(nova: AnyNovaClient, motionGroupIds: string[], options?: ConnectedMotionGroupOptions): Promise<ConnectedMotionGroup[]>;
35
- static connect(novaClient: AnyNovaClient, motionGroupId: string, options?: ConnectedMotionGroupOptions): Promise<ConnectedMotionGroup>;
34
+ static connectMultiple(connection: NovaConnection, motionGroupIds: string[], options?: ConnectedMotionGroupOptions): Promise<ConnectedMotionGroup[]>;
35
+ static connect(connection: NovaConnection, motionGroupId: string, options?: ConnectedMotionGroupOptions): Promise<ConnectedMotionGroup>;
36
36
  connectedJoggingSocket: WebSocket | null;
37
37
  planData: any | null;
38
38
  joggingVelocity: number;
@@ -43,9 +43,7 @@ export declare class ConnectedMotionGroup {
43
43
  * movement controls in the UI should only be enabled in the "active" state
44
44
  */
45
45
  activationState: "inactive" | "activating" | "deactivating" | "active";
46
- /** Normalized instance-level Nova client (see `asNovaInstance`) */
47
- readonly nova: Nova;
48
- constructor(nova: AnyNovaClient, controller: RobotControllerState, motionGroup: MotionGroupState, initialMotionState: MotionGroupState, motionStateSocket: AutoReconnectingWebsocket, isVirtual: boolean, tcps: RobotTcpLike[], description: MotionGroupDescription, initialControllerState: RobotControllerState, controllerStateSocket: AutoReconnectingWebsocket, cellId?: string);
46
+ constructor(connection: NovaConnection, controller: RobotControllerState, motionGroup: MotionGroupState, initialMotionState: MotionGroupState, motionStateSocket: AutoReconnectingWebsocket, isVirtual: boolean, tcps: RobotTcpLike[], description: MotionGroupDescription, initialControllerState: RobotControllerState, controllerStateSocket: AutoReconnectingWebsocket, cellId?: string);
49
47
  get motionGroupId(): string;
50
48
  get controllerId(): string;
51
49
  get modelFromController(): string;
@@ -1,21 +1,57 @@
1
1
  import { type AutoReconnectingWebsocket } from "@wandelbots/nova-js";
2
- import { type Pose } from "@wandelbots/nova-js/v2";
2
+ import { type CoordinateSystem, type Pose } from "@wandelbots/nova-js/v2";
3
+ import type { ConnectionLogger } from "./connectionLogger";
4
+ import { type IncrementalMotion } from "./incrementalCartesianMotion";
3
5
  import { MotionStreamConnection } from "./MotionStreamConnection";
4
- import type { AnyNovaClient } from "./novaCompat";
6
+ import type { NovaConnection } from "./novaConnection";
7
+ export type { IncrementalMotion } from "./incrementalCartesianMotion";
5
8
  export type Vector3Simple = [number, number, number];
9
+ /** A step jog: see `JoggerConnection.runIncrementalCartesianMotion` */
10
+ export type IncrementalCartesianMotionRequest = {
11
+ currentTcpPose: Pose;
12
+ currentJoints: Vector3Simple;
13
+ /**
14
+ * @deprecated Not used: a step follows the jogger's `orientation` and
15
+ * `coordinateSystem`
16
+ */
17
+ coordSystemId?: string;
18
+ velocityInRelevantUnits: number;
19
+ axis: "x" | "y" | "z";
20
+ direction: "-" | "+";
21
+ motion: IncrementalMotion;
22
+ };
6
23
  export type JoggerConnectionOptions = {
7
24
  mode?: JoggerMode;
8
25
  timeout?: number;
9
26
  /**
10
- * When an error message is received from the jogging websocket, it
11
- * will be passed here. If this handler is not provided, the error will
12
- * instead be thrown as an unhandled error.
27
+ * Gets the errors of the jogging websocket and of step jogs (a refused
28
+ * or failed plan, a refused trajectory, a motion that does not end). Without
29
+ * it, the initialization of the jogging websocket and the step jog reject
30
+ * with the error.
13
31
  */
14
32
  onError?: (err: unknown) => void;
15
33
  tcp?: string;
34
+ /**
35
+ * The coordinate system whose axes cartesian jogging moves along, unless in
36
+ * tool orientation. Its pose has to be relative to world (a coordinate
37
+ * system that refers to another one has to be resolved first). Defaults to
38
+ * world.
39
+ */
40
+ coordinateSystem?: CoordinateSystem;
16
41
  orientation?: JoggerOrientation;
17
42
  /** Cell id on the Nova instance. Defaults to "cell". */
18
43
  cellId?: string;
44
+ /**
45
+ * Model name sent to the planner for incremental motions. Defaults to the
46
+ * model in the motion group description; pass the resolved name for a robot
47
+ * whose data lives in a custom copy.
48
+ */
49
+ motionGroupModel?: string;
50
+ /**
51
+ * Where the jogger logs, and the motion stream that `open()` opens.
52
+ * Defaults to the console.
53
+ */
54
+ logger?: ConnectionLogger;
19
55
  };
20
56
  export type JoggerMode = "jogging" | "trajectory" | "off";
21
57
  export type JoggerOrientation = "coordsys" | "tool";
@@ -32,13 +68,34 @@ export declare class JoggerConnection {
32
68
  trajectorySocket: AutoReconnectingWebsocket | null;
33
69
  timeout: number;
34
70
  tcp: string | undefined;
71
+ /** See {@link JoggerConnectionOptions.coordinateSystem}. Applies to the next jog command. */
72
+ coordinateSystem: CoordinateSystem | undefined;
35
73
  orientation: JoggerOrientation;
36
74
  onError?: (err: unknown) => void;
37
75
  onBlocked?: () => void;
76
+ private readonly logger;
77
+ /**
78
+ * Set from planning an incremental jog until the robot has come to a
79
+ * standstill again. Jogs requested in between are dropped: their trajectory
80
+ * would be planned from a joint position the robot has already left, and the
81
+ * controller refuses that with "Motion group is not at expected location on
82
+ * trajectory. Please move to the trajectory!".
83
+ */
84
+ private incrementalMotionInFlight;
85
+ /** Ends an incremental jog that still waits for the robot */
86
+ private endIncrementalMotion?;
87
+ /**
88
+ * Whether the jogger opened its motion stream itself (in `open()`): then
89
+ * `dispose()` closes it too. A motion stream given to the constructor
90
+ * belongs to the caller.
91
+ */
92
+ private ownsMotionStream;
93
+ /** Ends a jogging initialization that still waits for NOVA */
94
+ private endJoggingInit?;
38
95
  /**
39
96
  * Initialize the jogging connection using jogging endpoint or trajectory endpoint depending on the selected mode.
40
97
  *
41
- * @param nova - The Nova client instance
98
+ * @param connection - The base URL of a NOVA instance, or a NOVA client of the app (see `NovaConnection`)
42
99
  * @param motionGroupId - The ID of the motion group to connect to
43
100
  * @param options - Configuration options for the jogger connection
44
101
  * @param options.mode - The jogging mode to initialize:
@@ -47,22 +104,40 @@ export declare class JoggerConnection {
47
104
  * - "off": No jogging enabled, all websockets closed (default)
48
105
  * @param options.timeout - Timeout in milliseconds for websocket initialization (default: 5000ms)
49
106
  * @param options.tcp - TCP frame to use for motions (default: from motion group)
50
- * //param options.coordinateSystem - Coordinate system for jogging commands (default: "world"). Please note: Currently not implemented
107
+ * @param options.coordinateSystem - Coordinate system whose axes cartesian jogging moves along, relative to world (default: world)
51
108
  * @param options.orientation - If set to "tool", jogging TcpVelocityRequest will use `use_tool_coordinate_system` option (default: "coordsys")
52
- * @param options.onError - Error handler for websocket errors
53
- * @returns Promise resolving to initialized JoggerConnection instance
109
+ * @param options.onError - Error handler for websocket errors and step jogs
110
+ * @param options.motionGroupModel - Model name for planning step jogs (default: from the motion group description)
111
+ * @param options.logger - Where the jogger and its motion stream log (default: the console)
112
+ * @returns Promise resolving to initialized JoggerConnection instance. Its
113
+ * `dispose()` also closes the motion stream that this function opens.
54
114
  */
55
- static open(nova: AnyNovaClient, motionGroupId: string, options?: JoggerConnectionOptions): Promise<JoggerConnection>;
115
+ static open(connection: NovaConnection, motionGroupId: string, options?: JoggerConnectionOptions): Promise<JoggerConnection>;
56
116
  constructor(motionStream: MotionStreamConnection, options?: JoggerConnectionOptions | undefined);
57
117
  getDefaultTcp(motionStream: MotionStreamConnection): string | undefined;
58
118
  setOptions(options: Partial<JoggerConnectionOptions>): Promise<void>;
59
119
  get motionGroupId(): string;
60
- get nova(): import("@wandelbots/nova-js/v2").Nova;
61
120
  get cellId(): string;
62
121
  get numJoints(): number;
63
122
  stop(): Promise<void>;
123
+ /**
124
+ * Dispose the jogger, closing all open websockets: the jogging websockets,
125
+ * and the motion stream if the jogger opened it (in `open()`). A motion
126
+ * stream given to the constructor stays open: its caller closes it.
127
+ */
64
128
  dispose(): Promise<void[]>;
129
+ /** Closes the jogging and trajectory websockets */
130
+ private closeJoggingSockets;
65
131
  setJoggingMode(mode: JoggerMode, skipReinitializeIfSameMode?: boolean): Promise<void>;
132
+ /**
133
+ * Opens the continuous jogging websocket and initializes it; called by
134
+ * `setJoggingMode("jogging")`. The promise settles once:
135
+ * - it resolves when NOVA confirms the initialization (INITIALIZE_RECEIVED),
136
+ * when the jogger closes the websocket before that (`setJoggingMode`,
137
+ * `dispose`), or when an error message goes to `onBlocked` or `onError`;
138
+ * - it rejects on an error message without such a handler, and when NOVA
139
+ * does not confirm the initialization within `timeout` milliseconds.
140
+ */
66
141
  initializeJoggingWebsocket(): Promise<void>;
67
142
  /**
68
143
  * Jogging: Start rotation of a single robot joint at the specified velocity
@@ -92,27 +167,62 @@ export declare class JoggerConnection {
92
167
  direction: "-" | "+";
93
168
  velocityRadsPerSec: number;
94
169
  }): Promise<void>;
170
+ /**
171
+ * Rotation from {@link JoggerConnection.coordinateSystem} into world,
172
+ * while jogging along its axes. Undefined when jogging along world or tool
173
+ * axes.
174
+ */
175
+ private get coordinateSystemRotation();
176
+ /**
177
+ * Velocity vector along one axis of the jogging frame. The API takes TCP
178
+ * velocities in either the tool frame or world, so an axis of
179
+ * {@link JoggerConnection.coordinateSystem} is rotated into world here.
180
+ */
181
+ private velocityAlongAxis;
95
182
  /**
96
183
  * Trajectory jogging:
97
184
  *
98
185
  * Move the robot by a fixed distance in a single cartesian
99
186
  * axis, either rotating or translating relative to the TCP.
100
- * Promise resolves only after the motion has completed.
187
+ * The axis is one of the tool in tool orientation, else one of
188
+ * {@link JoggerConnection.coordinateSystem} (default: world).
189
+ *
190
+ * Promise resolves only after the motion has completed: once the robot
191
+ * stands still again, or after a watchdog of twice the planned duration
192
+ * plus 5 s. A step requested while another one runs is dropped (resolves
193
+ * at once). Every error (a refused or failed plan, a refused trajectory, an
194
+ * error of the controller, the watchdog) goes to `onError`, or without it
195
+ * rejects the promise.
101
196
  */
102
- runIncrementalCartesianMotion({ currentTcpPose, currentJoints, velocityInRelevantUnits, axis, direction, motion, }: {
103
- currentTcpPose: Pose;
104
- currentJoints: Vector3Simple;
105
- coordSystemId: string;
106
- velocityInRelevantUnits: number;
107
- axis: "x" | "y" | "z";
108
- direction: "-" | "+";
109
- motion: {
110
- type: "rotate";
111
- distanceRads: number;
112
- } | {
113
- type: "translate";
114
- distanceMm: number;
115
- };
116
- }): Promise<void>;
197
+ runIncrementalCartesianMotion(request: IncrementalCartesianMotionRequest): Promise<void>;
198
+ /**
199
+ * Plan the trajectory for a single incremental jog. Returns undefined when
200
+ * no trajectory could be produced; the reason (a planner rejection such as a
201
+ * singularity, or a motion group without a cycle time) is reported through
202
+ * {@link JoggerConnection.onError} or logged.
203
+ */
204
+ private planIncrementalCartesianMotion;
205
+ /**
206
+ * Execute a planned trajectory https://portal.wandelbots.io/docs/api/v2/ui/#/operations/executeTrajectory
207
+ * and resolve once the robot has come to a standstill again, so that the
208
+ * caller -- and with it the jogging UI's motion lock -- stays blocked for the
209
+ * whole motion. It also resolves when the jogger closes the websocket
210
+ * (`setJoggingMode`, `dispose`).
211
+ *
212
+ * Each call owns its own websocket. Sharing
213
+ * {@link JoggerConnection.trajectorySocket} across motions meant a finishing
214
+ * motion closed the socket of a later one.
215
+ */
216
+ private executeTrajectory;
217
+ /**
218
+ * Resolve once the robot has finished executing a trajectory.
219
+ *
220
+ * `standstill` from the motion stream is the only completion signal we get.
221
+ * The robot is still at standstill for a moment after the controller
222
+ * acknowledges the start, and a short increment can be over before the stream
223
+ * reports any movement at all -- so movement is waited for as a grace period,
224
+ * never required.
225
+ */
226
+ private waitForMotionToFinish;
117
227
  }
118
228
  export default JoggerConnection;
@@ -1,12 +1,16 @@
1
1
  import { type AutoReconnectingWebsocket } from "@wandelbots/nova-js";
2
- import type { MotionGroupDescription, MotionGroupState, Nova, RobotControllerState } from "@wandelbots/nova-js/v2";
3
- import { type AnyNovaClient } from "./novaCompat";
2
+ import type { MotionGroupDescription, MotionGroupState, RobotControllerState } from "@wandelbots/nova-js/v2";
3
+ import type { ConnectionLogger } from "./connectionLogger";
4
+ import { type MotionStateReadout } from "./motionStateUpdate";
5
+ import { type NovaConnection } from "./novaConnection";
4
6
  /**
5
7
  * Store representing the current state of a connected motion group.
6
8
  */
7
9
  export type MotionStreamConnectionOptions = {
8
10
  /** Cell id on the Nova instance. Defaults to "cell". */
9
11
  cellId?: string;
12
+ /** Where the stream logs. Defaults to the console. */
13
+ logger?: ConnectionLogger;
10
14
  };
11
15
  export declare class MotionStreamConnection {
12
16
  readonly controller: RobotControllerState;
@@ -15,11 +19,16 @@ export declare class MotionStreamConnection {
15
19
  readonly initialMotionState: MotionGroupState;
16
20
  readonly motionStateSocket: AutoReconnectingWebsocket;
17
21
  readonly cellId: string;
18
- static open(novaClient: AnyNovaClient, motionGroupId: string, options?: MotionStreamConnectionOptions): Promise<MotionStreamConnection>;
22
+ static open(connection: NovaConnection, motionGroupId: string, options?: MotionStreamConnectionOptions): Promise<MotionStreamConnection>;
19
23
  rapidlyChangingMotionState: MotionGroupState;
20
- /** Normalized instance-level Nova client (see `asNovaInstance`) */
21
- readonly nova: Nova;
22
- constructor(nova: AnyNovaClient, controller: RobotControllerState, motionGroup: MotionGroupState, description: MotionGroupDescription, initialMotionState: MotionGroupState, motionStateSocket: AutoReconnectingWebsocket, cellId?: string);
24
+ private readonly logger;
25
+ constructor(connection: NovaConnection, controller: RobotControllerState, motionGroup: MotionGroupState, description: MotionGroupDescription, initialMotionState: MotionGroupState, motionStateSocket: AutoReconnectingWebsocket, cellId?: string, options?: Pick<MotionStreamConnectionOptions, "logger">);
26
+ /**
27
+ * What pose readouts show (joints, TCP pose): it holds the previous reading
28
+ * while the joints only jitter, see {@link readoutsEqual}. Kept alive, so it
29
+ * also holds for untracked reads, e.g. from requestAnimationFrame.
30
+ */
31
+ get readoutState(): MotionStateReadout;
23
32
  get motionGroupId(): string;
24
33
  get controllerId(): string;
25
34
  get joints(): {
@@ -0,0 +1,22 @@
1
+ import type { CoordinateSystem, Pose, RobotTcp } from "@wandelbots/nova-js/v2";
2
+ import { Quaternion, Vector3 } from "three";
3
+ /**
4
+ * Partial port of Pose math for use on the frontend, allowing
5
+ * us to avoid a network roundtrip for fast animation stuff
6
+ * See https://code.wabo.run/robotics/wb-robotix/-/blob/develop/src/math/core/include/wb/math/space/Pose.h
7
+ *
8
+ * Ported from RobotPad (src/util/Pose3.ts), only what the jogger and the
9
+ * jogging store use.
10
+ */
11
+ export declare class Pose3 {
12
+ readonly position: Vector3;
13
+ readonly quaternion: Quaternion;
14
+ static fromPose(apiPose: Pose): Pose3;
15
+ /** A TCP's offset from the flange */
16
+ static fromRobotTcp(robotTcp: Pick<RobotTcp, "position" | "orientation" | "orientation_type">): Pose3;
17
+ static fromCoordinateSystem(coordinateSystem: CoordinateSystem): Pose3;
18
+ constructor(position: Vector3, quaternion: Quaternion);
19
+ inverse(): Pose3;
20
+ multiply(other: Pose3): Pose3;
21
+ get orientation(): Vector3;
22
+ }
@@ -0,0 +1,25 @@
1
+ import type { CoordinateSystem, Pose, RobotTcp } from "@wandelbots/nova-js/v2";
2
+ /** A pose and the coordinate system that it is relative to */
3
+ export type ReferencedPose = {
4
+ pose: Required<Pose>;
5
+ coordinateSystemId: string;
6
+ };
7
+ /**
8
+ * A coordinate system's pose relative to world, following its chain of
9
+ * reference coordinate systems. Throws for an unknown id.
10
+ */
11
+ export declare function resolveCoordinateSystemInWorld(coordinateSystemId: string, coordinateSystems: CoordinateSystem[]): CoordinateSystem;
12
+ /**
13
+ * The pose expressed in another coordinate system. Coordinate systems that
14
+ * refer to others are resolved through `coordinateSystems`; an empty id is
15
+ * world. Throws for an unknown id.
16
+ */
17
+ export declare function transformPoseToCoordinateSystem(inputPose: ReferencedPose, targetCoordinateSystemId: string, coordinateSystems: CoordinateSystem[]): ReferencedPose;
18
+ /** A TCP's offset from the flange, as `RobotTcp` has it */
19
+ export type TcpOffset = Pick<RobotTcp, "position" | "orientation" | "orientation_type">;
20
+ /**
21
+ * The pose of one TCP as the pose of another TCP of the same flange, both
22
+ * relative to the same coordinate system: back to the flange, then out to
23
+ * the other TCP
24
+ */
25
+ export declare function transformPoseToTcp(pose: Pose, poseTcp: TcpOffset, targetTcp: TcpOffset): Required<Pose>;