@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
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import type { Pose } from "@wandelbots/nova-js/v2";
|
|
2
|
+
import type { JoggingStore } from "../components/jogging/JoggingStore";
|
|
3
|
+
import type { ConnectionLogger } from "./connectionLogger";
|
|
4
|
+
/** Where {@link TrajectoryExecutionStore.planTrajectory} moves the robot to */
|
|
5
|
+
export type TrajectoryTarget = {
|
|
6
|
+
type: "cartesian";
|
|
7
|
+
/**
|
|
8
|
+
* The pose of the jogging store's selected TCP, in the coordinate
|
|
9
|
+
* system `coordinateSystemId`
|
|
10
|
+
*/
|
|
11
|
+
pose: Pose;
|
|
12
|
+
/**
|
|
13
|
+
* A coordinate system of the jogging store's `coordSystems`, also one
|
|
14
|
+
* that refers to another. Defaults to world.
|
|
15
|
+
*/
|
|
16
|
+
coordinateSystemId?: string;
|
|
17
|
+
} | {
|
|
18
|
+
type: "joint";
|
|
19
|
+
/** The position of each joint (rad, or mm for a prismatic joint) */
|
|
20
|
+
joints: number[];
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Outcome of a planTrajectory call. Planner rejections (unreachable pose,
|
|
24
|
+
* singularity, joint limit, ...) are an expected user-facing result rather
|
|
25
|
+
* than an exception, so they are returned as a value carrying the backend's
|
|
26
|
+
* error_feedback_name (e.g. "FeedbackOutOfWorkspace") for the caller to
|
|
27
|
+
* translate into a friendly message, see `planErrorTranslationKey`.
|
|
28
|
+
*/
|
|
29
|
+
export type PlanTrajectoryResult = {
|
|
30
|
+
ok: true;
|
|
31
|
+
} | {
|
|
32
|
+
ok: false;
|
|
33
|
+
errorFeedbackName: string;
|
|
34
|
+
};
|
|
35
|
+
/** The first and the last joint positions of the planned trajectory */
|
|
36
|
+
export type PlannedTrajectory = {
|
|
37
|
+
startJoints: number[];
|
|
38
|
+
endJoints: number[];
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* - "idle": no trajectory
|
|
42
|
+
* - "planning": a trajectory is planned or waits for NOVA to accept it
|
|
43
|
+
* - "planned": NOVA accepted the trajectory, `start` moves the robot
|
|
44
|
+
* - "moving": the robot moves along the trajectory
|
|
45
|
+
* - "stopping": the robot decelerates after a pause
|
|
46
|
+
*/
|
|
47
|
+
export type TrajectoryState = "idle" | "planning" | "planned" | "moving" | "stopping";
|
|
48
|
+
/** See {@link TrajectoryExecutionStore} */
|
|
49
|
+
export type TrajectoryExecutionStoreOptions = {
|
|
50
|
+
/**
|
|
51
|
+
* The jogging store of the motion group: its jogger's connection, the
|
|
52
|
+
* selected TCP, the coordinate systems and the velocities
|
|
53
|
+
*/
|
|
54
|
+
joggingStore: JoggingStore;
|
|
55
|
+
/**
|
|
56
|
+
* Whether the app locks the robot. `planTrajectory` refuses to plan then.
|
|
57
|
+
* Defaults to never locked.
|
|
58
|
+
*/
|
|
59
|
+
isLocked?: () => boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Called before each plan: ends every other motion of the app that holds
|
|
62
|
+
* the controller's execution session. Defaults to ending continuous jogging
|
|
63
|
+
* and putting the jogger into its "trajectory" mode.
|
|
64
|
+
*/
|
|
65
|
+
ensureMovementOwnership?: () => Promise<void>;
|
|
66
|
+
/** Where the store logs. Defaults to the console. */
|
|
67
|
+
logger?: ConnectionLogger;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Moves the robot to a target ("Move to"): plans a trajectory to it, keeps it
|
|
71
|
+
* initialized on an execution websocket of the controller, and starts and
|
|
72
|
+
* pauses the motion along it. Without a UI: an app shows `trajectoryState`,
|
|
73
|
+
* `plannedTrajectory` and `lastError` and calls the actions.
|
|
74
|
+
*
|
|
75
|
+
* A planned trajectory holds the controller's execution session, also after
|
|
76
|
+
* the robot arrived, until `stopAndReset`. So an app calls that before
|
|
77
|
+
* jogging again (e.g. from the jogging store's `onBeforeActivate`).
|
|
78
|
+
*/
|
|
79
|
+
export declare class TrajectoryExecutionStore {
|
|
80
|
+
private readonly options;
|
|
81
|
+
/** The trajectory that `start` moves along, from the last plan */
|
|
82
|
+
plannedTrajectory: PlannedTrajectory | null;
|
|
83
|
+
/** See {@link TrajectoryState} */
|
|
84
|
+
trajectoryState: TrajectoryState;
|
|
85
|
+
/** The message of the last motion error. `clearError` removes it. */
|
|
86
|
+
lastError: string | null;
|
|
87
|
+
private socket;
|
|
88
|
+
private readonly disposers;
|
|
89
|
+
private readonly logger;
|
|
90
|
+
constructor(options: TrajectoryExecutionStoreOptions);
|
|
91
|
+
private get joggingStore();
|
|
92
|
+
private get jogger();
|
|
93
|
+
private get motionStream();
|
|
94
|
+
/** The execution state that the motion stream reports, e.g. "RUNNING" */
|
|
95
|
+
get executionState(): "PAUSED_BY_USER" | "PAUSED_NEAR_COLLISION" | "PAUSED_NEAR_JOINT_LIMIT" | "PAUSED_NEAR_SINGULARITY" | "PAUSED_ON_IO" | "RUNNING" | "END_OF_TRAJECTORY" | "WAIT_FOR_IO" | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Plans a trajectory from the current joints to the target and initializes
|
|
98
|
+
* it on the execution websocket. The store is "planned" once NOVA accepted
|
|
99
|
+
* it. Returns a planner rejection as a value; throws while the app locks
|
|
100
|
+
* the robot and when the planner cannot be reached.
|
|
101
|
+
*/
|
|
102
|
+
planTrajectory(target: TrajectoryTarget): Promise<PlanTrajectoryResult>;
|
|
103
|
+
/** Starts the motion along the planned trajectory */
|
|
104
|
+
start(): void;
|
|
105
|
+
/**
|
|
106
|
+
* Pauses the motion. Resolves once the robot stands still; the trajectory
|
|
107
|
+
* stays planned, so `start` goes on from there.
|
|
108
|
+
*/
|
|
109
|
+
pause(): Promise<void>;
|
|
110
|
+
/**
|
|
111
|
+
* Stops a moving robot, drops the trajectory and hands the controller's
|
|
112
|
+
* execution session back: closes the execution websocket and opens a new
|
|
113
|
+
* one for the next plan
|
|
114
|
+
*/
|
|
115
|
+
stopAndReset(): Promise<void>;
|
|
116
|
+
/** Drops the planned trajectory, without telling NOVA */
|
|
117
|
+
reset(): void;
|
|
118
|
+
/** Removes {@link TrajectoryExecutionStore.lastError} */
|
|
119
|
+
clearError(): void;
|
|
120
|
+
/** Closes the execution websocket and stops following the motion stream */
|
|
121
|
+
dispose(): void;
|
|
122
|
+
/** Ends continuous jogging, unless the app has its own way */
|
|
123
|
+
private ensureMovementOwnership;
|
|
124
|
+
/** Resolves once the motion stream reports that the robot stands still */
|
|
125
|
+
private waitUntilStopped;
|
|
126
|
+
private handleMessage;
|
|
127
|
+
private openSocket;
|
|
128
|
+
private closeSocket;
|
|
129
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the library's NOVA connections log: the console by default, or an
|
|
3
|
+
* app's own logger (e.g. one that sends the lines to its backend)
|
|
4
|
+
*/
|
|
5
|
+
export type ConnectionLogger = {
|
|
6
|
+
info: (message: string, data?: unknown) => void;
|
|
7
|
+
debug: (message: string, data?: unknown) => void;
|
|
8
|
+
warn: (message: string, data?: unknown) => void;
|
|
9
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Pose } from "@wandelbots/nova-js/v2";
|
|
2
|
+
import { Quaternion } from "three";
|
|
3
|
+
export type JoggingAxis = "x" | "y" | "z";
|
|
4
|
+
export type JoggingDirection = "-" | "+";
|
|
5
|
+
/** The distance of a step jog: a translation in mm or a rotation in rad */
|
|
6
|
+
export type IncrementalMotion = {
|
|
7
|
+
type: "rotate";
|
|
8
|
+
distanceRads: number;
|
|
9
|
+
} | {
|
|
10
|
+
type: "translate";
|
|
11
|
+
distanceMm: number;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Compute the target TCP pose for a single incremental cartesian jog step.
|
|
15
|
+
*
|
|
16
|
+
* The motion is a fixed translation (mm) or rotation (rad) along/around one
|
|
17
|
+
* cartesian axis. When `useToolCoordinateSystem` is false the axis is
|
|
18
|
+
* interpreted in the coordinate system frame (base/world, or the coordinate
|
|
19
|
+
* system given by `coordinateSystemRotation`); when true it is interpreted in
|
|
20
|
+
* the tool frame, i.e. relative to the current TCP orientation.
|
|
21
|
+
*
|
|
22
|
+
* This mirrors the `use_tool_coordinate_system` flag used for continuous
|
|
23
|
+
* jogging, but here the target pose has to be resolved on the client because
|
|
24
|
+
* the motion is planned as a trajectory to an absolute pose.
|
|
25
|
+
*/
|
|
26
|
+
export declare function computeIncrementalTargetPose({ currentTcpPose, axis, direction, motion, useToolCoordinateSystem, coordinateSystemRotation, }: {
|
|
27
|
+
currentTcpPose: Pose;
|
|
28
|
+
axis: JoggingAxis;
|
|
29
|
+
direction: JoggingDirection;
|
|
30
|
+
motion: IncrementalMotion;
|
|
31
|
+
useToolCoordinateSystem: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Rotation of the coordinate system whose axes the motion follows, relative
|
|
34
|
+
* to the base frame of `currentTcpPose`. Ignored in tool orientation.
|
|
35
|
+
*/
|
|
36
|
+
coordinateSystemRotation?: Quaternion;
|
|
37
|
+
}): {
|
|
38
|
+
position?: number[];
|
|
39
|
+
orientation?: number[];
|
|
40
|
+
};
|
|
@@ -1,6 +1,33 @@
|
|
|
1
1
|
import type { MotionGroupState, Pose } from "@wandelbots/nova-js/v2";
|
|
2
2
|
import type { Vector3Simple } from "./JoggerConnection";
|
|
3
|
+
/**
|
|
4
|
+
* Whether two sets of joint values are the same within `changeDeltaThreshold`:
|
|
5
|
+
* a different number of joints is never the same
|
|
6
|
+
*/
|
|
3
7
|
export declare function jointValuesEqual(oldJointValues: number[], newJointValues: number[], changeDeltaThreshold: number): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Like {@link jointValuesEqual}, but a change of the number of joints counts
|
|
10
|
+
* as unchanged: the dedupe of a motion stream, where another number of joints
|
|
11
|
+
* means another motion group, which the stream handles on its own. Not for
|
|
12
|
+
* real equality checks.
|
|
13
|
+
*/
|
|
14
|
+
export declare function jointValuesUnchanged(oldJointValues: number[], newJointValues: number[], changeDeltaThreshold: number): boolean;
|
|
4
15
|
export declare function poseEqual(oldTcp: Pose | undefined, newTcp: Pose | undefined, changeDeltaThreshold: number): boolean;
|
|
5
16
|
export declare function tcpMotionEqual(oldMotionState: MotionGroupState, newMotionState: MotionGroupState, changeDeltaThreshold: number): boolean;
|
|
6
17
|
export declare function unwrapRotationVector(newRotationVectorApi: Vector3Simple, currentRotationVectorApi: Vector3Simple): Vector3Simple;
|
|
18
|
+
/** The part of a motion state that pose readouts show */
|
|
19
|
+
export type MotionStateReadout = Pick<MotionGroupState, "joint_position" | "tcp_pose" | "tcp" | "coordinate_system">;
|
|
20
|
+
/**
|
|
21
|
+
* The part of a motion state that pose readouts show, snapshotted so that
|
|
22
|
+
* {@link readoutsEqual} can compare the held reading with the next one. The
|
|
23
|
+
* streams replace these fields instead of mutating them, which keeps a held
|
|
24
|
+
* snapshot intact.
|
|
25
|
+
*/
|
|
26
|
+
export declare function readoutOf(motionState: MotionGroupState): MotionStateReadout;
|
|
27
|
+
/**
|
|
28
|
+
* The `equals` of a computed readout: it keeps showing the reading it holds
|
|
29
|
+
* until a joint moved more than `JOINT_NOISE_THRESHOLD` (0.0002 rad) from it, or the
|
|
30
|
+
* TCP or coordinate system changed. Slow movement adds up against the held
|
|
31
|
+
* reading, so it still shows.
|
|
32
|
+
*/
|
|
33
|
+
export declare function readoutsEqual(shown: MotionStateReadout, next: MotionStateReadout): boolean;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Nova } from "@wandelbots/nova-js/v2";
|
|
2
|
+
/**
|
|
3
|
+
* How the library connects to a NOVA instance: the base URL of the
|
|
4
|
+
* instance, or a NOVA client of the app (`Nova` of `@wandelbots/nova-js`,
|
|
5
|
+
* also of another version than the library's).
|
|
6
|
+
*
|
|
7
|
+
* The library reads only the URL and the access token of the app's client,
|
|
8
|
+
* and connects with its own client of its own nova-js version. So a newer
|
|
9
|
+
* or older nova-js in the app does not change the library.
|
|
10
|
+
*/
|
|
11
|
+
export type NovaConnection = string | {
|
|
12
|
+
readonly config: {
|
|
13
|
+
readonly instanceUrl: string;
|
|
14
|
+
readonly accessToken?: string;
|
|
15
|
+
/** The cell of the cell-scoped `NovaClient` of older nova-js versions */
|
|
16
|
+
readonly cellId?: string;
|
|
17
|
+
};
|
|
18
|
+
readonly accessToken?: string | null;
|
|
19
|
+
};
|
|
20
|
+
/** The library's own NOVA client for a connection */
|
|
21
|
+
export declare function createNovaClient(connection: NovaConnection): Nova;
|
|
22
|
+
/** The cell of a cell-scoped client of an older nova-js version, if any */
|
|
23
|
+
export declare function cellIdOf(connection: NovaConnection): string | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The translation key that explains why the planner rejected a target, from
|
|
3
|
+
* the `errorFeedbackName` of a rejected `TrajectoryExecutionStore.planTrajectory`
|
|
4
|
+
* (e.g. "FeedbackOutOfWorkspace"). Reachability-type failures share one
|
|
5
|
+
* message; anything unrecognized gets the generic fallback. The texts are in
|
|
6
|
+
* the library's `i18n`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function planErrorTranslationKey(errorFeedbackName: string): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { OrientationType } from "@wandelbots/nova-js/v2";
|
|
2
|
+
import { Quaternion, Vector3 } from "three";
|
|
3
|
+
/**
|
|
4
|
+
* The quaternion of an orientation of the NOVA API. Supports rotation
|
|
5
|
+
* vectors and quaternions; any other type warns and gives no rotation.
|
|
6
|
+
*/
|
|
7
|
+
export declare function parseRotationToQuaternion(orientation?: Array<number>, orientationType?: OrientationType): Quaternion;
|
|
8
|
+
/**
|
|
9
|
+
* Convert a quaternion to a [rad, rad, rad] rotation vector
|
|
10
|
+
* See https://code.wabo.run/robotics/wb-robotix/-/blob/develop/src/math/core/include/wb/math/QuaternionBasePlugin.h
|
|
11
|
+
*/
|
|
12
|
+
export declare function quaternionToRotationVector(q: Quaternion): Vector3;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wandelbots/wandelbots-js-react-components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.0-pr.chore-playground-tool-steps.664.4537d63",
|
|
4
4
|
"description": "React UI toolkit for building applications on top of the Wandelbots platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -36,22 +36,19 @@
|
|
|
36
36
|
},
|
|
37
37
|
"types": "./dist/index.d.ts",
|
|
38
38
|
"scripts": {
|
|
39
|
-
"
|
|
39
|
+
"playground": "vite --config playground/vite.config.ts",
|
|
40
|
+
"playground:build": "vite build --config playground/vite.config.ts",
|
|
41
|
+
"playground:preview": "vite preview --config playground/vite.config.ts",
|
|
40
42
|
"dev:pack": "nodemon -V -w src -e '*' -x \"pnpm run build && pnpm pack\"",
|
|
41
43
|
"dev:build": "nodemon -V -w src -e '*' -x \"vite build && tsc --declaration --emitDeclarationOnly\"",
|
|
42
|
-
"dev:wbjs": "nodemon --watch $WBJS_PATH -e tgz --exec 'pnpm install file:$WBJS_PATH &&
|
|
43
|
-
"tsc": "tsc --pretty --noEmit -p
|
|
44
|
-
"test": "test-storybook --url http://127.0.0.1:6006 --index-json --browsers chromium",
|
|
44
|
+
"dev:wbjs": "nodemon --watch $WBJS_PATH -e tgz --exec 'pnpm install file:$WBJS_PATH && pnpm run playground'",
|
|
45
|
+
"tsc": "tsc --pretty --noEmit -p playground/tsconfig.json",
|
|
45
46
|
"test:unit": "vitest --workspace vitest.workspace.ts --project unit",
|
|
46
47
|
"test:unit:run": "vitest run --workspace vitest.workspace.ts --project unit",
|
|
47
48
|
"test:consumer": "pnpm run build && vitest run --workspace vitest.workspace.ts --project consumer",
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"ci:test:built": "run-p --race ci:test:server ci:test:runner",
|
|
51
|
-
"ci:test:server": "http-server storybook-static --port 9009 --silent",
|
|
52
|
-
"ci:test:runner": "wait-on tcp:127.0.0.1:9009 && test-storybook --url http://127.0.0.1:9009 --index-json --browsers chromium",
|
|
49
|
+
"test:e2e": "vitest run --workspace vitest.workspace.ts --project e2e",
|
|
50
|
+
"test:playground": "pnpm run playground:build && playwright test",
|
|
53
51
|
"build": "rimraf dist && vite build && tsc --declaration --emitDeclarationOnly",
|
|
54
|
-
"build-storybook": "storybook build",
|
|
55
52
|
"api:update": "pnpm run build && tsx scripts/api-extractor.ts --local",
|
|
56
53
|
"api:check": "tsx scripts/api-extractor.ts",
|
|
57
54
|
"api:check-breaking": "tsx scripts/check-breaking-api.ts",
|
|
@@ -81,70 +78,50 @@
|
|
|
81
78
|
"@microsoft/api-extractor": "^7.58.7",
|
|
82
79
|
"@mui/icons-material": "^7.3.7",
|
|
83
80
|
"@mui/material": "^7.3.7",
|
|
81
|
+
"@playwright/test": "^1.59.1",
|
|
84
82
|
"@react-three/drei": "^10.2.0",
|
|
85
83
|
"@react-three/fiber": "^9.1.2",
|
|
86
|
-
"@rollup/plugin-commonjs": "^29.0.0",
|
|
87
|
-
"@rollup/plugin-json": "^6.1.0",
|
|
88
|
-
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
89
|
-
"@rollup/plugin-terser": "^0.4.4",
|
|
90
|
-
"@rollup/plugin-typescript": "^12.1.2",
|
|
91
|
-
"@storybook/addon-docs": "^10.2.3",
|
|
92
|
-
"@storybook/react": "^10.3.5",
|
|
93
|
-
"@storybook/react-vite": "^10.2.3",
|
|
94
|
-
"@storybook/test-runner": "^0.24.1",
|
|
95
|
-
"@svgr/rollup": "^8.1.0",
|
|
96
84
|
"@testing-library/jest-dom": "^6.6.3",
|
|
97
85
|
"@testing-library/react": "^16.3.2",
|
|
98
|
-
"@testing-library/user-event": "^14.6.1",
|
|
99
86
|
"@types/lodash": "^4.17.24",
|
|
100
87
|
"@types/lodash-es": "^4.17.12",
|
|
101
88
|
"@types/react": "^19.1.8",
|
|
89
|
+
"@types/react-dom": "~19.2.7",
|
|
102
90
|
"@types/three": "^0.182.0",
|
|
103
91
|
"@vitejs/plugin-react": "^4.3.4",
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
92
|
+
"@wandelbots/fonts": "^1.2.0",
|
|
93
|
+
"@wandelbots/mui": "^2.0.1",
|
|
94
|
+
"dotenv": "^17.2.3",
|
|
107
95
|
"husky": "^9.1.7",
|
|
108
|
-
"i18next": "^25.7.4",
|
|
109
|
-
"jest-simple-dot-reporter": "^1.0.5",
|
|
110
|
-
"jest-summary-reporter": "^0.0.2",
|
|
111
96
|
"jsdom": "^27.4.0",
|
|
97
|
+
"mobx": "^6.13.6",
|
|
98
|
+
"mobx-react-lite": "^4.1.0",
|
|
112
99
|
"nodemon": "^3.1.9",
|
|
113
|
-
"npm-run-all": "^4.1.5",
|
|
114
|
-
"playwright": "^1.59.1",
|
|
115
|
-
"postcss": "^8.5.3",
|
|
116
|
-
"prop-types": "^15.8.1",
|
|
117
100
|
"react": "^19.1.0",
|
|
118
101
|
"react-dom": "^19.1.0",
|
|
119
102
|
"rimraf": "^6.0.1",
|
|
120
|
-
"rollup": "^4.55.1",
|
|
121
|
-
"rollup-plugin-dts": "^6.1.1",
|
|
122
|
-
"rollup-plugin-gltf": "^4.0.0",
|
|
123
|
-
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
124
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
125
103
|
"semantic-release": "^25.0.2",
|
|
126
|
-
"storybook": "^10.2.3",
|
|
127
|
-
"storybook-preset-inline-svg": "^2.0.0",
|
|
128
104
|
"three": "^0.182.0",
|
|
129
105
|
"three-stdlib": "^2.35.14",
|
|
130
|
-
"ts-dedent": "^2.2.0",
|
|
131
106
|
"tsx": "^4.21.0",
|
|
132
107
|
"typescript": "^5.8.2",
|
|
133
|
-
"
|
|
108
|
+
"username": "^7.0.0",
|
|
134
109
|
"vite": "^6.2.0",
|
|
135
110
|
"vite-plugin-svgr": "^4.3.0",
|
|
136
|
-
"vitest": "^3.0.7"
|
|
137
|
-
"wait-on": "^9.0.3"
|
|
111
|
+
"vitest": "^3.0.7"
|
|
138
112
|
},
|
|
139
113
|
"peerDependencies": {
|
|
140
114
|
"@emotion/react": "^11.11.1",
|
|
141
115
|
"@emotion/styled": "^11.11.0",
|
|
142
|
-
"@mui/icons-material": "^
|
|
143
|
-
"@mui/material": "^
|
|
144
|
-
"@react-three/drei": "^
|
|
145
|
-
"@react-three/fiber": "^
|
|
146
|
-
"
|
|
147
|
-
"
|
|
116
|
+
"@mui/icons-material": "^7",
|
|
117
|
+
"@mui/material": "^7",
|
|
118
|
+
"@react-three/drei": "^10",
|
|
119
|
+
"@react-three/fiber": "^9",
|
|
120
|
+
"@wandelbots/mui": "^2.0.0",
|
|
121
|
+
"mobx": "^6.13.6",
|
|
122
|
+
"mobx-react-lite": "^4.1.0",
|
|
123
|
+
"react": "^19.0.0",
|
|
124
|
+
"react-dom": "^19.0.0",
|
|
148
125
|
"three": ">=0.182",
|
|
149
126
|
"three-stdlib": ">=2"
|
|
150
127
|
},
|
|
@@ -166,26 +143,14 @@
|
|
|
166
143
|
}
|
|
167
144
|
},
|
|
168
145
|
"dependencies": {
|
|
169
|
-
"@
|
|
170
|
-
"@
|
|
171
|
-
"@wandelbots/
|
|
172
|
-
"@wandelbots/mui": "^1.0.1",
|
|
173
|
-
"@wandelbots/nova-js": "3.10.0-pr.295.cb733a7",
|
|
146
|
+
"@wandelbots/design-tokens": "^3.5.0",
|
|
147
|
+
"@wandelbots/icons": "^2.2.0",
|
|
148
|
+
"@wandelbots/nova-js": "4.13.0",
|
|
174
149
|
"axios": "^1.15.0",
|
|
175
|
-
"
|
|
150
|
+
"i18next": "^25.7.4",
|
|
176
151
|
"i18next-browser-languagedetector": "^8.2.0",
|
|
177
152
|
"lodash-es": "^4.17.21",
|
|
178
|
-
"mobx": "^6.13.6",
|
|
179
|
-
"mobx-react-lite": "^4.1.0",
|
|
180
153
|
"react-error-boundary": "^6.0.3",
|
|
181
|
-
"react-i18next": "^16.5.2"
|
|
182
|
-
"username": "^7.0.0"
|
|
183
|
-
},
|
|
184
|
-
"pnpm": {
|
|
185
|
-
"overrides": {
|
|
186
|
-
"storybook": "$storybook",
|
|
187
|
-
"handlebars": "^4.7.9",
|
|
188
|
-
"minimatch@<3.1.3": "^3.1.3"
|
|
189
|
-
}
|
|
154
|
+
"react-i18next": "^16.5.2"
|
|
190
155
|
}
|
|
191
156
|
}
|
package/dist/Setup.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type CanvasProps } from "@react-three/fiber";
|
|
2
|
-
import type * as React from "react";
|
|
3
|
-
import { Vector3 } from "three";
|
|
4
|
-
type Props = React.PropsWithChildren<CanvasProps & {
|
|
5
|
-
cameraFov?: number;
|
|
6
|
-
cameraPosition?: Vector3;
|
|
7
|
-
controls?: boolean;
|
|
8
|
-
lights?: boolean;
|
|
9
|
-
}>;
|
|
10
|
-
export declare const Setup: ({ children, cameraFov, cameraPosition, controls, lights, ...restProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export {};
|