@wandelbots/wandelbots-js-react-components 6.4.0-pr.revamp.667.bd2ec84 → 6.4.0-pr.revamp.667.ca77f09
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 +172 -40
- package/dist/3d.cjs +1 -1
- package/dist/3d.d.ts +3 -4
- package/dist/3d.js +35 -38
- package/dist/CurrentPose/index.cjs +1 -1
- package/dist/CurrentPose/index.js +2 -2
- package/dist/CurrentPoseBar/index.cjs +1 -1
- package/dist/CurrentPoseBar/index.js +1 -1
- package/dist/JoggingButtons/index.cjs +1 -1
- package/dist/JoggingButtons/index.js +1 -1
- package/dist/JoggingGizmo/index.cjs +1 -1
- package/dist/JoggingGizmo/index.js +2 -2
- package/dist/JoggingJointSlider/index.cjs +1 -1
- package/dist/JoggingJointSlider/index.js +1 -1
- package/dist/RobotControl/index.cjs +1 -1
- package/dist/RobotControl/index.js +2 -2
- package/dist/RobotControlPanel/index.cjs +1 -1
- package/dist/RobotControlPanel/index.d.ts +1 -1
- package/dist/RobotControlPanel/index.js +1 -1
- package/dist/RobotHeader/index.cjs +1 -1
- package/dist/RobotHeader/index.d.ts +3 -5
- package/dist/RobotHeader/index.js +6 -7
- package/dist/RobotScene/index.cjs +1 -1
- package/dist/RobotScene/index.js +3 -3
- package/dist/RobotView/index.cjs +1 -1
- package/dist/RobotView/index.js +2 -2
- package/dist/SafetyBar/IndicatorWithExplanation.d.ts +12 -1
- package/dist/SafetyBar/SafetyBar.d.ts +15 -1
- package/dist/SafetyBar/index.cjs +1 -1
- package/dist/SafetyBar/index.d.ts +0 -1
- package/dist/SafetyBar/index.js +3 -4
- package/dist/SafetyBar/robotSafetyOf.d.ts +1 -0
- package/dist/chunks/{ConnectedMotionGroup-BifrgwV1.js → ConnectedMotionGroup-DNYakgxy.js} +6 -5
- package/dist/chunks/ConnectedMotionGroup-IRTsTxwB.cjs +3 -0
- package/dist/chunks/{CurrentPose-CMqO8oqX.cjs → CurrentPose-CAq9e9JY.cjs} +1 -1
- package/dist/chunks/{CurrentPose-CdD2ZB7B.js → CurrentPose-CgdINEh2.js} +3 -3
- package/dist/chunks/{CurrentPoseBar-CX1xFBtm.js → CurrentPoseBar--HkZBGnN.js} +11 -11
- package/dist/chunks/{CurrentPoseBar-BTBAwIO4.cjs → CurrentPoseBar-DoOUfRRs.cjs} +1 -1
- package/dist/chunks/{JoggingButtons-aijK-3g6.js → JoggingButtons-BNOnpcTH.js} +1 -1
- package/dist/chunks/{JoggingButtons-BOHl7hVq.cjs → JoggingButtons-Boaym2hQ.cjs} +1 -1
- package/dist/chunks/{JoggingGizmo-CoKYUtXq.cjs → JoggingGizmo-CNFjpWDv.cjs} +1 -1
- package/dist/chunks/{JoggingGizmo-DHvrJouR.js → JoggingGizmo-RDiEVQes.js} +1 -1
- package/dist/chunks/{JoggingGizmoOrientation-CIvIAIeO.js → JoggingGizmoOrientation-Dzzz2gEz.js} +1 -1
- package/dist/chunks/{JoggingGizmoOrientation-DVcagPRJ.cjs → JoggingGizmoOrientation-laUrgY0N.cjs} +1 -1
- package/dist/chunks/{JoggingJointSlider-DQtt4-pa.js → JoggingJointSlider-BY-Tof8G.js} +1 -1
- package/dist/chunks/{JoggingJointSlider-CTFYKzsU.cjs → JoggingJointSlider-Dm3vILd3.cjs} +1 -1
- package/dist/chunks/{JoggingRefusedError-BIkUM6-g.js → JoggingRefusedError-C4D8_YR_.js} +5 -3
- package/dist/chunks/JoggingRefusedError-DqyrfUcc.cjs +1 -0
- package/dist/chunks/Pose3-BfBNPRDM.cjs +1 -0
- package/dist/chunks/{Pose3-B_fLR-Wv.js → Pose3-DWxfC6Dj.js} +1 -2
- package/dist/chunks/{Robot-C-IWfxP9.js → Robot-B-VAYuAr.js} +5 -5
- package/dist/chunks/{Robot-Cfhjv9Z8.cjs → Robot-DRf8T9Zf.cjs} +1 -1
- package/dist/chunks/RobotActivation-CRVxXvlx.cjs +1 -0
- package/dist/chunks/RobotActivation-oR-8Y0iq.js +143 -0
- package/dist/chunks/RobotControl-Dbe50ZKM.cjs +1 -0
- package/dist/chunks/RobotControl-Ms1F7fFe.js +332 -0
- package/dist/chunks/RobotControlPanel-B7NxoHsO.cjs +1 -0
- package/dist/chunks/RobotControlPanel-CkQlkq8x.js +1029 -0
- package/dist/chunks/RobotHeader-CjOaf9s6.cjs +1 -0
- package/dist/chunks/RobotHeader-LSuRTDFB.js +395 -0
- package/dist/chunks/RobotScene-Au6zpHH1.cjs +1 -0
- package/dist/chunks/RobotScene-C6XEgaVR.js +1284 -0
- package/dist/chunks/RobotSessionProvider-CoF_tX0O.cjs +1 -0
- package/dist/chunks/RobotSessionProvider-DuHi-dtw.js +30 -0
- package/dist/chunks/{RobotView-BGYlAWj-.cjs → RobotView-Cg6JfGiY.cjs} +1 -1
- package/dist/chunks/{RobotView-D-v8jCM7.js → RobotView-CrAxNkyG.js} +3 -3
- package/dist/chunks/{robotSafetyOf-DuKKma1_.js → SafetyBar-C85BAKsL.js} +244 -215
- package/dist/chunks/SafetyBar-D2l81Omq.cjs +1 -0
- package/dist/chunks/externalizeComponent-CA_sHzyH.cjs +2 -0
- package/dist/chunks/{externalizeComponent-4juwPKL5.js → externalizeComponent-CChY_1bN.js} +34 -8
- package/dist/chunks/{useSmoothedMotionState-BSSV8aZN.js → hooks-BWoeBWLV.js} +43 -87
- package/dist/chunks/hooks-BXe2bNMo.cjs +1 -0
- package/dist/chunks/loadRobotSession-BzY9H3F8.cjs +1 -0
- package/dist/chunks/{loadRobotSession-GHHtv5dv.js → loadRobotSession-Ts2MumBB.js} +1065 -679
- package/dist/chunks/poseText-BxG4Caa-.js +48 -0
- package/dist/chunks/poseText-CwplkbDM.cjs +1 -0
- package/dist/chunks/useSmoothedMotionState-CCXmMZ0S.cjs +1 -0
- package/dist/chunks/useSmoothedMotionState-CELh-YJa.js +50 -0
- package/dist/components/VelocitySlider.d.ts +14 -1
- package/dist/components/connectionWarning/ConnectionWarning.d.ts +18 -4
- package/dist/components/connectionWarning/connectionWarningOf.d.ts +1 -11
- package/dist/components/jogging/JoggingCartesianAxisControl.d.ts +7 -1
- package/dist/components/jogging/JoggingCartesianTab.d.ts +6 -0
- package/dist/components/jogging/JoggingJointTab.d.ts +5 -0
- package/dist/components/jogging/JoggingJointValueControl.d.ts +7 -1
- package/dist/components/jogging/JoggingPanel.d.ts +11 -0
- package/dist/components/jogging/JoggingRefusedError.d.ts +8 -3
- package/dist/components/jogging/JoggingStore.d.ts +206 -17
- package/dist/components/jogging/joggingColors.d.ts +6 -0
- package/dist/components/robotControl/CartesianJogTab.d.ts +14 -3
- package/dist/components/robotControl/JogArea.d.ts +6 -3
- package/dist/components/robotControl/JogDisabledReason.d.ts +15 -0
- package/dist/components/robotControl/JointJogTab.d.ts +10 -2
- package/dist/components/robotControl/MoveToTab.d.ts +24 -3
- package/dist/components/robotControl/PoseField.d.ts +3 -1
- package/dist/components/robotControl/RobotControl.d.ts +3 -0
- package/dist/components/robotControl/RobotControlPanel.d.ts +91 -22
- package/dist/components/robotControl/VelocityRow.d.ts +8 -2
- package/dist/components/robotControl/atPose.d.ts +6 -0
- package/dist/components/robotControl/poseText.d.ts +13 -1
- package/dist/components/robotControl/units.d.ts +10 -2
- package/dist/components/robotControl/useRobotControlProps.d.ts +7 -4
- package/dist/components/robotControl/velocityText.d.ts +18 -0
- package/dist/components/robotHeader/ActivationSwitch.d.ts +13 -2
- package/dist/components/robotHeader/RobotHeader.d.ts +25 -4
- package/dist/components/robotHeader/robotActivationOf.d.ts +1 -8
- package/dist/components/robotScene/RobotScene.d.ts +7 -1
- package/dist/components/robots/MotionGroupVisualizer.d.ts +6 -4
- package/dist/components/robots/SupportedLinearAxis.d.ts +6 -4
- package/dist/components/robots/SupportedRobot.d.ts +7 -5
- package/dist/components/robots/useFrameSmoothedMotionState.d.ts +25 -0
- package/dist/components/utils/useSmoothedMotionState.d.ts +11 -2
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +8 -10
- package/dist/core.js +60 -69
- package/dist/index.cjs +1 -1
- package/dist/index.js +100 -113
- package/dist/lib/ConnectedMotionGroup.d.ts +11 -0
- package/dist/lib/ControllerStateStream.d.ts +9 -9
- package/dist/lib/JoggerConnection.d.ts +48 -13
- package/dist/lib/MotionStreamConnection.d.ts +3 -2
- package/dist/lib/TrajectoryExecutionStore.d.ts +58 -20
- package/dist/lib/controllerStateSource.d.ts +6 -5
- package/dist/lib/robotSession/RobotActivation.d.ts +52 -21
- package/dist/lib/robotSession/RobotSession.d.ts +27 -8
- package/dist/lib/robotSession/RobotTargetPose.d.ts +4 -2
- package/dist/lib/robotSession/loadRobotSession.d.ts +1 -1
- package/dist/lib/robotSession/robotPose.d.ts +0 -6
- package/dist/session.cjs +1 -1
- package/dist/session.d.ts +6 -6
- package/dist/session.js +30 -38
- package/package.json +22 -1
- package/dist/chunks/ConnectedMotionGroup-CybwJHkh.cjs +0 -3
- package/dist/chunks/JoggingRefusedError-BuCGsVsa.cjs +0 -1
- package/dist/chunks/Pose3-Ch4xVeXV.cjs +0 -1
- package/dist/chunks/RobotActivation-Bb0oNSBN.cjs +0 -1
- package/dist/chunks/RobotActivation-C0rrwpQZ.js +0 -115
- package/dist/chunks/RobotControl-Cv6Sr1Ni.js +0 -289
- package/dist/chunks/RobotControl-DFnOYMAa.cjs +0 -1
- package/dist/chunks/RobotControlPanel-B1_9g9D-.js +0 -850
- package/dist/chunks/RobotControlPanel-BpTpRBgy.cjs +0 -1
- package/dist/chunks/RobotScene-0ZJzXL50.cjs +0 -1
- package/dist/chunks/RobotScene-DpFeFpnx.js +0 -1255
- package/dist/chunks/RobotSessionProvider--AekyPqD.cjs +0 -1
- package/dist/chunks/RobotSessionProvider-TVaKGzqa.js +0 -25
- package/dist/chunks/externalizeComponent-Br_U-QAr.cjs +0 -2
- package/dist/chunks/loadRobotSession-DYbeNnTI.cjs +0 -1
- package/dist/chunks/poseText-BXUaQWnK.cjs +0 -1
- package/dist/chunks/poseText-pg4cxE8R.js +0 -41
- package/dist/chunks/robotActivationOf-B4oV10Za.cjs +0 -1
- package/dist/chunks/robotActivationOf-EzcT9g07.js +0 -368
- package/dist/chunks/robotSafetyOf-Dxm6s7Pp.cjs +0 -1
- package/dist/chunks/useSmoothedMotionState-B9WO73k0.cjs +0 -1
- package/dist/components/robotHeader/robotSafetyOf.d.ts +0 -11
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
1
2
|
import { type JogView } from "./JogArea";
|
|
2
3
|
import { type JogMode } from "./JogModeToggle";
|
|
3
4
|
import type { JogMotion, RobotControlPanelProps } from "./RobotControlPanel";
|
|
@@ -8,14 +9,24 @@ export type CartesianJogSettings = {
|
|
|
8
9
|
/** The chosen step size of each motion, as an index into its steps */
|
|
9
10
|
step: Record<JogMotion, number>;
|
|
10
11
|
};
|
|
11
|
-
type CartesianJogTabProps = Omit<RobotControlPanelProps, "onClose" | "joints"> & {
|
|
12
|
+
type CartesianJogTabProps = Omit<RobotControlPanelProps, "onClose" | "joints" | "jogDisabledReason" | "onJogRetry"> & {
|
|
12
13
|
motion: JogMotion;
|
|
13
14
|
settings: CartesianJogSettings;
|
|
14
15
|
onSettingsChange: (settings: CartesianJogSettings) => void;
|
|
16
|
+
/** Why jogging is off, as the panel shows it: in place of the hint */
|
|
17
|
+
jogDisabledReason?: ReactNode;
|
|
15
18
|
};
|
|
16
19
|
/**
|
|
17
20
|
* The Translate and Rotate tabs: the TCP and the frame to jog along, the
|
|
18
|
-
* jog mode, velocity and step size, and the gizmo or the buttons
|
|
21
|
+
* jog mode, velocity and step size, and the gizmo or the buttons.
|
|
22
|
+
*
|
|
23
|
+
* `jogDisabled` turns off what moves the robot, the gizmo or the buttons,
|
|
24
|
+
* and the TCP select, whose change needs the jogging connection as a jog
|
|
25
|
+
* does. The settings that move nothing stay usable: the frame to jog along,
|
|
26
|
+
* the jog mode, the velocity and the step size are the user's to prepare
|
|
27
|
+
* while the robot may not move. A running step (`increments.running`) turns
|
|
28
|
+
* off the same as `jogDisabled`: only one step runs at a time. `disabled`
|
|
29
|
+
* turns off everything.
|
|
19
30
|
*/
|
|
20
|
-
export declare function CartesianJogTab({ motion, settings, onSettingsChange, disabled, tcp, jogFrame, velocity, onVelocityChange, onJogStart, onJogStop, increments, gizmoOrientation, gizmoFrameQuaternion, }: CartesianJogTabProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare function CartesianJogTab({ motion, settings, onSettingsChange, disabled, jogDisabled, tcp, jogFrame, velocity, onVelocityChange, onJogStart, onJogStop, increments, jogDisabledReason, gizmoOrientation, gizmoFrameQuaternion, }: CartesianJogTabProps): import("react/jsx-runtime").JSX.Element;
|
|
21
32
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type RefObject } from "react";
|
|
1
|
+
import { type ReactNode, type RefObject } from "react";
|
|
2
2
|
import type { Quaternion } from "three";
|
|
3
3
|
import type { JogControlsProps } from "../jogging/useJogControls";
|
|
4
4
|
import type { JogMode } from "./JogModeToggle";
|
|
@@ -10,6 +10,8 @@ type JogAreaProps = {
|
|
|
10
10
|
mode: JogMode;
|
|
11
11
|
/** The props of the gizmo or the buttons, whichever is shown */
|
|
12
12
|
controls: JogControlsProps;
|
|
13
|
+
/** Why jogging is off: shown in place of the hint of how to jog */
|
|
14
|
+
disabledReason?: ReactNode;
|
|
13
15
|
/**
|
|
14
16
|
* Without it, there is no gizmo: the buttons, and no switch. Nor is there
|
|
15
17
|
* one when the browser cannot draw it (no WebGL).
|
|
@@ -19,7 +21,8 @@ type JogAreaProps = {
|
|
|
19
21
|
};
|
|
20
22
|
/**
|
|
21
23
|
* Where the jog controls go: the gizmo or the buttons, a switch between the
|
|
22
|
-
* two in the corner, and a hint saying how to jog with what is shown
|
|
24
|
+
* two in the corner, and a hint saying how to jog with what is shown, or
|
|
25
|
+
* why jogging is off
|
|
23
26
|
*/
|
|
24
|
-
export declare function JogArea({ view, onViewChange, mode, controls, gizmoOrientation, gizmoFrameQuaternion, }: JogAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare function JogArea({ view, onViewChange, mode, controls, disabledReason, gizmoOrientation, gizmoFrameQuaternion, }: JogAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
25
28
|
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type JogDisabledReasonProps = {
|
|
2
|
+
/** The reason, in the user's language */
|
|
3
|
+
text: string;
|
|
4
|
+
/** Shows Try again under the reason: the user can end it */
|
|
5
|
+
onRetry?: () => void;
|
|
6
|
+
/** The panel is disabled: Try again is off as every control */
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Why jogging is off, where a jog tab else says how to jog, and Try again
|
|
11
|
+
* for a reason that the user can end. A status, so a screen reader says it
|
|
12
|
+
* when it changes, e.g. at an emergency stop.
|
|
13
|
+
*/
|
|
14
|
+
export declare function JogDisabledReason({ text, onRetry, disabled, }: JogDisabledReasonProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
1
2
|
import type { RobotControlJoints } from "./RobotControlPanel";
|
|
2
3
|
/**
|
|
3
4
|
* The Joint tab: a slider per joint across its limits, and the velocity.
|
|
4
5
|
* One joint jogs at a time: the jogging joint is kept in a ref, which
|
|
5
6
|
* changes at once, so a second finger on another slider in the same frame
|
|
6
|
-
* jogs nothing; the other sliders show as unavailable meanwhile.
|
|
7
|
+
* jogs nothing; the other sliders show as unavailable meanwhile. Under the
|
|
8
|
+
* sliders it says why jogging is off, when the app gives a reason.
|
|
9
|
+
*
|
|
10
|
+
* `jogDisabled` turns off the sliders, which move the robot; the velocity
|
|
11
|
+
* stays the user's to set. `disabled` turns off both.
|
|
7
12
|
*/
|
|
8
|
-
export declare function JointJogTab({ joints, disabled, }: {
|
|
13
|
+
export declare function JointJogTab({ joints, disabled, jogDisabled, disabledReason, }: {
|
|
9
14
|
joints: RobotControlJoints;
|
|
10
15
|
disabled: boolean;
|
|
16
|
+
jogDisabled: boolean;
|
|
17
|
+
/** Why jogging is off, as the panel shows it */
|
|
18
|
+
disabledReason?: ReactNode;
|
|
11
19
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,19 +2,40 @@ import type { RobotControlMoveTo, RobotControlSelect, RobotControlVelocity } fro
|
|
|
2
2
|
type MoveToTabProps = {
|
|
3
3
|
moveTo: RobotControlMoveTo;
|
|
4
4
|
tcp?: RobotControlSelect;
|
|
5
|
+
/** The robot takes poses of the TCP: else it moves to joint values only */
|
|
6
|
+
cartesian: boolean;
|
|
7
|
+
/** The joints are linear axes, in mm and mm/s */
|
|
8
|
+
linear: boolean;
|
|
9
|
+
/** The velocity of a move to a pose of the TCP, in mm/s */
|
|
5
10
|
velocity: RobotControlVelocity;
|
|
6
11
|
onVelocityChange: (value: number) => void;
|
|
12
|
+
/** The velocity of a move to joint values: rad/s, or mm/s for linear axes */
|
|
13
|
+
jointVelocity: {
|
|
14
|
+
velocity: RobotControlVelocity;
|
|
15
|
+
onChange: (value: number) => void;
|
|
16
|
+
};
|
|
7
17
|
disabled: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Turns off the TCP select: its change needs the jogging connection, as
|
|
20
|
+
* on the jog tabs (`jogDisabled` of the panel)
|
|
21
|
+
*/
|
|
22
|
+
jogDisabled: boolean;
|
|
8
23
|
};
|
|
9
24
|
/**
|
|
10
|
-
* The Move to tab: the TCP, the target
|
|
11
|
-
* the velocity, and the Move to button, off until
|
|
25
|
+
* The Move to tab: the TCP, the target and the frame it is relative to,
|
|
26
|
+
* the velocity, and the Move to button, off until what was typed is the
|
|
12
27
|
* target; Reset shows with a target, and Plan again while the app gives an
|
|
13
28
|
* `error` for it (it could not be planned, or the move to it failed). It
|
|
14
29
|
* works as RobotPad's pose field and its TargetPoseStore: the
|
|
15
30
|
* field shows the TCP's current pose until a typed pose is saved; a move
|
|
16
31
|
* that took the TCP there ends with the current pose shown again, once the
|
|
17
32
|
* button is let go; another tab shows it again as well.
|
|
33
|
+
*
|
|
34
|
+
* The target is a pose of the TCP, or joint values in square brackets,
|
|
35
|
+
* which RobotPad's field took on its Joint tab. A robot that takes no TCP
|
|
36
|
+
* poses (`cartesian` is false) shows its joints and moves to joint values
|
|
37
|
+
* only. The velocity is the one of the move to the target: the joint
|
|
38
|
+
* velocity for joint values.
|
|
18
39
|
*/
|
|
19
|
-
export declare function MoveToTab({ moveTo, tcp, velocity, onVelocityChange, disabled, }: MoveToTabProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export declare function MoveToTab({ moveTo, tcp, cartesian, linear, velocity, onVelocityChange, jointVelocity, disabled, jogDisabled, }: MoveToTabProps): import("react/jsx-runtime").JSX.Element;
|
|
20
41
|
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
type PoseFieldProps = {
|
|
2
|
+
/** What the field holds, e.g. the coordinates of a pose and their units */
|
|
3
|
+
label: string;
|
|
2
4
|
/** The text shown: the draft while editing, else the target or the live pose */
|
|
3
5
|
text: string;
|
|
4
6
|
editing: boolean;
|
|
@@ -17,5 +19,5 @@ type PoseFieldProps = {
|
|
|
17
19
|
* it shows a pose to copy; Edit pose, or a click on it, makes it editable;
|
|
18
20
|
* Save pose edit (Enter) and Cancel (Escape) end the editing
|
|
19
21
|
*/
|
|
20
|
-
export declare function PoseField({ text, editing, onEdit, onDraftChange, onCancel, onConfirm, canConfirm, error, disabled, }: PoseFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function PoseField({ label, text, editing, onEdit, onDraftChange, onCancel, onConfirm, canConfirm, error, disabled, }: PoseFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
21
23
|
export {};
|
|
@@ -19,5 +19,8 @@ export type RobotControlProps = RobotControlOptions & Partial<RobotControlPanelP
|
|
|
19
19
|
* <RobotControl disabled={appLocked} onClose={closeFlyout} />
|
|
20
20
|
* </RobotSessionProvider>
|
|
21
21
|
* ```
|
|
22
|
+
*
|
|
23
|
+
* Another session gets a new panel: what the panel holds for a robot (a held
|
|
24
|
+
* jog control, a typed pose, its tab) ends with that robot.
|
|
22
25
|
*/
|
|
23
26
|
export declare const RobotControl: import("react").FunctionComponent<RobotControlProps>;
|
|
@@ -39,8 +39,19 @@ export type RobotControlIncrements = {
|
|
|
39
39
|
steps: Record<JogMotion, number[]>;
|
|
40
40
|
/** A control was pressed: jog one step of `distance` */
|
|
41
41
|
onStep: (motion: JogMotion, axis: JogAxis, direction: JogDirection, distance: number) => void;
|
|
42
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* The step that runs now: its control shows as pressed, and the jog
|
|
44
|
+
* controls, the joint sliders and the TCP select are off until it is
|
|
45
|
+
* over, as only one step runs at a time
|
|
46
|
+
*/
|
|
43
47
|
running?: JogHandle | null;
|
|
48
|
+
/**
|
|
49
|
+
* The panel goes away while a step runs (`running`): stop it if the panel
|
|
50
|
+
* started it (`onStep`), as a held jog stops when its control goes away.
|
|
51
|
+
* Not when the tab changes: a step goes on there. Without it, the step
|
|
52
|
+
* runs to its end.
|
|
53
|
+
*/
|
|
54
|
+
onStepStop?: () => void;
|
|
44
55
|
/**
|
|
45
56
|
* The chosen step size of a motion, one of its `steps`. Without it, the
|
|
46
57
|
* panel keeps its own choice (the first step to start with).
|
|
@@ -88,6 +99,15 @@ export type RobotControlPose = {
|
|
|
88
99
|
position: [number, number, number];
|
|
89
100
|
orientation: [number, number, number];
|
|
90
101
|
};
|
|
102
|
+
/**
|
|
103
|
+
* Joint values as a target of Move to, one per joint: in rad, or in mm for
|
|
104
|
+
* a linear axis
|
|
105
|
+
*/
|
|
106
|
+
export type RobotControlJointTarget = {
|
|
107
|
+
joints: number[];
|
|
108
|
+
};
|
|
109
|
+
/** Where Move to goes: a pose of the TCP, or joint values */
|
|
110
|
+
export type RobotControlTarget = RobotControlPose | RobotControlJointTarget;
|
|
91
111
|
/**
|
|
92
112
|
* Where the move to the typed pose is, as RobotPad's trajectory: "planning"
|
|
93
113
|
* the move, "planned" and loaded so that the button can start it, "moving",
|
|
@@ -96,12 +116,17 @@ export type RobotControlPose = {
|
|
|
96
116
|
export type RobotControlMoveState = "idle" | "planning" | "planned" | "moving" | "stopping";
|
|
97
117
|
/**
|
|
98
118
|
* The Move to tab, as RobotPad's pose field: what the app gives to move the
|
|
99
|
-
*
|
|
100
|
-
* a click on the field) makes it editable, and Save pose edit (or Enter)
|
|
101
|
-
* makes
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
119
|
+
* robot to a typed target. The field shows the TCP's current pose; Edit pose
|
|
120
|
+
* (or a click on the field) makes it editable, and Save pose edit (or Enter)
|
|
121
|
+
* makes what was typed the target: a pose of the TCP as
|
|
122
|
+
* `(x, y, z, rx, ry, rz)`, or, with `getCurrentJoints`, joint values as
|
|
123
|
+
* `[j1, …, jn]`. Then Reset and the Move to button show: held for 200 ms, it
|
|
124
|
+
* starts the move; let go, it pauses it. Once a move has taken the robot to
|
|
125
|
+
* the target and it stands still, the field shows the current pose again.
|
|
126
|
+
*
|
|
127
|
+
* A robot that takes no TCP poses (the panel's `cartesian` is false: a
|
|
128
|
+
* linear axis, a turntable) moves to joint values only: the field shows its
|
|
129
|
+
* joints, and reads numbers without brackets as joint values.
|
|
105
130
|
*/
|
|
106
131
|
export type RobotControlMoveTo = {
|
|
107
132
|
/**
|
|
@@ -110,21 +135,39 @@ export type RobotControlMoveTo = {
|
|
|
110
135
|
* fast for a prop.
|
|
111
136
|
*/
|
|
112
137
|
getCurrentPose: () => RobotControlPose | null;
|
|
138
|
+
/**
|
|
139
|
+
* The joints' positions now, in rad, or in mm for a linear axis. A
|
|
140
|
+
* function, as `getCurrentPose`. With it, the field also takes joint
|
|
141
|
+
* values as a target, as many as it returns. Without it, TCP poses only.
|
|
142
|
+
*/
|
|
143
|
+
getCurrentJoints?: () => number[] | null;
|
|
113
144
|
/** The frame the typed pose is relative to ("Relative to"). Without it, no select. */
|
|
114
145
|
frame?: RobotControlSelect;
|
|
115
146
|
/**
|
|
116
|
-
*
|
|
117
|
-
* the button can start it at once.
|
|
118
|
-
*
|
|
119
|
-
*
|
|
147
|
+
* What was typed became the target: plan the move to it and load it, so
|
|
148
|
+
* that the button can start it at once. Joint values come only with
|
|
149
|
+
* `getCurrentJoints`. null: the field shows the current pose again (Reset,
|
|
150
|
+
* the robot arrived, another tab was chosen, or the TCP or the frame
|
|
151
|
+
* changed): drop the plan. A held move gets its `onMoveStop` first.
|
|
120
152
|
*/
|
|
121
|
-
onTargetChange: (
|
|
153
|
+
onTargetChange: (target: RobotControlTarget | null) => void;
|
|
122
154
|
/** Where the move is: the button waits, says Moving… or Stopping… */
|
|
123
155
|
state: RobotControlMoveState;
|
|
124
|
-
/** Why the
|
|
156
|
+
/** Why the robot cannot move to the target, e.g. it is out of reach */
|
|
125
157
|
error?: string | null;
|
|
126
|
-
/**
|
|
127
|
-
|
|
158
|
+
/**
|
|
159
|
+
* Why the robot may not move now, whatever the target, e.g. it is not
|
|
160
|
+
* activated. The field says so with a target and also while one is typed,
|
|
161
|
+
* and Move to stays off. Typing stays possible, since it moves nothing: a
|
|
162
|
+
* typed target still comes (`onTargetChange`), to plan once the robot may
|
|
163
|
+
* move.
|
|
164
|
+
*/
|
|
165
|
+
notMoveableReason?: string | null;
|
|
166
|
+
/**
|
|
167
|
+
* The button was held 200 ms while the move was "planned": start it.
|
|
168
|
+
* `target` is the one that the field shows.
|
|
169
|
+
*/
|
|
170
|
+
onMoveStart: (target: RobotControlTarget) => void;
|
|
128
171
|
/**
|
|
129
172
|
* The button was let go after a start, or the hold ended otherwise (e.g.
|
|
130
173
|
* another tab, or editing another pose): pause the move
|
|
@@ -137,14 +180,36 @@ export type RobotControlMoveTo = {
|
|
|
137
180
|
export type RobotControlPanelProps = {
|
|
138
181
|
/** Shows a close button in the header that calls this */
|
|
139
182
|
onClose?: () => void;
|
|
140
|
-
/**
|
|
183
|
+
/**
|
|
184
|
+
* Disables every control: nothing may move and no setting may change. The
|
|
185
|
+
* app's lock, e.g. while a program runs.
|
|
186
|
+
*/
|
|
141
187
|
disabled?: boolean;
|
|
142
188
|
/**
|
|
143
189
|
* Disables the jogging of the Translate, Rotate and Joint tabs, e.g. while
|
|
144
|
-
*
|
|
145
|
-
*
|
|
190
|
+
* the robot is not activated or a trajectory moves it: the gizmo, the
|
|
191
|
+
* buttons and the joint sliders, and the TCP select (also on Move to),
|
|
192
|
+
* whose change needs the jogging connection as a jog does. The settings
|
|
193
|
+
* that move nothing stay usable, so the user can prepare them: the frame
|
|
194
|
+
* to jog along, Continuous or Increment, the step size and the velocity.
|
|
195
|
+
* Move to's target and button stay usable too: a move of its own must not
|
|
196
|
+
* end because the app locks jogging while it runs.
|
|
146
197
|
*/
|
|
147
198
|
jogDisabled?: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Why jogging is off, in the user's language, e.g. "The robot must be
|
|
201
|
+
* activated first". The Translate and Rotate tabs show it in place of
|
|
202
|
+
* their hint of how to jog, the Joint tab under its joints. The panel
|
|
203
|
+
* shows it whenever it is given: give it while `jogDisabled` (or
|
|
204
|
+
* `disabled`) is set for that reason.
|
|
205
|
+
*/
|
|
206
|
+
jogDisabledReason?: string;
|
|
207
|
+
/**
|
|
208
|
+
* Shows a Try again button under `jogDisabledReason`, for a reason that
|
|
209
|
+
* the user can end: e.g. another client held the jogging connection. The
|
|
210
|
+
* app then drops the reason and lets jogging be tried again.
|
|
211
|
+
*/
|
|
212
|
+
onJogRetry?: () => void;
|
|
148
213
|
/**
|
|
149
214
|
* The robot can jog its TCP along axes: the Translate and Rotate tabs.
|
|
150
215
|
* False for a motion group without an inverse solver, e.g. a linear axis
|
|
@@ -196,8 +261,11 @@ export type RobotControlPanelProps = {
|
|
|
196
261
|
/** The Joint tab. Without it, the panel has none. */
|
|
197
262
|
joints?: RobotControlJoints;
|
|
198
263
|
/**
|
|
199
|
-
* The Move to tab. Without it, the panel has none. It
|
|
200
|
-
* translation velocity
|
|
264
|
+
* The Move to tab. Without it, the panel has none. It shows the velocity
|
|
265
|
+
* of the move to its target: the translation velocity
|
|
266
|
+
* (`velocity.translate`) for a pose of the TCP, and for joint values the
|
|
267
|
+
* velocity of the Joint tab (`joints.velocity`), or without that tab the
|
|
268
|
+
* rotation velocity (`velocity.rotate`).
|
|
201
269
|
*/
|
|
202
270
|
moveTo?: RobotControlMoveTo;
|
|
203
271
|
/** Styles of the panel's box, e.g. its width */
|
|
@@ -208,11 +276,12 @@ export type RobotControlPanelProps = {
|
|
|
208
276
|
* Rotate, and in them the TCP and the frame to jog along, Continuous or
|
|
209
277
|
* Increment, the velocity, the step size, and the gizmo or the buttons; the
|
|
210
278
|
* tab Joint, with a slider per joint and the joint velocity; and the tab
|
|
211
|
-
* Move to, with a target pose
|
|
279
|
+
* Move to, with a target (a pose of the TCP, or joint values) and a button
|
|
280
|
+
* to hold to move there.
|
|
212
281
|
*
|
|
213
282
|
* It moves nothing itself: the app gets the presses (`onJogStart`,
|
|
214
283
|
* `onJogStop`, `increments.onStep`) and keeps the velocity and the selects
|
|
215
284
|
* in its own store. The panel keeps the rest: the tab, the mode, the step
|
|
216
285
|
* size and whether it shows the gizmo or the buttons.
|
|
217
286
|
*/
|
|
218
|
-
export declare const RobotControlPanel: ({ onClose, sx, joints, moveTo, jogDisabled, cartesian, tab: appTab, onTabChange, jogMode, onJogModeChange, ...props }: RobotControlPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
287
|
+
export declare const RobotControlPanel: ({ onClose, sx, joints, moveTo, jogDisabled, jogDisabledReason, onJogRetry, cartesian, tab: appTab, onTabChange, jogMode, onJogModeChange, ...props }: RobotControlPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,8 +7,14 @@ type VelocityRowProps = {
|
|
|
7
7
|
disabled: boolean;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
|
-
* The jog velocity: its label and
|
|
11
|
-
*
|
|
10
|
+
* The jog velocity: its label and a field to type it into, above a slider.
|
|
11
|
+
* Both show mm/s or °/s, the slider in whole units; the app gets NOVA's
|
|
12
|
+
* units (mm/s, rad/s).
|
|
13
|
+
*
|
|
14
|
+
* The field works as RobotPad's: Enter, or leaving the field, applies what
|
|
15
|
+
* was typed. A text that is no velocity of the range is flagged and never
|
|
16
|
+
* corrected: it stays in the field, with what is wrong with it, until it is
|
|
17
|
+
* fixed, Escape brings the applied velocity back, or the slider is moved.
|
|
12
18
|
*/
|
|
13
19
|
export declare function VelocityRow({ motion, velocity, onChange, disabled, }: VelocityRowProps): import("react/jsx-runtime").JSX.Element;
|
|
14
20
|
export {};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { RobotControlPose } from "./RobotControlPanel";
|
|
2
|
+
/**
|
|
3
|
+
* Whether the joints stand at `target`, each within the session's
|
|
4
|
+
* tolerance. Not for a robot that reports no joints, or another number of
|
|
5
|
+
* them.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isAtJoints(current: readonly number[] | null, target: readonly number[]): boolean;
|
|
2
8
|
/**
|
|
3
9
|
* Whether the TCP stands at `target`, within RobotPad's tolerances. The
|
|
4
10
|
* orientations are compared as rotations, not as rotation vectors: a vector
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* (mm for a linear axis). The same format and rules as robot-pad's typed
|
|
5
5
|
* target pose, so a pose copied in one app reads the same in the other.
|
|
6
6
|
*/
|
|
7
|
-
import type { RobotControlPose } from "./RobotControlPanel";
|
|
7
|
+
import type { RobotControlPose, RobotControlTarget } from "./RobotControlPanel";
|
|
8
8
|
/**
|
|
9
9
|
* A pose as text: position to 0.1 mm, orientation to 0.0001 rad unless asked
|
|
10
10
|
* otherwise. A value that a NOVA pose leaves out is 0.
|
|
@@ -29,3 +29,15 @@ export declare function parsePoseText(text: string): RobotControlPose | null;
|
|
|
29
29
|
* `jointCount` comma-separated numbers, optionally in square brackets
|
|
30
30
|
*/
|
|
31
31
|
export declare function parseJointsText(text: string, jointCount: number): number[] | null;
|
|
32
|
+
/**
|
|
33
|
+
* The target of a move in `text`, or null if it is none: a pose of the TCP
|
|
34
|
+
* in parentheses, or joint values in square brackets, as many as the robot
|
|
35
|
+
* has joints (`jointCount`; null when they are not known, which takes none).
|
|
36
|
+
* Numbers without brackets are what the field shows: a pose of the TCP, or
|
|
37
|
+
* joint values for a robot that takes no TCP poses (`poses` is false), for
|
|
38
|
+
* which a pose is no target either.
|
|
39
|
+
*/
|
|
40
|
+
export declare function parseTargetText(text: string, { poses, jointCount }: {
|
|
41
|
+
poses: boolean;
|
|
42
|
+
jointCount: number | null;
|
|
43
|
+
}): RobotControlTarget | null;
|
|
@@ -12,5 +12,13 @@ export declare function shownValue(motion: JogMotion, value: number): number;
|
|
|
12
12
|
export declare function novaValue(motion: JogMotion, shown: number): number;
|
|
13
13
|
/** A step size as shown, e.g. "5 mm" or "2.5°": at most two decimals */
|
|
14
14
|
export declare function formatStep(motion: JogMotion, distance: number): string;
|
|
15
|
-
/**
|
|
16
|
-
|
|
15
|
+
/**
|
|
16
|
+
* A velocity as the panel shows it, in mm/s or °/s, to two decimals. That
|
|
17
|
+
* also takes away what rad/s in °/s is off by: 60 °/s as rad/s and back is
|
|
18
|
+
* 59.99999999999999.
|
|
19
|
+
*/
|
|
20
|
+
export declare function shownVelocity(motion: JogMotion, velocity: number): number;
|
|
21
|
+
/** The unit of a shown velocity */
|
|
22
|
+
export declare function velocityUnit(motion: JogMotion): string;
|
|
23
|
+
/** A shown velocity with its unit, e.g. "125 mm/s" or "10°/s" */
|
|
24
|
+
export declare function formatVelocity(motion: JogMotion, shown: number): string;
|
|
@@ -13,16 +13,19 @@ export type RobotControlOptions = {
|
|
|
13
13
|
/**
|
|
14
14
|
* The props of `RobotControlPanel` for a robot of a session: Translate
|
|
15
15
|
* and Rotate jog the TCP (continuously or by the steps of its jogging store),
|
|
16
|
-
* Joint jogs the joints, and Move to plans the pose
|
|
17
|
-
* session's typed pose and moves along the planned
|
|
16
|
+
* Joint jogs the joints, and Move to plans the pose or the joint values
|
|
17
|
+
* typed in it as the session's typed pose and moves along the planned
|
|
18
|
+
* trajectory while held.
|
|
18
19
|
* The tab, jog mode, step size and velocities are the jogging store's, so
|
|
19
20
|
* the session's storage keeps them.
|
|
20
21
|
*
|
|
21
22
|
* Jogging is off (`jogDisabled`) while the robot may not move
|
|
22
23
|
* (`session.safety.canBeMoved`): not activated or still activating, stopped
|
|
23
24
|
* by its safety, or without its live state. Also while a trajectory moves
|
|
24
|
-
* the robot and while another client jogs it. `
|
|
25
|
-
*
|
|
25
|
+
* the robot and while another client jogs it. `jogDisabledReason` says
|
|
26
|
+
* which it is, in the library's words (English or German), and after
|
|
27
|
+
* another client's jogging `onJogRetry` lets the user try again. `disabled`
|
|
28
|
+
* is only the app's lock, for which the hook has no reason to give.
|
|
26
29
|
*
|
|
27
30
|
* `<RobotControl />` is the panel with these props. An app that wants to
|
|
28
31
|
* change a part takes the props and overrides it:
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a velocity typed into the velocity field is. A text that is no
|
|
3
|
+
* velocity is reported, never corrected: a value outside the range is not
|
|
4
|
+
* clamped into it, so the user sees that it was refused and does not take
|
|
5
|
+
* it as applied.
|
|
6
|
+
*/
|
|
7
|
+
export type VelocityText = {
|
|
8
|
+
kind: "valid";
|
|
9
|
+
value: number;
|
|
10
|
+
} | {
|
|
11
|
+
kind: "empty";
|
|
12
|
+
} | {
|
|
13
|
+
kind: "notANumber";
|
|
14
|
+
} | {
|
|
15
|
+
kind: "outOfRange";
|
|
16
|
+
};
|
|
17
|
+
/** The velocity in `text`, within `min` to `max` (both included) */
|
|
18
|
+
export declare function parseVelocityText(text: string, min: number, max: number): VelocityText;
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
import type { RobotSession } from "../../lib/robotSession/RobotSession";
|
|
1
2
|
import type { RobotHeaderActivation } from "./RobotHeader";
|
|
3
|
+
/**
|
|
4
|
+
* The activation switch of a robot session (`session`, else the
|
|
5
|
+
* provider's). Without a robot, e.g. while none is loaded, nothing.
|
|
6
|
+
*/
|
|
7
|
+
export type ActivationSwitchOfSessionProps = {
|
|
8
|
+
session: RobotSession | null | undefined;
|
|
9
|
+
};
|
|
2
10
|
/**
|
|
3
11
|
* Whether the robot is activated (its controller in control mode), as
|
|
4
12
|
* RobotPad's ServoActivationToggle: on while active or deactivating, off and
|
|
5
|
-
* waiting while it changes, with a spinner
|
|
13
|
+
* waiting while it changes, with a spinner. Given a robot session, it
|
|
14
|
+
* switches the robot's controller and is off while NOVA would refuse it; a
|
|
15
|
+
* refused mode change goes to the session's `onError`:
|
|
16
|
+
* `<ActivationSwitch session={session} />`. RobotHeader has it already.
|
|
6
17
|
*/
|
|
7
|
-
export declare
|
|
18
|
+
export declare const ActivationSwitch: import("react").FunctionComponent<RobotHeaderActivation | ActivationSwitchOfSessionProps>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { SxProps, Theme } from "@mui/material/styles";
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
|
+
import type { RobotSession } from "../../lib/robotSession/RobotSession";
|
|
3
4
|
import { type SafetyBarProps } from "../../SafetyBar/SafetyBar";
|
|
4
5
|
import type { AppItem } from "../AppHeader";
|
|
5
6
|
import type { RobotControlSelect } from "../robotControl/RobotControlPanel";
|
|
@@ -25,9 +26,21 @@ export type RobotHeaderProps = {
|
|
|
25
26
|
onSearch?: () => void;
|
|
26
27
|
/** The motion group select */
|
|
27
28
|
motionGroup?: RobotControlSelect;
|
|
28
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* The robot whose safety state and activation switch the header shows;
|
|
31
|
+
* else the one of the nearest `RobotSessionProvider`. Without either, e.g.
|
|
32
|
+
* while no robot is loaded, the header shows neither.
|
|
33
|
+
*/
|
|
34
|
+
session?: RobotSession | null;
|
|
35
|
+
/**
|
|
36
|
+
* The safety state, operation mode and controller type (the SafetyBar),
|
|
37
|
+
* instead of the session's: for an app without a `RobotSession`
|
|
38
|
+
*/
|
|
29
39
|
safety?: Pick<SafetyBarProps, "isVirtual" | "motionGroupId" | "operationMode" | "safetyState">;
|
|
30
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* The activation switch, instead of the session's: for an app without a
|
|
42
|
+
* `RobotSession`
|
|
43
|
+
*/
|
|
31
44
|
activation?: RobotHeaderActivation;
|
|
32
45
|
/** The app's own buttons at the right, e.g. notifications and Add robot */
|
|
33
46
|
actions?: ReactNode;
|
|
@@ -37,6 +50,14 @@ export type RobotHeaderProps = {
|
|
|
37
50
|
* The header of a robot app, as Figma's top bar: the app menu, search and
|
|
38
51
|
* the app's name at the left; the motion group, its safety state, operation
|
|
39
52
|
* mode and controller type, and the activation switch in the middle; the
|
|
40
|
-
* app's own buttons at the right
|
|
53
|
+
* app's own buttons at the right.
|
|
54
|
+
*
|
|
55
|
+
* Given a robot session, it shows the robot's safety state and activation
|
|
56
|
+
* switch and follows them: the switch is off while NOVA would refuse it, and
|
|
57
|
+
* a refused mode change goes to the session's `onError`.
|
|
58
|
+
*
|
|
59
|
+
* ```tsx
|
|
60
|
+
* <RobotHeader appName="My app" session={session} actions={<ConnectionWarning session={session} />} />
|
|
61
|
+
* ```
|
|
41
62
|
*/
|
|
42
|
-
export declare const RobotHeader: ({ appIcon, appName, apps, onAppSelect, onSearch, motionGroup, safety, activation, actions, sx, }: RobotHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
export declare const RobotHeader: ({ appIcon, appName, apps, onAppSelect, onSearch, motionGroup, session, safety, activation, actions, sx, }: RobotHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import type { RobotHeaderActivation } from "./RobotHeader";
|
|
3
|
-
/**
|
|
4
|
-
* The robot's activation switch, as `RobotHeader`'s `activation` takes it:
|
|
5
|
-
* the controller's mode, not switchable while NOVA would refuse it (e.g. at
|
|
6
|
-
* an emergency stop). A refused change goes to the session's `onError`.
|
|
7
|
-
*/
|
|
8
|
-
export declare function robotActivationOf(session: RobotSession): RobotHeaderActivation;
|
|
1
|
+
export {};
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import type { RobotSession } from "../../lib/robotSession/RobotSession";
|
|
2
|
+
import type { RobotModelSource } from "../robots/robotModelSource";
|
|
2
3
|
import { type RobotSceneViewProps } from "./RobotSceneView";
|
|
3
4
|
/**
|
|
4
5
|
* The robot (`session`, else the provider's), and any prop of
|
|
5
6
|
* `RobotSceneView` to replace the session's
|
|
6
7
|
*/
|
|
7
|
-
export type RobotSceneProps = Partial<RobotSceneViewProps
|
|
8
|
+
export type RobotSceneProps = Partial<Omit<RobotSceneViewProps, "robot">> & {
|
|
8
9
|
/** The robot; else the one of the nearest `RobotSessionProvider` */
|
|
9
10
|
session?: RobotSession;
|
|
11
|
+
/**
|
|
12
|
+
* Parts of the robot to replace the session's, e.g. the joints to show;
|
|
13
|
+
* the rest stays the session's
|
|
14
|
+
*/
|
|
15
|
+
robot?: Partial<RobotModelSource>;
|
|
10
16
|
};
|
|
11
17
|
/**
|
|
12
18
|
* The 3D scene of a robot session, ready to use inside the app's `<Canvas>`:
|
|
@@ -15,10 +15,12 @@ export declare const MotionGroupVisualizerExact: React.FC<MotionGroupVisualizerP
|
|
|
15
15
|
/**
|
|
16
16
|
* Motion group visualizer with built-in spring smoothing of the joint stream.
|
|
17
17
|
*
|
|
18
|
-
* Thin wrapper that runs the incoming motion state through
|
|
19
|
-
* {@link useSmoothedMotionState}
|
|
20
|
-
*
|
|
21
|
-
*
|
|
18
|
+
* Thin wrapper that runs the incoming motion state through the spring of
|
|
19
|
+
* {@link useSmoothedMotionState}, stepped in the canvas's frame loop so that
|
|
20
|
+
* each drawn frame shows the spring at its own time, and renders
|
|
21
|
+
* {@link MotionGroupVisualizerExact}. It is the batteries-included default;
|
|
22
|
+
* drop down to `MotionGroupVisualizerExact` when you need to control or
|
|
23
|
+
* disable smoothing.
|
|
22
24
|
*/
|
|
23
25
|
export declare const MotionGroupVisualizer: React.FC<MotionGroupVisualizerProps>;
|
|
24
26
|
export default MotionGroupVisualizer;
|
|
@@ -44,10 +44,12 @@ export declare const SupportedLinearAxisExact: ({ rapidlyChangingMotionState, mo
|
|
|
44
44
|
/**
|
|
45
45
|
* Linear axis visualizer with built-in spring smoothing of the joint stream.
|
|
46
46
|
*
|
|
47
|
-
* Thin wrapper that runs the incoming motion state through
|
|
48
|
-
* {@link useSmoothedMotionState}
|
|
49
|
-
*
|
|
50
|
-
*
|
|
47
|
+
* Thin wrapper that runs the incoming motion state through the spring of
|
|
48
|
+
* {@link useSmoothedMotionState}, stepped in the canvas's frame loop so that
|
|
49
|
+
* each drawn frame shows the spring at its own time, and renders
|
|
50
|
+
* {@link SupportedLinearAxisExact}. It is the batteries-included default; drop
|
|
51
|
+
* down to `SupportedLinearAxisExact` when you need to control or disable
|
|
52
|
+
* smoothing.
|
|
51
53
|
*/
|
|
52
54
|
export declare const SupportedLinearAxis: ({ rapidlyChangingMotionState, ...props }: SupportedLinearAxisProps) => import("react/jsx-runtime").JSX.Element;
|
|
53
55
|
export default SupportedLinearAxis;
|
|
@@ -48,11 +48,13 @@ export declare const SupportedRobotExact: ({ rapidlyChangingMotionState, modelFr
|
|
|
48
48
|
/**
|
|
49
49
|
* Robot visualizer with built-in spring smoothing of the joint stream.
|
|
50
50
|
*
|
|
51
|
-
* This is a thin wrapper that runs the incoming motion state through
|
|
52
|
-
* {@link useSmoothedMotionState}
|
|
53
|
-
* the
|
|
54
|
-
*
|
|
55
|
-
*
|
|
51
|
+
* This is a thin wrapper that runs the incoming motion state through the
|
|
52
|
+
* spring of {@link useSmoothedMotionState}, stepped in the canvas's frame loop
|
|
53
|
+
* so that each drawn frame shows the spring at its own time, and renders
|
|
54
|
+
* {@link SupportedRobotExact}. It is the batteries-included default; drop down
|
|
55
|
+
* to `SupportedRobotExact` (optionally with your own
|
|
56
|
+
* {@link useSmoothedMotionState} configuration) when you need to control or
|
|
57
|
+
* disable smoothing.
|
|
56
58
|
*/
|
|
57
59
|
export declare const SupportedRobot: ({ rapidlyChangingMotionState, ...props }: SupportedRobotProps) => import("react/jsx-runtime").JSX.Element;
|
|
58
60
|
export default SupportedRobot;
|