@wandelbots/wandelbots-js-react-components 2.54.3 → 2.54.5-pr.feat-upgrade-jogging-to-v2.404.a6b053a
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 +1 -1
- package/dist/auth0-spa-js.production.esm-Bb4L9JDU.js +1423 -0
- package/dist/auth0-spa-js.production.esm-Bb4L9JDU.js.map +1 -0
- package/dist/auth0-spa-js.production.esm-CEI5Uihg.cjs +5 -0
- package/dist/auth0-spa-js.production.esm-CEI5Uihg.cjs.map +1 -0
- package/dist/components/3d-viewport/CoordinateSystemTransform.d.ts +1 -1
- package/dist/components/3d-viewport/CoordinateSystemTransform.d.ts.map +1 -1
- package/dist/components/3d-viewport/SafetyZonesRenderer.d.ts.map +1 -1
- package/dist/components/3d-viewport/collider/ColliderCollection.d.ts +1 -1
- package/dist/components/3d-viewport/collider/ColliderCollection.d.ts.map +1 -1
- package/dist/components/3d-viewport/collider/ColliderElement.d.ts +1 -1
- package/dist/components/3d-viewport/collider/ColliderElement.d.ts.map +1 -1
- package/dist/components/3d-viewport/collider/CollisionSceneRenderer.d.ts +1 -1
- package/dist/components/3d-viewport/collider/CollisionSceneRenderer.d.ts.map +1 -1
- package/dist/components/3d-viewport/collider/colliderShapeToBufferGeometry.d.ts +1 -1
- package/dist/components/3d-viewport/collider/colliderShapeToBufferGeometry.d.ts.map +1 -1
- package/dist/components/TabBar.d.ts.map +1 -1
- package/dist/components/jogging/JoggingCartesianTab.d.ts.map +1 -1
- package/dist/components/jogging/JoggingJointTab.d.ts.map +1 -1
- package/dist/components/jogging/JoggingPanel.d.ts +1 -1
- package/dist/components/jogging/JoggingPanel.d.ts.map +1 -1
- package/dist/components/jogging/JoggingStore.d.ts +6 -5
- package/dist/components/jogging/JoggingStore.d.ts.map +1 -1
- package/dist/components/jogging/PoseCartesianValues.d.ts +2 -2
- package/dist/components/jogging/PoseCartesianValues.d.ts.map +1 -1
- package/dist/components/jogging/PoseJointValues.d.ts +1 -2
- package/dist/components/jogging/PoseJointValues.d.ts.map +1 -1
- package/dist/components/robots/RobotAnimator.d.ts +1 -1
- package/dist/components/robots/RobotAnimator.d.ts.map +1 -1
- package/dist/components/robots/SupportedRobot.d.ts +1 -1
- package/dist/components/robots/SupportedRobot.d.ts.map +1 -1
- package/dist/components/robots/manufacturerHomePositions.d.ts +1 -1
- package/dist/components/robots/manufacturerHomePositions.d.ts.map +1 -1
- package/dist/components/utils/errorHandling.test.d.ts +2 -0
- package/dist/components/utils/errorHandling.test.d.ts.map +1 -0
- package/dist/index.cjs +48 -50
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15975 -19573
- package/dist/index.js.map +1 -1
- package/dist/lib/ConnectedMotionGroup.d.ts +84 -0
- package/dist/lib/ConnectedMotionGroup.d.ts.map +1 -0
- package/dist/lib/JoggerConnection.d.ts +112 -0
- package/dist/lib/JoggerConnection.d.ts.map +1 -0
- package/dist/lib/MotionStreamConnection.d.ts +24 -0
- package/dist/lib/MotionStreamConnection.d.ts.map +1 -0
- package/dist/lib/MotionStreamConnection.test.d.ts +2 -0
- package/dist/lib/MotionStreamConnection.test.d.ts.map +1 -0
- package/dist/lib/motionStateUpdate.d.ts +5 -0
- package/dist/lib/motionStateUpdate.d.ts.map +1 -0
- package/dist/lib/motionStateUpdate.test.d.ts +2 -0
- package/dist/lib/motionStateUpdate.test.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/components/3d-viewport/CoordinateSystemTransform.tsx +1 -1
- package/src/components/3d-viewport/SafetyZonesRenderer.tsx +1 -2
- package/src/components/3d-viewport/collider/ColliderCollection.tsx +1 -1
- package/src/components/3d-viewport/collider/ColliderElement.tsx +1 -1
- package/src/components/3d-viewport/collider/CollisionSceneRenderer.tsx +1 -1
- package/src/components/3d-viewport/collider/colliderShapeToBufferGeometry.ts +1 -1
- package/src/components/TabBar.tsx +51 -18
- package/src/components/jogging/JoggingCartesianTab.tsx +13 -11
- package/src/components/jogging/JoggingJointLimitDetector.tsx +2 -2
- package/src/components/jogging/JoggingJointTab.tsx +4 -3
- package/src/components/jogging/JoggingPanel.tsx +3 -2
- package/src/components/jogging/JoggingStore.ts +44 -39
- package/src/components/jogging/PoseCartesianValues.tsx +3 -4
- package/src/components/jogging/PoseJointValues.tsx +3 -4
- package/src/components/robots/DHRobot.tsx +1 -1
- package/src/components/robots/RobotAnimator.tsx +1 -1
- package/src/components/robots/SupportedRobot.tsx +1 -1
- package/src/components/robots/manufacturerHomePositions.ts +1 -1
- package/src/components/utils/errorHandling.test.ts +41 -0
- package/src/lib/ConnectedMotionGroup.ts +426 -0
- package/src/lib/JoggerConnection.ts +659 -0
- package/src/lib/MotionStreamConnection.test.ts +23 -0
- package/src/lib/MotionStreamConnection.ts +221 -0
- package/src/lib/motionStateUpdate.test.ts +28 -0
- package/src/lib/motionStateUpdate.ts +76 -0
- package/dist/auth0-spa-js.production.esm-1QXzndwB.js +0 -950
- package/dist/auth0-spa-js.production.esm-1QXzndwB.js.map +0 -1
- package/dist/auth0-spa-js.production.esm-BLRAk7Yh.cjs +0 -5
- package/dist/auth0-spa-js.production.esm-BLRAk7Yh.cjs.map +0 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { type AutoReconnectingWebsocket } from "@wandelbots/nova-js";
|
|
2
|
+
import type { MotionGroupDescription, MotionGroupState, NovaClient, RobotControllerState } from "@wandelbots/nova-js/v2";
|
|
3
|
+
import * as THREE from "three";
|
|
4
|
+
import type { Vector3Simple } from "./JoggerConnection";
|
|
5
|
+
export type RobotTcpLike = {
|
|
6
|
+
id: string;
|
|
7
|
+
readable_name: string;
|
|
8
|
+
position: Vector3Simple;
|
|
9
|
+
orientation: Vector3Simple;
|
|
10
|
+
};
|
|
11
|
+
export type MotionGroupOption = {
|
|
12
|
+
selectionId: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Store representing the current state of a connected motion group.
|
|
16
|
+
* API v2 version, not used yet in the components.
|
|
17
|
+
*/
|
|
18
|
+
export declare class ConnectedMotionGroup {
|
|
19
|
+
readonly nova: NovaClient;
|
|
20
|
+
readonly controller: RobotControllerState;
|
|
21
|
+
readonly motionGroup: MotionGroupState;
|
|
22
|
+
readonly initialMotionState: MotionGroupState;
|
|
23
|
+
readonly motionStateSocket: AutoReconnectingWebsocket;
|
|
24
|
+
readonly isVirtual: boolean;
|
|
25
|
+
readonly tcps: RobotTcpLike[];
|
|
26
|
+
readonly description: MotionGroupDescription;
|
|
27
|
+
readonly initialControllerState: RobotControllerState;
|
|
28
|
+
readonly controllerStateSocket: AutoReconnectingWebsocket;
|
|
29
|
+
static connectMultiple(nova: NovaClient, motionGroupIds: string[]): Promise<ConnectedMotionGroup[]>;
|
|
30
|
+
static connect(nova: NovaClient, motionGroupId: string): Promise<ConnectedMotionGroup>;
|
|
31
|
+
connectedJoggingSocket: WebSocket | null;
|
|
32
|
+
planData: any | null;
|
|
33
|
+
joggingVelocity: number;
|
|
34
|
+
rapidlyChangingMotionState: MotionGroupState;
|
|
35
|
+
controllerState: RobotControllerState;
|
|
36
|
+
/**
|
|
37
|
+
* Reflects activation state of the motion group / robot servos. The
|
|
38
|
+
* movement controls in the UI should only be enabled in the "active" state
|
|
39
|
+
*/
|
|
40
|
+
activationState: "inactive" | "activating" | "deactivating" | "active";
|
|
41
|
+
constructor(nova: NovaClient, controller: RobotControllerState, motionGroup: MotionGroupState, initialMotionState: MotionGroupState, motionStateSocket: AutoReconnectingWebsocket, isVirtual: boolean, tcps: RobotTcpLike[], description: MotionGroupDescription, initialControllerState: RobotControllerState, controllerStateSocket: AutoReconnectingWebsocket);
|
|
42
|
+
get motionGroupId(): string;
|
|
43
|
+
get controllerId(): string;
|
|
44
|
+
get modelFromController(): string;
|
|
45
|
+
get wandelscriptIdentifier(): string;
|
|
46
|
+
/** Jogging velocity in radians for rotation and joint movement */
|
|
47
|
+
get joggingVelocityRads(): number;
|
|
48
|
+
get joints(): {
|
|
49
|
+
index: number;
|
|
50
|
+
}[];
|
|
51
|
+
get dhParameters(): import("@wandelbots/nova-api/v2").DHParameter[] | undefined;
|
|
52
|
+
get safetyZones(): {
|
|
53
|
+
[key: string]: import("@wandelbots/nova-api/v2").Collider;
|
|
54
|
+
} | undefined;
|
|
55
|
+
/** Gets the robot mounting position offset in 3D viz coordinates */
|
|
56
|
+
get mountingPosition(): [number, number, number];
|
|
57
|
+
/** Gets the robot mounting position rotation in 3D viz coordinates */
|
|
58
|
+
get mountingQuaternion(): THREE.Quaternion;
|
|
59
|
+
/**
|
|
60
|
+
* Whether the controller is currently in a safety state
|
|
61
|
+
* corresponding to an emergency stop
|
|
62
|
+
*/
|
|
63
|
+
get isEstopActive(): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Whether the controller is in a safety state
|
|
66
|
+
* that may be non-functional for robot pad purposes
|
|
67
|
+
*/
|
|
68
|
+
get isMoveableSafetyState(): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Whether the controller is in an operation mode that allows movement
|
|
71
|
+
*/
|
|
72
|
+
get isMoveableOperationMode(): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Whether the robot is currently active and can be moved, based on the
|
|
75
|
+
* safety state, operation mode and servo toggle activation state.
|
|
76
|
+
*/
|
|
77
|
+
get canBeMoved(): boolean;
|
|
78
|
+
deactivate(): Promise<void>;
|
|
79
|
+
activate(): Promise<void>;
|
|
80
|
+
toggleActivation(): void;
|
|
81
|
+
dispose(): void;
|
|
82
|
+
setJoggingVelocity(velocity: number): void;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=ConnectedMotionGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConnectedMotionGroup.d.ts","sourceRoot":"","sources":["../../src/lib/ConnectedMotionGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EACV,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,E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BAGD,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,oBAAoB,EAChC,WAAW,EAAE,gBAAgB,EAC7B,kBAAkB,EAAE,gBAAgB,EACpC,iBAAiB,EAAE,yBAAyB,EAC5C,SAAS,EAAE,OAAO,EAClB,IAAI,EAAE,YAAY,EAAE,EACpB,WAAW,EAAE,sBAAsB,EACnC,sBAAsB,EAAE,oBAAoB,EAC5C,qBAAqB,EAAE,yBAAyB;IAqE3D,IAAI,aAAa,WAEhB;IAED,IAAI,YAAY,WAEf;IAED,IAAI,mBAAmB,WAEtB;IAED,IAAI,sBAAsB,WAGzB;IAED,kEAAkE;IAClE,IAAI,mBAAmB,WAEtB;IAED,IAAI,MAAM;;QAMT;IAED,IAAI,YAAY,gEAEf;IAED,IAAI,WAAW;;kBAEd;IAED,oEAAoE;IACpE,IAAI,gBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAU/C;IAED,sEAAsE;IACtE,IAAI,kBAAkB,qBAWrB;IAED;;;OAGG;IACH,IAAI,aAAa,YAOhB;IAED;;;OAGG;IACH,IAAI,qBAAqB,YAOxB;IAED;;OAEG;IACH,IAAI,uBAAuB,YAS1B;IAED;;;OAGG;IACH,IAAI,UAAU,YAMb;IAEK,UAAU;IA2BV,QAAQ;IA2Bd,gBAAgB;IAQhB,OAAO;IAKP,kBAAkB,CAAC,QAAQ,EAAE,MAAM;CAGpC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { AutoReconnectingWebsocket } from "@wandelbots/nova-js";
|
|
2
|
+
import type { NovaClient, Pose } from "@wandelbots/nova-js/v2";
|
|
3
|
+
import { MotionStreamConnection } from "./MotionStreamConnection";
|
|
4
|
+
export type Vector3Simple = [number, number, number];
|
|
5
|
+
export type JoggerConnectionOptions = {
|
|
6
|
+
mode?: JoggerMode;
|
|
7
|
+
timeout?: number;
|
|
8
|
+
/**
|
|
9
|
+
* When an error message is received from the jogging websocket, it
|
|
10
|
+
* will be passed here. If this handler is not provided, the error will
|
|
11
|
+
* instead be thrown as an unhandled error.
|
|
12
|
+
*/
|
|
13
|
+
onError?: (err: unknown) => void;
|
|
14
|
+
tcp?: string;
|
|
15
|
+
orientation?: JoggerOrientation;
|
|
16
|
+
};
|
|
17
|
+
export type JoggerMode = "jogging" | "trajectory" | "off";
|
|
18
|
+
export type JoggerOrientation = "coordsys" | "tool";
|
|
19
|
+
export declare class JoggerConnection {
|
|
20
|
+
readonly motionStream: MotionStreamConnection;
|
|
21
|
+
readonly options: JoggerConnectionOptions | undefined;
|
|
22
|
+
ENDPOINT_JOGGING: string;
|
|
23
|
+
ENDPOINT_TRAJECTORY: string;
|
|
24
|
+
DEFAULT_MODE: JoggerMode;
|
|
25
|
+
DEFAULT_TCP: string;
|
|
26
|
+
DEFAULT_INIT_TIMEOUT: number;
|
|
27
|
+
DEFAULT_ORIENTATION: JoggerOrientation;
|
|
28
|
+
mode: JoggerMode;
|
|
29
|
+
joggingSocket: AutoReconnectingWebsocket | null;
|
|
30
|
+
trajectorySocket: AutoReconnectingWebsocket | null;
|
|
31
|
+
timeout: number;
|
|
32
|
+
tcp: string;
|
|
33
|
+
orientation: JoggerOrientation;
|
|
34
|
+
onError?: (err: unknown) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Initialize the jogging connection using jogging endpoint or trajectory endpoint depending on the selected mode.
|
|
37
|
+
*
|
|
38
|
+
* @param nova - The Nova client instance
|
|
39
|
+
* @param motionGroupId - The ID of the motion group to connect to
|
|
40
|
+
* @param options - Configuration options for the jogger connection
|
|
41
|
+
* @param options.mode - The jogging mode to initialize:
|
|
42
|
+
* - "jogging": Continuous jogging mode with persistent websocket for real-time velocity commands
|
|
43
|
+
* - "trajectory": Incremental jogging mode for fixed-distance motions via trajectory planning
|
|
44
|
+
* - "off": No jogging enabled, all websockets closed (default)
|
|
45
|
+
* @param options.timeout - Timeout in milliseconds for websocket initialization (default: 5000ms)
|
|
46
|
+
* @param options.tcp - TCP frame to use for motions (default: from motion group)
|
|
47
|
+
* //param options.coordinateSystem - Coordinate system for jogging commands (default: "world"). Please note: Currently not implemented
|
|
48
|
+
* @param options.orientation - If set to "tool", jogging TcpVelocityRequest will use `use_tool_coordinate_system` option (default: "coordsys")
|
|
49
|
+
* @param options.onError - Error handler for websocket errors
|
|
50
|
+
* @returns Promise resolving to initialized JoggerConnection instance
|
|
51
|
+
*/
|
|
52
|
+
static open(nova: NovaClient, motionGroupId: string, options?: JoggerConnectionOptions): Promise<JoggerConnection>;
|
|
53
|
+
constructor(motionStream: MotionStreamConnection, options?: JoggerConnectionOptions | undefined);
|
|
54
|
+
setOptions(options: Partial<JoggerConnectionOptions>): Promise<void>;
|
|
55
|
+
get motionGroupId(): string;
|
|
56
|
+
get nova(): NovaClient;
|
|
57
|
+
get numJoints(): number;
|
|
58
|
+
stop(): Promise<void>;
|
|
59
|
+
dispose(): Promise<void[]>;
|
|
60
|
+
setJoggingMode(mode: JoggerMode, skipReinitializeIfSameMode?: boolean): Promise<void>;
|
|
61
|
+
initializeJoggingWebsocket(): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Jogging: Start rotation of a single robot joint at the specified velocity
|
|
64
|
+
*/
|
|
65
|
+
rotateJoints({ joint, direction, velocityRadsPerSec, }: {
|
|
66
|
+
/** Index of the joint to rotate */
|
|
67
|
+
joint: number;
|
|
68
|
+
/** Direction of rotation ("+" or "-") */
|
|
69
|
+
direction: "+" | "-";
|
|
70
|
+
/** Speed of the rotation in radians per second */
|
|
71
|
+
velocityRadsPerSec: number;
|
|
72
|
+
}): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* Jogging: Start the TCP moving along a specified axis at a given velocity
|
|
75
|
+
*/
|
|
76
|
+
translateTCP({ axis, direction, velocityMmPerSec, }: {
|
|
77
|
+
axis: "x" | "y" | "z";
|
|
78
|
+
direction: "-" | "+";
|
|
79
|
+
velocityMmPerSec: number;
|
|
80
|
+
}): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* Jogging: Start the TCP rotating around a specified axis at a given velocity
|
|
83
|
+
*/
|
|
84
|
+
rotateTCP({ axis, direction, velocityRadsPerSec, }: {
|
|
85
|
+
axis: "x" | "y" | "z";
|
|
86
|
+
direction: "-" | "+";
|
|
87
|
+
velocityRadsPerSec: number;
|
|
88
|
+
}): Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* Trajectory jogging:
|
|
91
|
+
*
|
|
92
|
+
* Move the robot by a fixed distance in a single cartesian
|
|
93
|
+
* axis, either rotating or translating relative to the TCP.
|
|
94
|
+
* Promise resolves only after the motion has completed.
|
|
95
|
+
*/
|
|
96
|
+
runIncrementalCartesianMotion({ currentTcpPose, currentJoints, coordSystemId, velocityInRelevantUnits, axis, direction, motion, }: {
|
|
97
|
+
currentTcpPose: Pose;
|
|
98
|
+
currentJoints: Vector3Simple;
|
|
99
|
+
coordSystemId: string;
|
|
100
|
+
velocityInRelevantUnits: number;
|
|
101
|
+
axis: "x" | "y" | "z";
|
|
102
|
+
direction: "-" | "+";
|
|
103
|
+
motion: {
|
|
104
|
+
type: "rotate";
|
|
105
|
+
distanceRads: number;
|
|
106
|
+
} | {
|
|
107
|
+
type: "translate";
|
|
108
|
+
distanceMm: number;
|
|
109
|
+
};
|
|
110
|
+
}): Promise<void>;
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=JoggerConnection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JoggerConnection.d.ts","sourceRoot":"","sources":["../../src/lib/JoggerConnection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EAG1B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAGV,UAAU,EACV,IAAI,EAEL,MAAM,wBAAwB,CAAA;AAG/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAEjE,MAAM,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;AAEpD,MA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GACD;YACE,IAAI,EAAE,WAAW,CAAA;YACjB,UAAU,EAAE,MAAM,CAAA;SACnB,CAAA;KACN;CAyQF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AutoReconnectingWebsocket } from "@wandelbots/nova-js";
|
|
2
|
+
import type { MotionGroupDescription, MotionGroupState, NovaClient, RobotControllerState } from "@wandelbots/nova-js/v2";
|
|
3
|
+
/**
|
|
4
|
+
* Store representing the current state of a connected motion group.
|
|
5
|
+
*/
|
|
6
|
+
export declare class MotionStreamConnection {
|
|
7
|
+
readonly nova: NovaClient;
|
|
8
|
+
readonly controller: RobotControllerState;
|
|
9
|
+
readonly motionGroup: MotionGroupState;
|
|
10
|
+
readonly description: MotionGroupDescription;
|
|
11
|
+
readonly initialMotionState: MotionGroupState;
|
|
12
|
+
readonly motionStateSocket: AutoReconnectingWebsocket;
|
|
13
|
+
static open(nova: NovaClient, motionGroupId: string): Promise<MotionStreamConnection>;
|
|
14
|
+
rapidlyChangingMotionState: MotionGroupState;
|
|
15
|
+
constructor(nova: NovaClient, controller: RobotControllerState, motionGroup: MotionGroupState, description: MotionGroupDescription, initialMotionState: MotionGroupState, motionStateSocket: AutoReconnectingWebsocket);
|
|
16
|
+
get motionGroupId(): string;
|
|
17
|
+
get controllerId(): string;
|
|
18
|
+
get wandelscriptIdentifier(): string;
|
|
19
|
+
get joints(): {
|
|
20
|
+
index: number;
|
|
21
|
+
}[];
|
|
22
|
+
dispose(): void;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=MotionStreamConnection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MotionStreamConnection.d.ts","sourceRoot":"","sources":["../../src/lib/MotionStreamConnection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAgB,MAAM,qBAAqB,CAAA;AAC7E,OAAO,KAAK,EACV,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACrB,MAAM,wBAAwB,CAAA;AA+C/B;;GAEG;AACH,qBAAa,sBAAsB;IA2D/B,QAAQ,CAAC,IAAI,EAAE,UAAU;IACzB,QAAQ,CAAC,UAAU,EAAE,oBAAoB;IACzC,QAAQ,CAAC,WAAW,EAAE,gBAAgB;IACtC,QAAQ,CAAC,WAAW,EAAE,sBAAsB;IAC5C,QAAQ,CAAC,kBAAkB,EAAE,gBAAgB;IAC7C,QAAQ,CAAC,iBAAiB,EAAE,yBAAyB;WA/D1C,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM;IAuDzD,0BAA0B,EAAE,gBAAgB,CAAA;gBAGjC,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,oBAAoB,EAChC,WAAW,EAAE,gBAAgB,EAC7B,WAAW,EAAE,sBAAsB,EACnC,kBAAkB,EAAE,gBAAgB,EACpC,iBAAiB,EAAE,yBAAyB;IA4EvD,IAAI,aAAa,WAEhB;IAED,IAAI,YAAY,WAEf;IAED,IAAI,sBAAsB,WAGzB;IAED,IAAI,MAAM;;QAMT;IAED,OAAO;CAGR"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MotionStreamConnection.test.d.ts","sourceRoot":"","sources":["../../src/lib/MotionStreamConnection.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { MotionGroupState, Pose } from "@wandelbots/nova-js/v2";
|
|
2
|
+
export declare function jointValuesEqual(oldJointValues: number[], newJointValues: number[], changeDeltaThreshold: number): boolean;
|
|
3
|
+
export declare function poseEqual(oldTcp: Pose | undefined, newTcp: Pose | undefined, changeDeltaThreshold: number): boolean;
|
|
4
|
+
export declare function tcpMotionEqual(oldMotionState: MotionGroupState, newMotionState: MotionGroupState, changeDeltaThreshold: number): boolean;
|
|
5
|
+
//# sourceMappingURL=motionStateUpdate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motionStateUpdate.d.ts","sourceRoot":"","sources":["../../src/lib/motionStateUpdate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAEpE,wBAAgB,gBAAgB,CAC9B,cAAc,EAAE,MAAM,EAAE,EACxB,cAAc,EAAE,MAAM,EAAE,EACxB,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CAgBT;AAED,wBAAgB,SAAS,CACvB,MAAM,EAAE,IAAI,GAAG,SAAS,EACxB,MAAM,EAAE,IAAI,GAAG,SAAS,EACxB,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CA8BT;AAGD,wBAAgB,cAAc,CAC5B,cAAc,EAAE,gBAAgB,EAChC,cAAc,EAAE,gBAAgB,EAChC,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CAUT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motionStateUpdate.test.d.ts","sourceRoot":"","sources":["../../src/lib/motionStateUpdate.test.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wandelbots/wandelbots-js-react-components",
|
|
3
|
-
"version": "2.54.
|
|
3
|
+
"version": "2.54.5-pr.feat-upgrade-jogging-to-v2.404.a6b053a",
|
|
4
4
|
"description": "React UI toolkit for building applications on top of the Wandelbots platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@types/react": "^19.1.8",
|
|
71
71
|
"@types/three": "^0.174.0",
|
|
72
72
|
"@vitejs/plugin-react": "^4.3.4",
|
|
73
|
-
"@wandelbots/nova-js": "
|
|
73
|
+
"@wandelbots/nova-js": "3.3.0",
|
|
74
74
|
"add": "^2.0.6",
|
|
75
75
|
"eslint-plugin-storybook": "^10.0.1",
|
|
76
76
|
"glob": "^11.0.1",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type ThreeElements } from "@react-three/fiber"
|
|
2
|
-
import type { Geometry } from "@wandelbots/nova-
|
|
3
|
-
import type { SafetySetupSafetyZone } from "@wandelbots/nova-js/v1"
|
|
2
|
+
import type { Geometry, SafetySetupSafetyZone } from "@wandelbots/nova-js/v1"
|
|
4
3
|
import * as THREE from "three"
|
|
5
4
|
import { ConvexGeometry } from "three-stdlib"
|
|
6
5
|
|
|
@@ -70,6 +70,34 @@ function TabPanel(props: TabPanelProps) {
|
|
|
70
70
|
)
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
/**
|
|
74
|
+
* Wrapper component that filters out MUI Tabs internal props
|
|
75
|
+
* to prevent them from being passed to DOM elements
|
|
76
|
+
*/
|
|
77
|
+
interface TabWrapperProps {
|
|
78
|
+
children: React.ReactNode
|
|
79
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
80
|
+
[key: string]: any
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function TabWrapper({ children, ...props }: TabWrapperProps) {
|
|
84
|
+
// Filter out MUI Tabs internal props that shouldn't reach the DOM
|
|
85
|
+
const {
|
|
86
|
+
fullWidth,
|
|
87
|
+
indicator,
|
|
88
|
+
onChange,
|
|
89
|
+
orientation,
|
|
90
|
+
scrollButtons,
|
|
91
|
+
selectionFollowsFocus,
|
|
92
|
+
textColor,
|
|
93
|
+
value,
|
|
94
|
+
variant,
|
|
95
|
+
...cleanProps
|
|
96
|
+
} = props
|
|
97
|
+
|
|
98
|
+
return <Box {...cleanProps}>{children}</Box>
|
|
99
|
+
}
|
|
100
|
+
|
|
73
101
|
/**
|
|
74
102
|
* A styled tab bar component with configurable tabs and content.
|
|
75
103
|
* Features the same styling as the Wandelbots design system with rounded tabs
|
|
@@ -238,26 +266,31 @@ export const TabBar = externalizeComponent(
|
|
|
238
266
|
}
|
|
239
267
|
|
|
240
268
|
return (
|
|
241
|
-
<
|
|
269
|
+
<TabWrapper
|
|
242
270
|
key={item.id}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
max={item.badge?.max}
|
|
246
|
-
showZero={item.badge?.showZero}
|
|
247
|
-
anchorOrigin={{
|
|
248
|
-
vertical: "top",
|
|
249
|
-
horizontal: "right",
|
|
250
|
-
}}
|
|
251
|
-
overlap="rectangular"
|
|
252
|
-
sx={{
|
|
253
|
-
"& .MuiBadge-badge": {
|
|
254
|
-
// Ensure badge doesn't inherit tab opacity
|
|
255
|
-
opacity: "1 !important",
|
|
256
|
-
},
|
|
257
|
-
}}
|
|
271
|
+
component="span"
|
|
272
|
+
sx={{ display: "inline-flex" }}
|
|
258
273
|
>
|
|
259
|
-
|
|
260
|
-
|
|
274
|
+
<Badge
|
|
275
|
+
badgeContent={badgeContent}
|
|
276
|
+
color={item.badge?.color || "error"}
|
|
277
|
+
max={item.badge?.max}
|
|
278
|
+
showZero={item.badge?.showZero}
|
|
279
|
+
anchorOrigin={{
|
|
280
|
+
vertical: "top",
|
|
281
|
+
horizontal: "right",
|
|
282
|
+
}}
|
|
283
|
+
overlap="rectangular"
|
|
284
|
+
sx={{
|
|
285
|
+
"& .MuiBadge-badge": {
|
|
286
|
+
// Ensure badge doesn't inherit tab opacity
|
|
287
|
+
opacity: "1 !important",
|
|
288
|
+
},
|
|
289
|
+
}}
|
|
290
|
+
>
|
|
291
|
+
{tab}
|
|
292
|
+
</Badge>
|
|
293
|
+
</TabWrapper>
|
|
261
294
|
)
|
|
262
295
|
})}
|
|
263
296
|
</Tabs>
|
|
@@ -6,13 +6,18 @@ import {
|
|
|
6
6
|
useTheme,
|
|
7
7
|
type Theme,
|
|
8
8
|
} from "@mui/material"
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
degreesToRadians,
|
|
11
|
+
radiansToDegrees,
|
|
12
|
+
XYZ_TO_VECTOR,
|
|
13
|
+
} from "@wandelbots/nova-js"
|
|
10
14
|
import { observer } from "mobx-react-lite"
|
|
11
15
|
import { useTranslation } from "react-i18next"
|
|
12
16
|
import XAxisIcon from "../../icons/axis-x.svg"
|
|
13
17
|
import YAxisIcon from "../../icons/axis-y.svg"
|
|
14
18
|
import ZAxisIcon from "../../icons/axis-z.svg"
|
|
15
19
|
import RotationIcon from "../../icons/rotation.svg"
|
|
20
|
+
import type { Vector3Simple } from "../../lib/JoggerConnection"
|
|
16
21
|
import { useReaction } from "../utils/hooks"
|
|
17
22
|
import { JoggingCartesianAxisControl } from "./JoggingCartesianAxisControl"
|
|
18
23
|
import { JoggingJointLimitDetector } from "./JoggingJointLimitDetector"
|
|
@@ -56,7 +61,7 @@ export const JoggingCartesianTab = observer(
|
|
|
56
61
|
() => {
|
|
57
62
|
store.jogger.motionStream.motionStateSocket.changeUrl(
|
|
58
63
|
store.jogger.nova.makeWebsocketURL(
|
|
59
|
-
`/motion-groups/${store.jogger.motionGroupId}/state-stream?tcp=${store.selectedTcpId}
|
|
64
|
+
`/controllers/${store.jogger.motionStream.controllerId}/motion-groups/${store.jogger.motionGroupId}/state-stream?tcp=${store.selectedTcpId}`,
|
|
60
65
|
),
|
|
61
66
|
)
|
|
62
67
|
},
|
|
@@ -70,8 +75,8 @@ export const JoggingCartesianTab = observer(
|
|
|
70
75
|
const jogger = await store.activate()
|
|
71
76
|
|
|
72
77
|
const tcpPose = jogger.motionStream.rapidlyChangingMotionState.tcp_pose
|
|
73
|
-
const jointPosition =
|
|
74
|
-
|
|
78
|
+
const jointPosition = jogger.motionStream.rapidlyChangingMotionState
|
|
79
|
+
.joint_position as Vector3Simple
|
|
75
80
|
if (!tcpPose) return
|
|
76
81
|
|
|
77
82
|
await store.withMotionLock(async () => {
|
|
@@ -117,13 +122,13 @@ export const JoggingCartesianTab = observer(
|
|
|
117
122
|
}
|
|
118
123
|
|
|
119
124
|
if (opts.motionType === "translate") {
|
|
120
|
-
await store.jogger.
|
|
125
|
+
await store.jogger.translateTCP({
|
|
121
126
|
axis: opts.axis,
|
|
122
127
|
direction: opts.direction,
|
|
123
128
|
velocityMmPerSec: store.translationVelocityMmPerSec,
|
|
124
129
|
})
|
|
125
130
|
} else {
|
|
126
|
-
await store.jogger.
|
|
131
|
+
await store.jogger.rotateTCP({
|
|
127
132
|
axis: opts.axis,
|
|
128
133
|
direction: opts.direction,
|
|
129
134
|
velocityRadsPerSec: store.rotationVelocityRadsPerSec,
|
|
@@ -189,10 +194,7 @@ export const JoggingCartesianTab = observer(
|
|
|
189
194
|
return (
|
|
190
195
|
<Stack flexGrow={1} gap={2} sx={{ padding: "18px 24px" }}>
|
|
191
196
|
<Stack gap={2}>
|
|
192
|
-
{/* Jogging options */}
|
|
193
197
|
<JoggingOptions store={store} />
|
|
194
|
-
|
|
195
|
-
{/* Velocity slider */}
|
|
196
198
|
<JoggingVelocitySlider store={store} />
|
|
197
199
|
<Divider />
|
|
198
200
|
</Stack>
|
|
@@ -257,7 +259,7 @@ export const JoggingCartesianTab = observer(
|
|
|
257
259
|
getDisplayedValue={() =>
|
|
258
260
|
formatMM(
|
|
259
261
|
store.jogger.motionStream.rapidlyChangingMotionState
|
|
260
|
-
.tcp_pose?.position[axis.id] || 0,
|
|
262
|
+
.tcp_pose?.position?.[XYZ_TO_VECTOR[axis.id]] || 0,
|
|
261
263
|
)
|
|
262
264
|
}
|
|
263
265
|
startJogging={(direction: "-" | "+") =>
|
|
@@ -301,7 +303,7 @@ export const JoggingCartesianTab = observer(
|
|
|
301
303
|
getDisplayedValue={() =>
|
|
302
304
|
formatDegrees(
|
|
303
305
|
store.jogger.motionStream.rapidlyChangingMotionState
|
|
304
|
-
.tcp_pose?.orientation?.[axis.id] || 0,
|
|
306
|
+
.tcp_pose?.orientation?.[XYZ_TO_VECTOR[axis.id]] || 0,
|
|
305
307
|
)
|
|
306
308
|
}
|
|
307
309
|
startJogging={(direction: "-" | "+") =>
|
|
@@ -17,14 +17,14 @@ export const JoggingJointLimitDetector = ({
|
|
|
17
17
|
const { t } = useTranslation()
|
|
18
18
|
|
|
19
19
|
const [jointLimitsReached, setJointLimitsReached] = useState(
|
|
20
|
-
store.jogger.motionStream.rapidlyChangingMotionState
|
|
20
|
+
store.jogger.motionStream.rapidlyChangingMotionState
|
|
21
21
|
.joint_limit_reached.limit_reached,
|
|
22
22
|
)
|
|
23
23
|
const jointLimitsReachedRef = useRef(jointLimitsReached)
|
|
24
24
|
|
|
25
25
|
useAnimationFrame(() => {
|
|
26
26
|
const newLimitsReached =
|
|
27
|
-
store.jogger.motionStream.rapidlyChangingMotionState
|
|
27
|
+
store.jogger.motionStream.rapidlyChangingMotionState
|
|
28
28
|
.joint_limit_reached.limit_reached
|
|
29
29
|
|
|
30
30
|
if (!isEqual(jointLimitsReachedRef.current, newLimitsReached)) {
|
|
@@ -16,7 +16,7 @@ export const JoggingJointTab = observer(
|
|
|
16
16
|
}) {
|
|
17
17
|
await store.activate()
|
|
18
18
|
|
|
19
|
-
await store.jogger.
|
|
19
|
+
await store.jogger.rotateJoints({
|
|
20
20
|
joint: opts.joint,
|
|
21
21
|
direction: opts.direction,
|
|
22
22
|
velocityRadsPerSec: store.rotationVelocityRadsPerSec,
|
|
@@ -42,7 +42,8 @@ export const JoggingJointTab = observer(
|
|
|
42
42
|
<Stack alignItems="center" gap="24px">
|
|
43
43
|
{store.jogger.motionStream.joints.map((joint) => {
|
|
44
44
|
const jointLimits =
|
|
45
|
-
store.
|
|
45
|
+
store.motionGroupDescription.operation_limits.auto_limits
|
|
46
|
+
?.joints?.[joint.index]?.position
|
|
46
47
|
const lowerLimitDegs =
|
|
47
48
|
jointLimits?.lower_limit !== undefined
|
|
48
49
|
? radiansToDegrees(jointLimits.lower_limit)
|
|
@@ -80,7 +81,7 @@ export const JoggingJointTab = observer(
|
|
|
80
81
|
getValueDegs={() => {
|
|
81
82
|
const value =
|
|
82
83
|
store.jogger.motionStream.rapidlyChangingMotionState
|
|
83
|
-
.
|
|
84
|
+
.joint_position[joint.index]
|
|
84
85
|
return value !== undefined
|
|
85
86
|
? radiansToDegrees(value)
|
|
86
87
|
: undefined
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import MoveIcon from "@mui/icons-material/OpenWith"
|
|
2
2
|
import ShareIcon from "@mui/icons-material/Share"
|
|
3
3
|
import { Stack, Tab, Tabs, type SxProps } from "@mui/material"
|
|
4
|
-
import { NovaClient } from "@wandelbots/nova-js/
|
|
4
|
+
import { NovaClient } from "@wandelbots/nova-js/v2"
|
|
5
5
|
import { isString } from "lodash-es"
|
|
6
6
|
import { runInAction } from "mobx"
|
|
7
7
|
import { observer, useLocalObservable } from "mobx-react-lite"
|
|
8
8
|
import { useEffect } from "react"
|
|
9
9
|
import { useTranslation } from "react-i18next"
|
|
10
10
|
import { externalizeComponent } from "../../externalizeComponent"
|
|
11
|
+
import { JoggerConnection } from "../../lib/JoggerConnection"
|
|
11
12
|
import { LoadingCover } from "../LoadingCover"
|
|
12
13
|
import { JoggingCartesianTab } from "./JoggingCartesianTab"
|
|
13
14
|
import { JoggingJointTab } from "./JoggingJointTab"
|
|
@@ -58,7 +59,7 @@ export const JoggingPanel = externalizeComponent(
|
|
|
58
59
|
try {
|
|
59
60
|
let joggingStore = props.store
|
|
60
61
|
if (!joggingStore) {
|
|
61
|
-
const jogger = await
|
|
62
|
+
const jogger = await JoggerConnection.open(nova, props.motionGroupId)
|
|
62
63
|
joggingStore = await JoggingStore.loadFor(jogger)
|
|
63
64
|
}
|
|
64
65
|
runInAction(() => {
|