@wandelbots/wandelbots-js-react-components 3.4.0-pr.feat-yaskawa-gp200s.437.5d50e5b → 3.4.0-pr.feat-add-yaskawa-gp200s.438.0503e4b
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 +10 -61
- package/dist/auth0-spa-js.production.esm-1QXzndwB.js +950 -0
- package/dist/auth0-spa-js.production.esm-1QXzndwB.js.map +1 -0
- package/dist/auth0-spa-js.production.esm-BLRAk7Yh.cjs +5 -0
- package/dist/auth0-spa-js.production.esm-BLRAk7Yh.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/ProgramStateIndicator.d.ts +3 -3
- package/dist/components/ProgramStateIndicator.d.ts.map +1 -1
- package/dist/components/RobotCard.d.ts +3 -4
- package/dist/components/RobotCard.d.ts.map +1 -1
- package/dist/components/jogging/JoggingCartesianTab.d.ts.map +1 -1
- package/dist/components/jogging/JoggingOptions.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 +5 -10
- 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 +2 -1
- package/dist/components/jogging/PoseJointValues.d.ts.map +1 -1
- package/dist/components/robots/DHRobot.d.ts.map +1 -1
- package/dist/components/robots/Robot.d.ts +1 -1
- package/dist/components/robots/Robot.d.ts.map +1 -1
- package/dist/components/robots/RobotAnimator.d.ts +2 -2
- package/dist/components/robots/RobotAnimator.d.ts.map +1 -1
- package/dist/components/robots/SupportedRobot.d.ts +3 -3
- 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/safetyBar/ControllerTypeIndicator.d.ts.map +1 -1
- package/dist/components/safetyBar/OperationModeIndicator.d.ts +2 -2
- package/dist/components/safetyBar/OperationModeIndicator.d.ts.map +1 -1
- package/dist/components/safetyBar/SafetyBar.d.ts +3 -3
- package/dist/components/safetyBar/SafetyBar.d.ts.map +1 -1
- package/dist/components/safetyBar/SafetyStateIndicator.d.ts +2 -2
- package/dist/components/safetyBar/SafetyStateIndicator.d.ts.map +1 -1
- package/dist/components/utils/errorHandling.d.ts.map +1 -1
- package/dist/index.cjs +155 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +39 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +34927 -0
- package/dist/index.js.map +1 -0
- package/package.json +21 -49
- package/src/components/3d-viewport/CoordinateSystemTransform.tsx +1 -1
- package/src/components/3d-viewport/SafetyZonesRenderer.tsx +2 -1
- 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/AppHeader.md +1 -1
- package/src/components/ProgramStateIndicator.tsx +6 -3
- package/src/components/RobotCard.tsx +7 -4
- package/src/components/jogging/JoggingCartesianTab.tsx +11 -13
- package/src/components/jogging/JoggingJointLimitDetector.tsx +2 -2
- package/src/components/jogging/JoggingJointTab.tsx +4 -4
- package/src/components/jogging/JoggingOptions.tsx +5 -6
- package/src/components/jogging/JoggingPanel.tsx +3 -6
- package/src/components/jogging/JoggingStore.ts +39 -66
- package/src/components/jogging/PoseCartesianValues.tsx +4 -3
- package/src/components/jogging/PoseJointValues.tsx +4 -3
- package/src/components/robots/DHRobot.tsx +3 -2
- package/src/components/robots/Robot.tsx +1 -1
- package/src/components/robots/RobotAnimator.test.tsx +22 -7
- package/src/components/robots/RobotAnimator.tsx +13 -8
- package/src/components/robots/SupportedRobot.tsx +6 -3
- package/src/components/robots/manufacturerHomePositions.ts +1 -1
- package/src/components/safetyBar/ControllerTypeIndicator.tsx +2 -4
- package/src/components/safetyBar/OperationModeIndicator.tsx +5 -7
- package/src/components/safetyBar/SafetyBar.tsx +6 -3
- package/src/components/safetyBar/SafetyStateIndicator.tsx +7 -9
- package/src/components/utils/errorHandling.ts +0 -4
- package/src/i18n/locales/de/translations.json +0 -3
- package/src/i18n/locales/en/translations.json +0 -3
- package/src/index.ts +43 -4
- package/dist/3d.cjs.js +0 -2
- package/dist/3d.cjs.js.map +0 -1
- package/dist/3d.d.ts +0 -11
- package/dist/3d.d.ts.map +0 -1
- package/dist/3d.es.js +0 -16
- package/dist/3d.es.js.map +0 -1
- package/dist/LoadingCover-Dr9hDTku.js +0 -87
- package/dist/LoadingCover-Dr9hDTku.js.map +0 -1
- package/dist/LoadingCover-r2yhJZF9.cjs +0 -2
- package/dist/LoadingCover-r2yhJZF9.cjs.map +0 -1
- package/dist/WandelscriptEditor-Dj7TBCkF.cjs +0 -2
- package/dist/WandelscriptEditor-Dj7TBCkF.cjs.map +0 -1
- package/dist/WandelscriptEditor-DnJvITTA.js +0 -140
- package/dist/WandelscriptEditor-DnJvITTA.js.map +0 -1
- package/dist/auth0-spa-js.production.esm-9WdmjTxR.js +0 -1429
- package/dist/auth0-spa-js.production.esm-9WdmjTxR.js.map +0 -1
- package/dist/auth0-spa-js.production.esm-BcLLh1tx.cjs +0 -5
- package/dist/auth0-spa-js.production.esm-BcLLh1tx.cjs.map +0 -1
- package/dist/components/jogging/JoggingBlocked.d.ts +0 -7
- package/dist/components/jogging/JoggingBlocked.d.ts.map +0 -1
- package/dist/components/utils/errorHandling.test.d.ts +0 -2
- package/dist/components/utils/errorHandling.test.d.ts.map +0 -1
- package/dist/core.cjs.js +0 -2
- package/dist/core.cjs.js.map +0 -1
- package/dist/core.d.ts +0 -33
- package/dist/core.d.ts.map +0 -1
- package/dist/core.es.js +0 -54
- package/dist/core.es.js.map +0 -1
- package/dist/index-CAib4NKw.js +0 -2261
- package/dist/index-CAib4NKw.js.map +0 -1
- package/dist/index-CqMZL0FV.cjs +0 -2
- package/dist/index-CqMZL0FV.cjs.map +0 -1
- package/dist/index-CxasuX80.js +0 -5212
- package/dist/index-CxasuX80.js.map +0 -1
- package/dist/index-DxwppshT.cjs +0 -29
- package/dist/index-DxwppshT.cjs.map +0 -1
- package/dist/index.cjs.js +0 -2
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.es.js +0 -69
- package/dist/index.es.js.map +0 -1
- package/dist/lib/ConnectedMotionGroup.d.ts +0 -90
- package/dist/lib/ConnectedMotionGroup.d.ts.map +0 -1
- package/dist/lib/JoggerConnection.d.ts +0 -113
- package/dist/lib/JoggerConnection.d.ts.map +0 -1
- package/dist/lib/JoggerConnection.test.d.ts +0 -2
- package/dist/lib/JoggerConnection.test.d.ts.map +0 -1
- package/dist/lib/MotionStreamConnection.d.ts +0 -24
- package/dist/lib/MotionStreamConnection.d.ts.map +0 -1
- package/dist/lib/MotionStreamConnection.test.d.ts +0 -2
- package/dist/lib/MotionStreamConnection.test.d.ts.map +0 -1
- package/dist/lib/motionStateUpdate.d.ts +0 -7
- package/dist/lib/motionStateUpdate.d.ts.map +0 -1
- package/dist/lib/motionStateUpdate.test.d.ts +0 -2
- package/dist/lib/motionStateUpdate.test.d.ts.map +0 -1
- package/dist/manufacturerHomePositions-Ca80ycLi.cjs +0 -2
- package/dist/manufacturerHomePositions-Ca80ycLi.cjs.map +0 -1
- package/dist/manufacturerHomePositions-CgaG5vaK.js +0 -976
- package/dist/manufacturerHomePositions-CgaG5vaK.js.map +0 -1
- package/dist/theming-BQcKj8Gp.cjs +0 -133
- package/dist/theming-BQcKj8Gp.cjs.map +0 -1
- package/dist/theming-Bafjg0Wg.js +0 -23460
- package/dist/theming-Bafjg0Wg.js.map +0 -1
- package/dist/wandelscript.cjs.js +0 -2
- package/dist/wandelscript.cjs.js.map +0 -1
- package/dist/wandelscript.d.ts +0 -2
- package/dist/wandelscript.d.ts.map +0 -1
- package/dist/wandelscript.es.js +0 -5
- package/dist/wandelscript.es.js.map +0 -1
- package/src/3d.ts +0 -15
- package/src/components/jogging/JoggingBlocked.tsx +0 -37
- package/src/components/utils/errorHandling.test.ts +0 -41
- package/src/core.ts +0 -33
- package/src/lib/ConnectedMotionGroup.ts +0 -444
- package/src/lib/JoggerConnection.test.ts +0 -120
- package/src/lib/JoggerConnection.ts +0 -674
- package/src/lib/MotionStreamConnection.test.ts +0 -23
- package/src/lib/MotionStreamConnection.ts +0 -189
- package/src/lib/motionStateUpdate.test.ts +0 -28
- package/src/lib/motionStateUpdate.ts +0 -117
- package/src/wandelscript.ts +0 -2
|
@@ -1,90 +0,0 @@
|
|
|
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(): {
|
|
52
|
-
alpha?: number;
|
|
53
|
-
theta?: number;
|
|
54
|
-
a?: number;
|
|
55
|
-
d?: number;
|
|
56
|
-
reverse_rotation_direction?: boolean;
|
|
57
|
-
}[] | undefined;
|
|
58
|
-
get safetyZones(): {
|
|
59
|
-
[key: string]: import("@wandelbots/nova-api/v2").Collider;
|
|
60
|
-
} | undefined;
|
|
61
|
-
/** Gets the robot mounting position offset in 3D viz coordinates */
|
|
62
|
-
get mountingPosition(): [number, number, number];
|
|
63
|
-
/** Gets the robot mounting position rotation in 3D viz coordinates */
|
|
64
|
-
get mountingQuaternion(): THREE.Quaternion;
|
|
65
|
-
/**
|
|
66
|
-
* Whether the controller is currently in a safety state
|
|
67
|
-
* corresponding to an emergency stop
|
|
68
|
-
*/
|
|
69
|
-
get isEstopActive(): boolean;
|
|
70
|
-
/**
|
|
71
|
-
* Whether the controller is in a safety state
|
|
72
|
-
* that may be non-functional for robot pad purposes
|
|
73
|
-
*/
|
|
74
|
-
get isMoveableSafetyState(): boolean;
|
|
75
|
-
/**
|
|
76
|
-
* Whether the controller is in an operation mode that allows movement
|
|
77
|
-
*/
|
|
78
|
-
get isMoveableOperationMode(): boolean;
|
|
79
|
-
/**
|
|
80
|
-
* Whether the robot is currently active and can be moved, based on the
|
|
81
|
-
* safety state, operation mode and servo toggle activation state.
|
|
82
|
-
*/
|
|
83
|
-
get canBeMoved(): boolean;
|
|
84
|
-
deactivate(): Promise<void>;
|
|
85
|
-
activate(): Promise<void>;
|
|
86
|
-
toggleActivation(): void;
|
|
87
|
-
dispose(): void;
|
|
88
|
-
setJoggingVelocity(velocity: number): void;
|
|
89
|
-
}
|
|
90
|
-
//# sourceMappingURL=ConnectedMotionGroup.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,EAEV,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EAEV,oBAAoB,EAErB,MAAM,wBAAwB,CAAA;AAE/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAKvD,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,aAAa,CAAA;IACvB,WAAW,EAAE,aAAa,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAUD;;;GAGG;AACH,qBAAa,oBAAoB;IA8H7B,QAAQ,CAAC,IAAI,EAAE,UAAU;IACzB,QAAQ,CAAC,UAAU,EAAE,oBAAoB;IACzC,QAAQ,CAAC,WAAW,EAAE,gBAAgB;IACtC,QAAQ,CAAC,kBAAkB,EAAE,gBAAgB;IAC7C,QAAQ,CAAC,iBAAiB,EAAE,yBAAyB;IACrD,QAAQ,CAAC,SAAS,EAAE,OAAO;IAC3B,QAAQ,CAAC,IAAI,EAAE,YAAY,EAAE;IAC7B,QAAQ,CAAC,WAAW,EAAE,sBAAsB;IAC5C,QAAQ,CAAC,sBAAsB,EAAE,oBAAoB;IACrD,QAAQ,CAAC,qBAAqB,EAAE,yBAAyB;WAtI9C,eAAe,CAAC,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE;WAQ1D,OAAO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 @@
|
|
|
1
|
-
import { type 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
|
-
onBlocked?: () => void;
|
|
36
|
-
/**
|
|
37
|
-
* Initialize the jogging connection using jogging endpoint or trajectory endpoint depending on the selected mode.
|
|
38
|
-
*
|
|
39
|
-
* @param nova - The Nova client instance
|
|
40
|
-
* @param motionGroupId - The ID of the motion group to connect to
|
|
41
|
-
* @param options - Configuration options for the jogger connection
|
|
42
|
-
* @param options.mode - The jogging mode to initialize:
|
|
43
|
-
* - "jogging": Continuous jogging mode with persistent websocket for real-time velocity commands
|
|
44
|
-
* - "trajectory": Incremental jogging mode for fixed-distance motions via trajectory planning
|
|
45
|
-
* - "off": No jogging enabled, all websockets closed (default)
|
|
46
|
-
* @param options.timeout - Timeout in milliseconds for websocket initialization (default: 5000ms)
|
|
47
|
-
* @param options.tcp - TCP frame to use for motions (default: from motion group)
|
|
48
|
-
* //param options.coordinateSystem - Coordinate system for jogging commands (default: "world"). Please note: Currently not implemented
|
|
49
|
-
* @param options.orientation - If set to "tool", jogging TcpVelocityRequest will use `use_tool_coordinate_system` option (default: "coordsys")
|
|
50
|
-
* @param options.onError - Error handler for websocket errors
|
|
51
|
-
* @returns Promise resolving to initialized JoggerConnection instance
|
|
52
|
-
*/
|
|
53
|
-
static open(nova: NovaClient, motionGroupId: string, options?: JoggerConnectionOptions): Promise<JoggerConnection>;
|
|
54
|
-
constructor(motionStream: MotionStreamConnection, options?: JoggerConnectionOptions | undefined);
|
|
55
|
-
setOptions(options: Partial<JoggerConnectionOptions>): Promise<void>;
|
|
56
|
-
get motionGroupId(): string;
|
|
57
|
-
get nova(): NovaClient;
|
|
58
|
-
get numJoints(): number;
|
|
59
|
-
stop(): Promise<void>;
|
|
60
|
-
dispose(): Promise<void[]>;
|
|
61
|
-
setJoggingMode(mode: JoggerMode, skipReinitializeIfSameMode?: boolean): Promise<void>;
|
|
62
|
-
initializeJoggingWebsocket(): Promise<void>;
|
|
63
|
-
/**
|
|
64
|
-
* Jogging: Start rotation of a single robot joint at the specified velocity
|
|
65
|
-
*/
|
|
66
|
-
rotateJoints({ joint, direction, velocityRadsPerSec, }: {
|
|
67
|
-
/** Index of the joint to rotate */
|
|
68
|
-
joint: number;
|
|
69
|
-
/** Direction of rotation ("+" or "-") */
|
|
70
|
-
direction: "+" | "-";
|
|
71
|
-
/** Speed of the rotation in radians per second */
|
|
72
|
-
velocityRadsPerSec: number;
|
|
73
|
-
}): Promise<void>;
|
|
74
|
-
/**
|
|
75
|
-
* Jogging: Start the TCP moving along a specified axis at a given velocity
|
|
76
|
-
*/
|
|
77
|
-
translateTCP({ axis, direction, velocityMmPerSec, }: {
|
|
78
|
-
axis: "x" | "y" | "z";
|
|
79
|
-
direction: "-" | "+";
|
|
80
|
-
velocityMmPerSec: number;
|
|
81
|
-
}): Promise<void>;
|
|
82
|
-
/**
|
|
83
|
-
* Jogging: Start the TCP rotating around a specified axis at a given velocity
|
|
84
|
-
*/
|
|
85
|
-
rotateTCP({ axis, direction, velocityRadsPerSec, }: {
|
|
86
|
-
axis: "x" | "y" | "z";
|
|
87
|
-
direction: "-" | "+";
|
|
88
|
-
velocityRadsPerSec: number;
|
|
89
|
-
}): Promise<void>;
|
|
90
|
-
/**
|
|
91
|
-
* Trajectory jogging:
|
|
92
|
-
*
|
|
93
|
-
* Move the robot by a fixed distance in a single cartesian
|
|
94
|
-
* axis, either rotating or translating relative to the TCP.
|
|
95
|
-
* Promise resolves only after the motion has completed.
|
|
96
|
-
*/
|
|
97
|
-
runIncrementalCartesianMotion({ currentTcpPose, currentJoints, velocityInRelevantUnits, axis, direction, motion, }: {
|
|
98
|
-
currentTcpPose: Pose;
|
|
99
|
-
currentJoints: Vector3Simple;
|
|
100
|
-
coordSystemId: string;
|
|
101
|
-
velocityInRelevantUnits: number;
|
|
102
|
-
axis: "x" | "y" | "z";
|
|
103
|
-
direction: "-" | "+";
|
|
104
|
-
motion: {
|
|
105
|
-
type: "rotate";
|
|
106
|
-
distanceRads: number;
|
|
107
|
-
} | {
|
|
108
|
-
type: "translate";
|
|
109
|
-
distanceMm: number;
|
|
110
|
-
};
|
|
111
|
-
}): Promise<void>;
|
|
112
|
-
}
|
|
113
|
-
//# sourceMappingURL=JoggerConnection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
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C,EAClC,cAAc,EACd,aAAa,EAEb,uBAAuB,EACvB,IAAI,EACJ,SAAS,EACT,MAAM,GACP,EAAE;QACD,cAAc,EAAE,IAAI,CAAA;QACpB,aAAa,EAAE,aAAa,CAAA;QAC5B,aAAa,EAAE,MAAM,CAAA;QACrB,uBAAuB,EAAE,MAAM,CAAA;QAC/B,IAAI,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;QACrB,SAAS,EAAE,GAAG,GAAG,GAAG,CAAA;QACpB,MAAM,EACF;YACE,IAAI,EAAE,QAAQ,CAAA;YACd,YAAY,EAAE,MAAM,CAAA;SACrB,GACD;YACE,IAAI,EAAE,WAAW,CAAA;YACjB,UAAU,EAAE,MAAM,CAAA;SACnB,CAAA;KACN;CAiRF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"JoggerConnection.test.d.ts","sourceRoot":"","sources":["../../src/lib/JoggerConnection.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { type 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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MotionStreamConnection.d.ts","sourceRoot":"","sources":["../../src/lib/MotionStreamConnection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EACV,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACrB,MAAM,wBAAwB,CAAA;AAW/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;IA6EvD,IAAI,aAAa,WAEhB;IAED,IAAI,YAAY,WAEf;IAED,IAAI,sBAAsB,WAGzB;IAED,IAAI,MAAM;;QAMT;IAED,OAAO;CAGR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MotionStreamConnection.test.d.ts","sourceRoot":"","sources":["../../src/lib/MotionStreamConnection.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { MotionGroupState, Pose } from "@wandelbots/nova-js/v2";
|
|
2
|
-
import type { Vector3Simple } from "./JoggerConnection";
|
|
3
|
-
export declare function jointValuesEqual(oldJointValues: number[], newJointValues: number[], changeDeltaThreshold: number): boolean;
|
|
4
|
-
export declare function poseEqual(oldTcp: Pose | undefined, newTcp: Pose | undefined, changeDeltaThreshold: number): boolean;
|
|
5
|
-
export declare function tcpMotionEqual(oldMotionState: MotionGroupState, newMotionState: MotionGroupState, changeDeltaThreshold: number): boolean;
|
|
6
|
-
export declare function unwrapRotationVector(newRotationVectorApi: Vector3Simple, currentRotationVectorApi: Vector3Simple): Vector3Simple;
|
|
7
|
-
//# sourceMappingURL=motionStateUpdate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAGvD,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;AAED,wBAAgB,oBAAoB,CAClC,oBAAoB,EAAE,aAAa,EACnC,wBAAwB,EAAE,aAAa,GACtC,aAAa,CAkCf"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"motionStateUpdate.test.d.ts","sourceRoot":"","sources":["../../src/lib/motionStateUpdate.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("./index-DxwppshT.cjs"),w=require("three"),W=require("three-stdlib"),F=require("@react-three/fiber"),y=require("@react-three/drei"),d=require("@mui/material"),X=require("mobx-react-lite"),f=require("react"),Q=require("react-i18next"),R=require("./index-CqMZL0FV.cjs"),ee=require("react-error-boundary");function te(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const m=te(w);function re(e){switch(e.shape_type){case"convex_hull":return new W.ConvexGeometry(e.vertices.map(r=>new m.Vector3(r[0]/1e3,r[1]/1e3,r[2]/1e3)));case"box":return new m.BoxGeometry(e.size_x/1e3,e.size_y/1e3,e.size_z/1e3);case"sphere":return new m.SphereGeometry(e.radius/1e3);case"capsule":return new m.CapsuleGeometry(e.radius/1e3,e.cylinder_height/1e3);case"cylinder":return new m.CylinderGeometry(e.radius/1e3,e.radius/1e3,e.height/1e3);case"rectangle":return new m.BoxGeometry(e.size_x/1e3,e.size_y/1e3,0);default:return console.warn(`${e.shape_type} is not supported`),new m.BufferGeometry}}function ne({name:e,collider:n,children:r}){var l,u;const o=((l=n.pose)==null?void 0:l.position)??[0,0,0],s=((u=n.pose)==null?void 0:u.orientation)??[0,0,0];return n.margin&&console.warn(`${e} margin is not supported`),t.jsxRuntimeExports.jsx("mesh",{name:e,position:new m.Vector3(o[0],o[1],o[2]).divideScalar(1e3),rotation:new m.Euler(s[0],s[1],s[2],"XYZ"),geometry:re(n.shape),children:r})}function se({name:e,colliders:n,meshChildrenProvider:r,...o}){return t.jsxRuntimeExports.jsx("group",{name:e,...o,children:Object.entries(n).map(([s,l])=>t.jsxRuntimeExports.jsx(ne,{name:s,collider:l,children:r(s,l)},s))})}function oe({scene:e,meshChildrenProvider:n}){const r=e.colliders;return t.jsxRuntimeExports.jsx("group",{children:r&&t.jsxRuntimeExports.jsx(se,{meshChildrenProvider:n,colliders:r})})}function D(){return t.jsxRuntimeExports.jsx(y.Environment,{children:t.jsxRuntimeExports.jsx(ie,{})})}function ie({positions:e=[2,0,2,0,2,0,2,0]}){return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(y.Lightformer,{intensity:5,"rotation-x":Math.PI/2,position:[0,5,-9],scale:[10,10,1]}),t.jsxRuntimeExports.jsx("group",{rotation:[0,.5,0],children:t.jsxRuntimeExports.jsx("group",{children:e.map((n,r)=>t.jsxRuntimeExports.jsx(y.Lightformer,{form:"circle",intensity:5,rotation:[Math.PI/2,0,0],position:[n,4,r*4],scale:[3,1,1]},r))})}),t.jsxRuntimeExports.jsx(y.Lightformer,{intensity:40,"rotation-y":Math.PI/2,position:[-5,1,-1],scale:[20,.1,1]}),t.jsxRuntimeExports.jsx(y.Lightformer,{intensity:20,"rotation-y":-Math.PI,position:[-5,-2,-1],scale:[20,.1,1]}),t.jsxRuntimeExports.jsx(y.Lightformer,{"rotation-y":Math.PI/2,position:[-5,-1,-1],scale:[20,.5,1],intensity:5}),t.jsxRuntimeExports.jsx(y.Lightformer,{"rotation-y":-Math.PI/2,position:[10,1,0],scale:[20,1,1],intensity:10}),t.jsxRuntimeExports.jsx(y.Lightformer,{form:"ring",color:"white",intensity:5,scale:10,position:[-15,4,-18],target:[0,0,0]})]})}function ae(e){if(e.length<3)return console.log("Not enough vertices to define a plane"),{isCoplanar:!1};const n=new m.Vector3(e[0].x,e[0].y,e[0].z),r=new m.Vector3(e[1].x,e[1].y,e[1].z),o=new m.Vector3(e[2].x,e[2].y,e[2].z),s=new m.Vector3().subVectors(r,n),l=new m.Vector3().subVectors(o,n),u=new m.Vector3().crossVectors(s,l).normalize();for(let a=3;a<e.length;a++){const j=new m.Vector3(e[a].x,e[a].y,e[a].z),p=new m.Vector3().subVectors(j,n),x=u.dot(p);if(Math.abs(x)>1e-6)return console.log("Vertices are not on the same plane"),{isCoplanar:!1}}return{isCoplanar:!0,normal:u}}function ue({safetyZones:e,...n}){return t.jsxRuntimeExports.jsx("group",{...n,children:e.map((r,o)=>{let s=[];return r.geometry&&(r.geometry.compound?s=r.geometry.compound.child_geometries:r.geometry.convex_hull&&(s=[r.geometry])),s.map((l,u)=>{if(!l.convex_hull)return null;const a=l.convex_hull.vertices.map(x=>new m.Vector3(x.x/1e3,x.y/1e3,x.z/1e3)),j=ae(a);if(j.isCoplanar&&j.normal){const i=new m.Vector3().addVectors(a[0],j.normal.multiplyScalar(1e-4));a.push(i)}let p;try{p=new W.ConvexGeometry(a)}catch(x){return console.log("Error creating ConvexGeometry:",x),null}return t.jsxRuntimeExports.jsx("mesh",{geometry:p,children:t.jsxRuntimeExports.jsx("meshStandardMaterial",{attach:"material",color:"#009f4d",opacity:.2,depthTest:!1,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-u},o)},`${o}-${u}`)})})})}function ce({trajectory:e,...n}){var o;const r=((o=e.trajectory)==null?void 0:o.map(s=>s.tcp_pose?new m.Vector3(s.tcp_pose.position.x/1e3,s.tcp_pose.position.z/1e3,-s.tcp_pose.position.y/1e3):null).filter(s=>s!==null))||[];return t.jsxRuntimeExports.jsx("group",{...n,children:r.length>0&&t.jsxRuntimeExports.jsx(y.Line,{points:r,lineWidth:3,polygonOffset:!0,polygonOffsetFactor:10,polygonOffsetUnits:10})})}const P="0.0.0-semantically-released";function V(e){let n=P;return P.startsWith("0.")&&(n=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${n?`@${n}`:""}/public/models/${e}.glb`}function le(e){function n(r){return r.children.length===0?[r]:[r,...r.children.flatMap(o=>n(o))]}return n(e).filter(r=>H(r))}function q(e){return e.name.endsWith("_FLG")}function H(e){return/_J[0-9]+$/.test(e.name)}function xe(e,n){let r;function o(s){if(q(s)){if(r)throw Error(`Found multiple flange groups in robot model ${n}; first ${r.name} then ${s.name}. Only one _FLG group is allowed.`);r=s}H(s),s.children.map(o)}if(o(e.scene),!r)throw Error(`No flange group found in robot model ${n}. Flange must be identified with a name ending in _FLG.`);return{gltf:e}}function N({rapidlyChangingMotionState:e,dhParameters:n,onRotationChanged:r,children:o}){const s=f.useRef([]),l=f.useRef([]),u=f.useRef(null),{invalidate:a}=F.useThree();f.useEffect(()=>{const i=e.joint_position.filter(c=>c!==void 0);return u.current=new R.ValueInterpolator(i,{tension:120,friction:20,threshold:.001}),()=>{var c;(c=u.current)==null||c.destroy()}},[]),F.useFrame((i,c)=>{if(u.current){const h=u.current.update(c);x(),h||a()}});function j(i){i&&(l.current=le(i),x(),a())}function p(i){var c;s.current=i,(c=u.current)==null||c.setTarget(i)}function x(){var c;const i=((c=u.current)==null?void 0:c.getCurrentValues())||[];if(r)r(l.current,i);else for(const[h,g]of l.current.entries()){const E=n[h],M=E.theta||0,v=E.reverse_rotation_direction?-1:1;g.rotation.y=v*(i[h]||0)+M}}return R.useAutorun(()=>{const i=e.joint_position.filter(c=>c!==void 0);requestAnimationFrame(()=>p(i))}),t.jsxRuntimeExports.jsx("group",{ref:j,children:o})}const me="line",pe="mesh";function fe({rapidlyChangingMotionState:e,dhParameters:n,...r}){const o=new w.Matrix4,s=f.useRef([]),l=f.useRef([]);f.useEffect(()=>{s.current=new Array(n.length).fill(null),l.current=new Array(n.length).fill(null)},[n.length]);function u(p,x){const i=new w.Vector3,c=new w.Quaternion,h=new w.Vector3;o.decompose(i,c,h);const g=i.clone(),E=new w.Matrix4().makeRotationY(p.theta+x*(p.reverse_rotation_direction?-1:1)).multiply(new w.Matrix4().makeTranslation(0,p.d/1e3,0)).multiply(new w.Matrix4().makeTranslation(p.a/1e3,0,0)).multiply(new w.Matrix4().makeRotationX(p.alpha));return o.multiply(E),o.decompose(i,c,h),{a:g,b:i}}function a(p,x,i,c){if(!n)return;const h=n[p];if(!h)return;const{a:g,b:E}=u(h,c);x.geometry.setPositions([g.toArray(),E.toArray()].flat()),i.position.set(E.x,E.y,E.z)}function j(p,x){o.identity();for(let i=0;i<Math.min(p.length,x.length);i++){const c=s.current[i],h=l.current[i];c&&h&&a(i,c,h,x[i])}}return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:t.jsxRuntimeExports.jsx(N,{rapidlyChangingMotionState:e,dhParameters:n,onRotationChanged:j,children:t.jsxRuntimeExports.jsxs("group",{...r,name:"Scene",children:[t.jsxRuntimeExports.jsxs("mesh",{children:[t.jsxRuntimeExports.jsx("sphereGeometry",{args:[.01,32,32]}),t.jsxRuntimeExports.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]}),n.map((p,x)=>{const{a:i,b:c}=u(p,e.joint_position[x]??0),h=`dhrobot_J0${x}`;return t.jsxRuntimeExports.jsxs("group",{name:h,children:[t.jsxRuntimeExports.jsx(y.Line,{ref:g=>{s.current[x]=g},name:me,points:[i,c],color:"white",lineWidth:5}),t.jsxRuntimeExports.jsxs("mesh",{ref:g=>{l.current[x]=g},name:pe,position:c,children:[t.jsxRuntimeExports.jsx("sphereGeometry",{args:[.01,32,32]}),t.jsxRuntimeExports.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+x)]},h)})]})})})}const de=console.warn;function he(){return f.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&de(e)}},[]),t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{})}function je(e){return e.type==="Mesh"}function Re({modelURL:e,flangeRef:n,postModelRender:r,...o}){const{gltf:s}=xe(y.useGLTF(e),e.split("/").pop()||e),l=f.useCallback(a=>{a&&r&&r()},[e]);function u(a){return je(a)?t.jsxRuntimeExports.jsx("mesh",{name:a.name,geometry:a.geometry,material:a.material,position:a.position,rotation:a.rotation},a.uuid):t.jsxRuntimeExports.jsx("group",{name:a.name,position:a.position,rotation:a.rotation,ref:q(a)?n:void 0,children:a.children.map(u)},a.uuid)}return t.jsxRuntimeExports.jsx("group",{...o,dispose:null,ref:l,children:u(s.scene)})}const ge=(e,n)=>{e.userData.isGhost||(e.traverse(r=>{if(r instanceof m.Mesh){r.material instanceof m.Material&&(r.material.colorWrite=!1);const o=r.clone(),s=r.clone();o.material=new m.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:m.DoubleSide}),o.userData.isGhost=!0,s.material=new m.MeshStandardMaterial({color:n,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:m.DoubleSide}),s.userData.isGhost=!0,r.parent&&(r.parent.add(o),r.parent.add(s))}}),e.userData.isGhost=!0)},ye=e=>{if(!e.userData.isGhost)return;const n=[];e.traverse(r=>{var o;r instanceof m.Mesh&&((o=r.userData)!=null&&o.isGhost?n.push(r):r.material instanceof m.Material&&(r.material.colorWrite=!0))}),n.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},U=t.externalizeComponent(({rapidlyChangingMotionState:e,modelFromController:n,dhParameters:r,getModel:o=V,flangeRef:s,postModelRender:l,transparentColor:u,...a})=>{const[j,p]=f.useState(null),x=f.useCallback(c=>{p(c)},[]);f.useEffect(()=>{j&&(u?ge(j,u):ye(j))},[j,u]);const i=t.jsxRuntimeExports.jsx(fe,{rapidlyChangingMotionState:e,dhParameters:r,...a});return t.jsxRuntimeExports.jsxs(ee.ErrorBoundary,{fallback:i,onError:c=>{console.error(c)},children:[t.jsxRuntimeExports.jsx(f.Suspense,{fallback:i,children:t.jsxRuntimeExports.jsx("group",{ref:x,children:t.jsxRuntimeExports.jsx(N,{rapidlyChangingMotionState:e,dhParameters:r,children:t.jsxRuntimeExports.jsx(Re,{modelURL:o(n),postModelRender:l,flangeRef:s,...a})})})}),t.jsxRuntimeExports.jsx(he,{})]})});function $({connectedMotionGroup:e,getModel:n=V,flangeRef:r,transparentColor:o,postModelRender:s,...l}){return e.dhParameters?t.jsxRuntimeExports.jsx(U,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:n,flangeRef:r,transparentColor:o,postModelRender:s,...l}):null}const Ee=t.externalizeComponent(X.observer(({robotName:e,programState:n,safetyState:r,operationMode:o,driveToHomeEnabled:s=!1,onDriveToHomePress:l,onDriveToHomeRelease:u,connectedMotionGroup:a,robotComponent:j=$,customContentComponent:p,className:x})=>{var B;const i=d.useTheme(),{t:c}=Q.useTranslation(),[h,g]=f.useState(!1),E=f.useRef(null),M=f.useRef(null),[v,Y]=f.useState(!1),[C,K]=f.useState({width:400,height:600}),[Me,Z]=f.useState(0);f.useEffect(()=>{const I=()=>{if(M.current){const{offsetWidth:L,offsetHeight:z}=M.current;Y(L>z),K({width:L,height:z})}};I();const O=new ResizeObserver(I);return M.current&&O.observe(M.current),()=>{O.disconnect()}},[]);const k=f.useCallback(()=>{Z(I=>I+1)},[]),_=f.useCallback(()=>{!s||!l||(g(!0),l())},[s,l]),S=f.useCallback(()=>{!s||!u||(g(!1),u())},[s,u]),A=f.useCallback(()=>{h&&u&&(g(!1),u())},[h,u]),b=v?C.width<350:C.height<200,G=v?C.height<310:C.height<450;return t.jsxRuntimeExports.jsx(d.Card,{ref:M,className:x,sx:{width:"100%",height:"100%",display:"flex",flexDirection:v?"row":"column",position:"relative",overflow:"hidden",minWidth:{xs:180,sm:220,md:250},minHeight:v?{xs:200,sm:240,md:260}:{xs:150,sm:180,md:220},border:`1px solid ${i.palette.divider}`,borderRadius:"18px",boxShadow:"none",backgroundColor:((B=i.palette.backgroundPaperElevation)==null?void 0:B[8])||"#2A2A3F",backgroundImage:"none"},children:v?t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(d.Box,{sx:{flex:"0 0 50%",position:"relative",height:"100%",minHeight:"100%",maxHeight:"100%",borderRadius:1,m:{xs:1.5,sm:2,md:3},mr:{xs:.75,sm:1,md:1.5},overflow:"hidden",display:b?"none":"block"},children:!b&&t.jsxRuntimeExports.jsxs(F.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:i.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute",top:0,left:0},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[t.jsxRuntimeExports.jsx(D,{}),t.jsxRuntimeExports.jsx(y.Bounds,{fit:!0,observe:!0,margin:1,maxDuration:1,children:t.jsxRuntimeExports.jsx(j,{connectedMotionGroup:a,postModelRender:k})})]})}),t.jsxRuntimeExports.jsxs(d.Box,{sx:{flex:"1",display:"flex",flexDirection:"column",justifyContent:"flex-start",width:b?"100%":"50%"},children:[t.jsxRuntimeExports.jsxs(d.Box,{sx:{p:{xs:1.5,sm:2,md:3},pb:{xs:1,sm:1.5,md:2},textAlign:"left"},children:[t.jsxRuntimeExports.jsx(d.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),t.jsxRuntimeExports.jsx(R.ProgramStateIndicator,{programState:n,safetyState:r,operationMode:o})]}),t.jsxRuntimeExports.jsxs(d.Box,{sx:{p:{xs:1.5,sm:2,md:3},pt:0,flex:"1",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[!G&&p&&t.jsxRuntimeExports.jsxs(d.Box,{children:[t.jsxRuntimeExports.jsx(p,{}),t.jsxRuntimeExports.jsx(d.Divider,{sx:{mt:1,mb:0,borderColor:i.palette.divider,opacity:.5}})]}),t.jsxRuntimeExports.jsx(d.Box,{sx:{mt:!G&&p?"auto":0},children:t.jsxRuntimeExports.jsx(d.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:{xs:1,sm:1.5,md:2},mb:{xs:.5,sm:.75,md:1}},children:t.jsxRuntimeExports.jsx(d.Button,{ref:E,variant:"contained",color:"secondary",size:"small",disabled:!s,onMouseDown:_,onMouseUp:S,onMouseLeave:A,onTouchStart:_,onTouchEnd:S,sx:{textTransform:"none",px:1.5,py:.5},children:c("RobotCard.DriveToHome.bt")})})})]})]})]}):t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:t.jsxRuntimeExports.jsxs(d.Box,{sx:{p:3,height:"100%",display:"flex",flexDirection:"column"},children:[t.jsxRuntimeExports.jsxs(d.Box,{children:[t.jsxRuntimeExports.jsx(d.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),t.jsxRuntimeExports.jsx(R.ProgramStateIndicator,{programState:n,safetyState:r,operationMode:o})]}),t.jsxRuntimeExports.jsx(d.Box,{sx:{flex:b?0:1,position:"relative",minHeight:b?0:{xs:120,sm:150,md:200},height:b?0:"auto",borderRadius:1,overflow:"hidden",display:b?"none":"block"},children:!b&&t.jsxRuntimeExports.jsxs(F.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:i.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute"},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[t.jsxRuntimeExports.jsx(D,{}),t.jsxRuntimeExports.jsx(y.Bounds,{fit:!0,clip:!0,observe:!0,margin:1,maxDuration:1,children:t.jsxRuntimeExports.jsx(j,{connectedMotionGroup:a,postModelRender:k})})]})}),t.jsxRuntimeExports.jsxs(d.Box,{children:[!G&&p&&t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(p,{}),t.jsxRuntimeExports.jsx(d.Divider,{sx:{mt:1,mb:0,borderColor:i.palette.divider,opacity:.5}})]}),t.jsxRuntimeExports.jsx(d.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:!G&&p?{xs:1,sm:2,md:5}:{xs:.5,sm:1,md:2},mb:{xs:.5,sm:.75,md:1}},children:t.jsxRuntimeExports.jsx(d.Button,{ref:E,variant:"contained",color:"secondary",size:"small",disabled:!s,onMouseDown:_,onMouseUp:S,onMouseLeave:A,onTouchStart:_,onTouchEnd:S,sx:{textTransform:"none",px:1.5,py:.5},children:c("RobotCard.DriveToHome.bt")})})]})]})})})})),be=Array(6).fill(2*Math.PI),T={[R.Manufacturer.Abb]:[0,0,0,0,Math.PI/2,0,0],[R.Manufacturer.Fanuc]:[0,0,0,0,-Math.PI/2,0,0],[R.Manufacturer.Yaskawa]:[0,0,0,0,-Math.PI/2,0,0],[R.Manufacturer.Kuka]:[0,-Math.PI/2,Math.PI/2,0,Math.PI/2,0,0],[R.Manufacturer.Universalrobots]:[0,-Math.PI/2,-Math.PI/2,-Math.PI/2,Math.PI/2,-Math.PI/2,0]};function J(e){const[n]=e.split("_");switch(n){case"ABB":return R.Manufacturer.Abb;case"FANUC":return R.Manufacturer.Fanuc;case"YASKAWA":return R.Manufacturer.Yaskawa;case"KUKA":return R.Manufacturer.Kuka;case"UniversalRobots":return R.Manufacturer.Universalrobots;default:return null}}function we(e,n){const r=J(e);return r&&r in T?T[r]:n||null}exports.CollisionSceneRenderer=oe;exports.MANUFACTURER_HOME_CONFIGS=T;exports.PresetEnvironment=D;exports.Robot=$;exports.RobotCard=Ee;exports.SafetyZonesRenderer=ue;exports.SupportedRobot=U;exports.TrajectoryRenderer=ce;exports.defaultAxisConfig=be;exports.defaultGetModel=V;exports.extractManufacturer=J;exports.getDefaultHomeConfig=we;
|
|
2
|
-
//# sourceMappingURL=manufacturerHomePositions-Ca80ycLi.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"manufacturerHomePositions-Ca80ycLi.cjs","sources":["../src/components/3d-viewport/collider/colliderShapeToBufferGeometry.ts","../src/components/3d-viewport/collider/ColliderElement.tsx","../src/components/3d-viewport/collider/ColliderCollection.tsx","../src/components/3d-viewport/collider/CollisionSceneRenderer.tsx","../src/components/3d-viewport/PresetEnvironment.tsx","../src/components/3d-viewport/SafetyZonesRenderer.tsx","../src/components/3d-viewport/TrajectoryRenderer.tsx","../src/components/robots/robotModelLogic.ts","../src/components/robots/RobotAnimator.tsx","../src/components/robots/DHRobot.tsx","../src/components/ConsoleFilter.tsx","../src/components/robots/GenericRobot.tsx","../src/components/robots/ghostStyle.ts","../src/components/robots/SupportedRobot.tsx","../src/components/robots/Robot.tsx","../src/components/RobotCard.tsx","../src/components/robots/AxisConfig.ts","../src/components/robots/manufacturerHomePositions.ts"],"sourcesContent":["import type { ColliderShape } from \"@wandelbots/nova-js/v1\"\nimport * as THREE from \"three\"\nimport { ConvexGeometry } from \"three-stdlib\"\n\nexport function colliderShapeToBufferGeometry(\n shape: ColliderShape,\n): THREE.BufferGeometry {\n const shapeType = shape.shape_type\n switch (shapeType) {\n case \"convex_hull\":\n return new ConvexGeometry(\n shape.vertices.map(\n (vertex) =>\n new THREE.Vector3(\n vertex[0] / 1000,\n vertex[1] / 1000,\n vertex[2] / 1000,\n ),\n ),\n )\n case \"box\":\n return new THREE.BoxGeometry(\n shape.size_x / 1000,\n shape.size_y / 1000,\n shape.size_z / 1000,\n )\n case \"sphere\":\n return new THREE.SphereGeometry(shape.radius / 1000)\n case \"capsule\":\n return new THREE.CapsuleGeometry(\n shape.radius / 1000,\n shape.cylinder_height / 1000,\n )\n case \"cylinder\":\n return new THREE.CylinderGeometry(\n shape.radius / 1000,\n shape.radius / 1000,\n shape.height / 1000,\n )\n case \"rectangle\": {\n return new THREE.BoxGeometry(shape.size_x / 1000, shape.size_y / 1000, 0)\n }\n default: {\n console.warn(`${shape.shape_type} is not supported`)\n return new THREE.BufferGeometry()\n }\n }\n}\n","import type { Collider } from \"@wandelbots/nova-js/v1\"\nimport type React from \"react\"\nimport * as THREE from \"three\"\nimport { colliderShapeToBufferGeometry } from \"./colliderShapeToBufferGeometry\"\n\ntype ColliderElementProps = {\n name?: string\n collider: Collider\n children?: React.ReactNode\n}\n\nexport default function ColliderElement({\n name,\n collider,\n children,\n}: ColliderElementProps) {\n const position = collider.pose?.position ?? [0, 0, 0]\n const rotation = collider.pose?.orientation ?? [0, 0, 0]\n if (collider.margin) {\n console.warn(`${name} margin is not supported`)\n }\n return (\n <mesh\n name={name}\n position={new THREE.Vector3(\n position[0],\n position[1],\n position[2],\n ).divideScalar(1000)}\n rotation={new THREE.Euler(rotation[0], rotation[1], rotation[2], \"XYZ\")}\n geometry={colliderShapeToBufferGeometry(collider.shape)}\n >\n {children}\n </mesh>\n )\n}\n","import type { ThreeElements } from \"@react-three/fiber\"\nimport type { Collider } from \"@wandelbots/nova-js/v1\"\nimport ColliderElement from \"./ColliderElement\"\n\nexport type MeshChildrenProvider = (\n key: string,\n collider: Collider,\n) => React.ReactNode\n\ntype ColliderCollectionProps = {\n name?: string\n colliders: Record<string, Collider>\n meshChildrenProvider: MeshChildrenProvider\n} & ThreeElements[\"group\"]\n\nexport default function ColliderCollection({\n name,\n colliders,\n meshChildrenProvider,\n ...props\n}: ColliderCollectionProps) {\n return (\n <group name={name} {...props}>\n {Object.entries(colliders).map(([colliderKey, collider]) => (\n <ColliderElement\n key={colliderKey}\n name={colliderKey}\n collider={collider}\n children={meshChildrenProvider(colliderKey, collider)}\n />\n ))}\n </group>\n )\n}\n","import type { CollisionScene } from \"@wandelbots/nova-js/v1\"\nimport ColliderCollection, {\n type MeshChildrenProvider,\n} from \"./ColliderCollection\"\n\ntype CollisionSceneRendererProps = {\n scene: CollisionScene\n meshChildrenProvider: MeshChildrenProvider\n}\n\nexport default function CollisionSceneRenderer({\n scene,\n meshChildrenProvider,\n}: CollisionSceneRendererProps) {\n const colliders = scene.colliders\n return (\n <group>\n {colliders && (\n <ColliderCollection\n meshChildrenProvider={meshChildrenProvider}\n colliders={colliders}\n />\n )}\n </group>\n )\n}\n","import { Environment, Lightformer } from \"@react-three/drei\"\n\n/**\n * Renders a preset environment for the 3D scene.\n * This component wraps the scene with an `Environment` component\n * and builds a lightmap build with `Lightformers`.\n */\nexport function PresetEnvironment() {\n return (\n <Environment>\n <Lightformers />\n </Environment>\n )\n}\n\nfunction Lightformers({ positions = [2, 0, 2, 0, 2, 0, 2, 0] }) {\n return (\n <>\n {/* Ceiling */}\n <Lightformer\n intensity={5}\n rotation-x={Math.PI / 2}\n position={[0, 5, -9]}\n scale={[10, 10, 1]}\n />\n <group rotation={[0, 0.5, 0]}>\n <group>\n {positions.map((x, i) => (\n <Lightformer\n key={i}\n form=\"circle\"\n intensity={5}\n rotation={[Math.PI / 2, 0, 0]}\n position={[x, 4, i * 4]}\n scale={[3, 1, 1]}\n />\n ))}\n </group>\n </group>\n {/* Sides */}\n <Lightformer\n intensity={40}\n rotation-y={Math.PI / 2}\n position={[-5, 1, -1]}\n scale={[20, 0.1, 1]}\n />\n <Lightformer\n intensity={20}\n rotation-y={-Math.PI}\n position={[-5, -2, -1]}\n scale={[20, 0.1, 1]}\n />\n\n <Lightformer\n rotation-y={Math.PI / 2}\n position={[-5, -1, -1]}\n scale={[20, 0.5, 1]}\n intensity={5}\n />\n <Lightformer\n rotation-y={-Math.PI / 2}\n position={[10, 1, 0]}\n scale={[20, 1, 1]}\n intensity={10}\n />\n\n {/* Key */}\n <Lightformer\n form=\"ring\"\n color=\"white\"\n intensity={5}\n scale={10}\n position={[-15, 4, -18]}\n target={[0, 0, 0]}\n />\n </>\n )\n}\n","import { type ThreeElements } from \"@react-three/fiber\"\nimport type { Geometry, SafetySetupSafetyZone } from \"@wandelbots/nova-js/v1\"\nimport * as THREE from \"three\"\nimport { ConvexGeometry } from \"three-stdlib\"\n\nexport type SafetyZonesRendererProps = {\n safetyZones: SafetySetupSafetyZone[]\n} & ThreeElements[\"group\"]\n\ninterface CoplanarityResult {\n isCoplanar: boolean\n normal?: THREE.Vector3\n}\n\nfunction areVerticesCoplanar(vertices: THREE.Vector3[]): CoplanarityResult {\n if (vertices.length < 3) {\n console.log(\"Not enough vertices to define a plane\")\n return { isCoplanar: false }\n }\n\n // Convert Vector3d to THREE.Vector3\n const v0 = new THREE.Vector3(vertices[0].x, vertices[0].y, vertices[0].z)\n const v1 = new THREE.Vector3(vertices[1].x, vertices[1].y, vertices[1].z)\n const v2 = new THREE.Vector3(vertices[2].x, vertices[2].y, vertices[2].z)\n\n const vector1 = new THREE.Vector3().subVectors(v1, v0)\n const vector2 = new THREE.Vector3().subVectors(v2, v0)\n const normal = new THREE.Vector3().crossVectors(vector1, vector2).normalize()\n\n // Check if all remaining vertices lie on the same plane\n for (let i = 3; i < vertices.length; i++) {\n const vi = new THREE.Vector3(vertices[i].x, vertices[i].y, vertices[i].z)\n const vector = new THREE.Vector3().subVectors(vi, v0)\n const dotProduct = normal.dot(vector)\n if (Math.abs(dotProduct) > 1e-6) {\n // Allowing a small tolerance\n console.log(\"Vertices are not on the same plane\")\n return { isCoplanar: false }\n }\n }\n\n return { isCoplanar: true, normal }\n}\n\nexport function SafetyZonesRenderer({\n safetyZones,\n ...props\n}: SafetyZonesRendererProps) {\n return (\n <group {...props}>\n {safetyZones.map((zone, index) => {\n let geometries: Geometry[] = []\n if (zone.geometry) {\n if (zone.geometry.compound) {\n geometries = zone.geometry.compound.child_geometries\n } else if (zone.geometry.convex_hull) {\n geometries = [zone.geometry]\n }\n }\n\n return geometries.map((geometry, i) => {\n if (!geometry.convex_hull) return null\n\n const vertices = geometry.convex_hull.vertices.map(\n (v) => new THREE.Vector3(v.x / 1000, v.y / 1000, v.z / 1000),\n )\n\n // Check if the vertices are on the same plane and only define a plane\n // Algorithm has troubles with vertices that are on the same plane so we\n // add a new vertex slightly moved along the normal direction\n const coplanarityResult = areVerticesCoplanar(vertices)\n\n if (coplanarityResult.isCoplanar && coplanarityResult.normal) {\n // Add a new vertex slightly moved along the normal direction\n const offset = 0.0001 // Adjust the offset as needed\n const newVertex = new THREE.Vector3().addVectors(\n vertices[0],\n coplanarityResult.normal.multiplyScalar(offset),\n )\n vertices.push(newVertex)\n }\n\n let convexGeometry\n try {\n convexGeometry = new ConvexGeometry(vertices)\n } catch (error) {\n console.log(\"Error creating ConvexGeometry:\", error)\n return null\n }\n return (\n <mesh key={`${index}-${i}`} geometry={convexGeometry}>\n <meshStandardMaterial\n key={index}\n attach=\"material\"\n color=\"#009f4d\"\n opacity={0.2}\n depthTest={false}\n depthWrite={false}\n transparent\n polygonOffset\n polygonOffsetFactor={-i}\n />\n </mesh>\n )\n })\n })}\n </group>\n )\n}\n","import { Line } from \"@react-three/drei\"\nimport type { GetTrajectoryResponse } from \"@wandelbots/nova-js/v1\"\nimport * as THREE from \"three\"\n\nexport type TrajectoryRendererProps = {\n trajectory: GetTrajectoryResponse\n} & React.JSX.IntrinsicElements[\"group\"]\n\nexport function TrajectoryRenderer({\n trajectory,\n ...props\n}: TrajectoryRendererProps) {\n const points =\n trajectory.trajectory\n ?.map((point) => {\n if (point.tcp_pose) {\n return new THREE.Vector3(\n point.tcp_pose.position.x / 1000,\n point.tcp_pose.position.z / 1000,\n -point.tcp_pose.position.y / 1000,\n )\n }\n return null\n })\n .filter((point): point is THREE.Vector3 => point !== null) || []\n\n return (\n <group {...props}>\n {points.length > 0 && (\n <Line\n points={points}\n lineWidth={3}\n polygonOffset={true}\n polygonOffsetFactor={10}\n polygonOffsetUnits={10}\n />\n )}\n </group>\n )\n}\n","import type { Object3D } from \"three\"\nimport type { GLTF } from \"three-stdlib\"\nimport { version } from \"../../../package.json\"\n\nexport function defaultGetModel(modelFromController: string): string {\n let useVersion = version\n if (version.startsWith(\"0.\")) {\n useVersion = \"\"\n }\n return `https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${useVersion ? `@${useVersion}` : \"\"}/public/models/${modelFromController}.glb`\n}\n\n/**\n * Finds all the joint groups in a GLTF tree, as identified\n * by the _Jxx name ending convention.\n */\nexport function collectJoints(rootObject: Object3D): Object3D[] {\n function getAllObjects(root: Object3D): Object3D[] {\n if (root.children.length === 0) {\n return [root]\n }\n return [root, ...root.children.flatMap((child) => getAllObjects(child))]\n }\n\n return getAllObjects(rootObject).filter((o) => isJoint(o))\n}\n\n/**\n * Checks if a specified threejs object represents the flange of a\n * robot, based on the _FLG name ending convention.\n */\nexport function isFlange(node: Object3D) {\n return node.name.endsWith(\"_FLG\")\n}\n\n/**\n * Checks if a specified threejs object represents a joint of a\n * robot, based on the _Jxx name ending convention.\n */\nexport function isJoint(node: Object3D) {\n return /_J[0-9]+$/.test(node.name)\n}\n\n/**\n * Validates that the loaded GLTF file has six joints and a flange group.\n */\nexport function parseRobotModel(gltf: GLTF, filename: string): { gltf: GLTF } {\n let flange: Object3D | undefined\n const joints: Object3D[] = []\n\n function parseNode(node: Object3D) {\n if (isFlange(node)) {\n if (flange) {\n throw Error(\n `Found multiple flange groups in robot model ${filename}; first ${flange.name} then ${node.name}. Only one _FLG group is allowed.`,\n )\n }\n\n flange = node\n }\n\n if (isJoint(node)) {\n joints.push(node)\n }\n\n node.children.map(parseNode)\n }\n\n parseNode(gltf.scene)\n\n if (!flange) {\n throw Error(\n `No flange group found in robot model ${filename}. Flange must be identified with a name ending in _FLG.`,\n )\n }\n\n return { gltf }\n}\n","import { useFrame, useThree } from \"@react-three/fiber\"\nimport type { DHParameter, MotionGroupState } from \"@wandelbots/nova-js/v2\"\nimport React, { useEffect, useRef } from \"react\"\nimport type { Group, Object3D } from \"three\"\nimport { useAutorun } from \"../utils/hooks\"\nimport { ValueInterpolator } from \"../utils/interpolation\"\nimport { collectJoints } from \"./robotModelLogic\"\n\ntype RobotAnimatorProps = {\n rapidlyChangingMotionState: MotionGroupState\n dhParameters: DHParameter[]\n onRotationChanged?: (joints: Object3D[], jointValues: number[]) => void\n children: React.ReactNode\n}\n\nexport default function RobotAnimator({\n rapidlyChangingMotionState,\n dhParameters,\n onRotationChanged,\n children,\n}: RobotAnimatorProps) {\n const jointValues = useRef<number[]>([])\n const jointObjects = useRef<Object3D[]>([])\n const interpolatorRef = useRef<ValueInterpolator | null>(null)\n const { invalidate } = useThree()\n\n // Initialize interpolator\n useEffect(() => {\n const initialJointValues = rapidlyChangingMotionState.joint_position.filter(\n (item) => item !== undefined,\n )\n\n interpolatorRef.current = new ValueInterpolator(initialJointValues, {\n tension: 120, // Controls spring stiffness - higher values create faster, more responsive motion\n friction: 20, // Controls damping - higher values reduce oscillation and create smoother settling\n threshold: 0.001,\n })\n\n return () => {\n interpolatorRef.current?.destroy()\n }\n }, [])\n\n // Animation loop that runs at the display's refresh rate\n useFrame((state, delta) => {\n if (interpolatorRef.current) {\n const isComplete = interpolatorRef.current.update(delta)\n setRotation()\n\n // Trigger a re-render only if the animation is still running\n if (!isComplete) {\n invalidate()\n }\n }\n })\n\n function setGroupRef(group: Group | null) {\n if (!group) return\n\n jointObjects.current = collectJoints(group)\n\n // Set initial position\n setRotation()\n invalidate()\n }\n\n function updateJoints(newJointValues: number[]) {\n jointValues.current = newJointValues\n interpolatorRef.current?.setTarget(newJointValues)\n }\n\n function setRotation() {\n const updatedJointValues = interpolatorRef.current?.getCurrentValues() || []\n\n if (onRotationChanged) {\n onRotationChanged(jointObjects.current, updatedJointValues)\n } else {\n for (const [index, object] of jointObjects.current.entries()) {\n const dhParam = dhParameters[index]\n const rotationOffset = dhParam.theta || 0\n const rotationSign = dhParam.reverse_rotation_direction ? -1 : 1\n\n object.rotation.y =\n rotationSign * (updatedJointValues[index] || 0) + rotationOffset\n }\n }\n }\n\n useAutorun(() => {\n const newJointValues = rapidlyChangingMotionState.joint_position.filter(\n (item) => item !== undefined,\n )\n\n requestAnimationFrame(() => updateJoints(newJointValues))\n })\n\n return <group ref={setGroupRef}>{children}</group>\n}\n","import { Line } from \"@react-three/drei\"\nimport type { DHParameter } from \"@wandelbots/nova-js/v2\"\nimport React, { useRef } from \"react\"\nimport type * as THREE from \"three\"\nimport { Matrix4, Quaternion, Vector3 } from \"three\"\nimport type { LineGeometry } from \"three/examples/jsm/lines/LineGeometry.js\"\nimport RobotAnimator from \"./RobotAnimator\"\nimport type { DHRobotProps } from \"./SupportedRobot\"\n\nconst CHILD_LINE = \"line\"\nconst CHILD_MESH = \"mesh\"\n\nexport function DHRobot({\n rapidlyChangingMotionState,\n dhParameters,\n ...props\n}: DHRobotProps) {\n // reused in every update\n const accumulatedMatrix = new Matrix4()\n\n // Store direct references to avoid searching by name\n const lineRefs = useRef<any[]>([])\n const meshRefs = useRef<(THREE.Mesh | null)[]>([])\n\n // Initialize refs array when dhParameters change\n React.useEffect(() => {\n lineRefs.current = new Array(dhParameters.length).fill(null)\n meshRefs.current = new Array(dhParameters.length).fill(null)\n }, [dhParameters.length])\n\n // Updates accumulatedMatrix with every execution\n // Reset the matrix to identity if you start a new position update\n function getLinePoints(\n dhParameter: DHParameter,\n jointRotation: number,\n ): {\n a: THREE.Vector3\n b: THREE.Vector3\n } {\n const position = new Vector3()\n const quaternion = new Quaternion()\n const scale = new Vector3()\n accumulatedMatrix.decompose(position, quaternion, scale)\n const prevPosition = position.clone() // Update the previous position\n\n const matrix = new Matrix4()\n .makeRotationY(\n dhParameter.theta! +\n jointRotation * (dhParameter.reverse_rotation_direction ? -1 : 1),\n ) // Rotate around Z\n .multiply(new Matrix4().makeTranslation(0, dhParameter.d! / 1000, 0)) // Translate along Z\n .multiply(new Matrix4().makeTranslation(dhParameter.a! / 1000, 0, 0)) // Translate along X\n .multiply(new Matrix4().makeRotationX(dhParameter.alpha!)) // Rotate around X\n\n // Accumulate transformations\n accumulatedMatrix.multiply(matrix)\n accumulatedMatrix.decompose(position, quaternion, scale)\n return { a: prevPosition, b: position }\n }\n\n function setJointLineRotation(\n jointIndex: number,\n line: any, // Use any for drei Line component\n mesh: THREE.Mesh,\n jointValue: number,\n ) {\n if (!dhParameters) {\n return\n }\n\n const dh_parameter = dhParameters[jointIndex]\n if (!dh_parameter) {\n return\n }\n\n const { a, b } = getLinePoints(dh_parameter, jointValue)\n const lineGeometry = line.geometry as LineGeometry\n lineGeometry.setPositions([a.toArray(), b.toArray()].flat())\n\n mesh.position.set(b.x, b.y, b.z)\n }\n\n function setRotation(joints: THREE.Object3D[], jointValues: number[]) {\n accumulatedMatrix.identity()\n\n // Use direct refs instead of searching by name\n for (\n let jointIndex = 0;\n jointIndex < Math.min(joints.length, jointValues.length);\n jointIndex++\n ) {\n const line = lineRefs.current[jointIndex]\n const mesh = meshRefs.current[jointIndex]\n\n if (line && mesh) {\n setJointLineRotation(jointIndex, line, mesh, jointValues[jointIndex]!)\n }\n }\n }\n\n return (\n <>\n <RobotAnimator\n rapidlyChangingMotionState={rapidlyChangingMotionState}\n dhParameters={dhParameters}\n onRotationChanged={setRotation}\n >\n <group {...props} name=\"Scene\">\n <mesh>\n <sphereGeometry args={[0.01, 32, 32]} />\n <meshStandardMaterial color={\"black\"} depthTest={true} />\n </mesh>\n {dhParameters!.map((param, index) => {\n const { a, b } = getLinePoints(\n param,\n rapidlyChangingMotionState.joint_position[index] ?? 0,\n )\n const jointName = `dhrobot_J0${index}`\n return (\n <group name={jointName} key={jointName}>\n <Line\n ref={(ref) => {\n lineRefs.current[index] = ref\n }}\n name={CHILD_LINE}\n points={[a, b]}\n color={\"white\"}\n lineWidth={5}\n />\n <mesh\n ref={(ref) => {\n meshRefs.current[index] = ref\n }}\n name={CHILD_MESH}\n key={\"mesh_\" + index}\n position={b}\n >\n <sphereGeometry args={[0.01, 32, 32]} />\n <meshStandardMaterial color={\"black\"} depthTest={true} />\n </mesh>\n </group>\n )\n })}\n </group>\n </RobotAnimator>\n </>\n )\n}\n","\"use client\"\nimport { useEffect } from \"react\"\n\nconst defaultWarn = console.warn\n\nexport default function ConsoleFilter() {\n useEffect(() => {\n console.warn = (data) => {\n // This message is caused by a bug from useSpring in combination with Canvas \"demand\" frameloop.\n // For now we can only suppress this warning there are no sideeffects yet\n // See https://github.com/pmndrs/react-spring/issues/1586#issuecomment-915051856\n if (\n data ===\n \"Cannot call the manual advancement of rafz whilst frameLoop is not set as demand\"\n ) {\n return\n }\n\n defaultWarn(data)\n }\n }, [])\n\n return <></>\n}\n","import { useGLTF } from \"@react-three/drei\"\nimport type { ThreeElements } from \"@react-three/fiber\"\nimport React, { useCallback } from \"react\"\nimport type { Group, Mesh } from \"three\"\nimport { type Object3D } from \"three\"\nimport { isFlange, parseRobotModel } from \"./robotModelLogic\"\n\nexport type RobotModelProps = {\n modelURL: string\n /**\n * Called after a robot model has been loaded and\n * rendered into the threejs scene\n */\n postModelRender?: () => void\n flangeRef?: React.Ref<Group>\n} & ThreeElements[\"group\"]\n\nfunction isMesh(node: Object3D): node is Mesh {\n return node.type === \"Mesh\"\n}\n\nexport function GenericRobot({\n modelURL,\n flangeRef,\n postModelRender,\n ...props\n}: RobotModelProps) {\n const { gltf } = parseRobotModel(\n useGLTF(modelURL),\n modelURL.split(\"/\").pop() || modelURL,\n )\n\n const groupRef: React.RefCallback<Group> = useCallback(\n (group) => {\n if (group && postModelRender) {\n postModelRender()\n }\n },\n [modelURL],\n )\n\n function renderNode(node: Object3D): React.ReactNode {\n if (isMesh(node)) {\n return (\n <mesh\n name={node.name}\n key={node.uuid}\n geometry={node.geometry}\n material={node.material}\n position={node.position}\n rotation={node.rotation}\n />\n )\n } else {\n return (\n <group\n name={node.name}\n key={node.uuid}\n position={node.position}\n rotation={node.rotation}\n ref={isFlange(node) ? flangeRef : undefined}\n >\n {node.children.map(renderNode)}\n </group>\n )\n }\n }\n\n return (\n <group {...props} dispose={null} ref={groupRef}>\n {renderNode(gltf.scene)}\n </group>\n )\n}\n","import * as THREE from \"three\"\n\nexport const applyGhostStyle = (robot: THREE.Group, color: string) => {\n if (robot.userData.isGhost) return\n\n robot.traverse((obj) => {\n if (obj instanceof THREE.Mesh) {\n if (obj.material instanceof THREE.Material) {\n obj.material.colorWrite = false\n }\n\n // Create a clone of the mesh\n const depth = obj.clone()\n const ghost = obj.clone()\n\n depth.material = new THREE.MeshStandardMaterial({\n depthTest: true,\n depthWrite: true,\n colorWrite: false,\n polygonOffset: true,\n polygonOffsetFactor: -1,\n side: THREE.DoubleSide,\n })\n depth.userData.isGhost = true\n\n // Set the material for the ghost mesh\n ghost.material = new THREE.MeshStandardMaterial({\n color: color,\n opacity: 0.3,\n depthTest: true,\n depthWrite: false,\n transparent: true,\n polygonOffset: true,\n polygonOffsetFactor: -2,\n side: THREE.DoubleSide,\n })\n ghost.userData.isGhost = true\n\n if (obj.parent) {\n obj.parent.add(depth)\n obj.parent.add(ghost)\n }\n }\n })\n\n robot.userData.isGhost = true\n}\n\nexport const removeGhostStyle = (robot: THREE.Group) => {\n if (!robot.userData.isGhost) return\n\n const objectsToRemove: THREE.Object3D[] = []\n\n robot.traverse((obj) => {\n if (obj instanceof THREE.Mesh) {\n if (obj.userData?.isGhost) {\n objectsToRemove.push(obj)\n } else if (obj.material instanceof THREE.Material) {\n obj.material.colorWrite = true\n }\n }\n })\n\n objectsToRemove.forEach((obj) => {\n if (obj.parent) {\n obj.parent.remove(obj)\n }\n })\n\n robot.userData.isGhost = false\n}\n","import type { ThreeElements } from \"@react-three/fiber\"\nimport type { DHParameter, MotionGroupState } from \"@wandelbots/nova-js/v2\"\nimport { Suspense, useCallback, useEffect, useState } from \"react\"\nimport { DHRobot } from \"./DHRobot\"\n\nimport { ErrorBoundary } from \"react-error-boundary\"\nimport type * as THREE from \"three\"\nimport { externalizeComponent } from \"../../externalizeComponent\"\nimport ConsoleFilter from \"../ConsoleFilter\"\nimport { GenericRobot } from \"./GenericRobot\"\nimport RobotAnimator from \"./RobotAnimator\"\nimport { applyGhostStyle, removeGhostStyle } from \"./ghostStyle\"\nimport { defaultGetModel } from \"./robotModelLogic\"\n\nexport type DHRobotProps = {\n rapidlyChangingMotionState: MotionGroupState\n dhParameters: Array<DHParameter>\n} & ThreeElements[\"group\"]\n\nexport type SupportedRobotProps = {\n rapidlyChangingMotionState: MotionGroupState\n modelFromController: string\n dhParameters: DHParameter[]\n flangeRef?: React.Ref<THREE.Group>\n getModel?: (modelFromController: string) => string\n postModelRender?: () => void\n transparentColor?: string\n} & ThreeElements[\"group\"]\n\nexport const SupportedRobot = externalizeComponent(\n ({\n rapidlyChangingMotionState,\n modelFromController,\n dhParameters,\n getModel = defaultGetModel,\n flangeRef,\n postModelRender,\n transparentColor,\n ...props\n }: SupportedRobotProps) => {\n const [robotGroup, setRobotGroup] = useState<THREE.Group | null>(null)\n\n const setRobotRef = useCallback((instance: THREE.Group | null) => {\n setRobotGroup(instance)\n }, [])\n\n useEffect(() => {\n if (!robotGroup) return\n\n if (transparentColor) {\n applyGhostStyle(robotGroup, transparentColor)\n } else {\n removeGhostStyle(robotGroup)\n }\n }, [robotGroup, transparentColor])\n\n const dhrobot = (\n <DHRobot\n rapidlyChangingMotionState={rapidlyChangingMotionState}\n dhParameters={dhParameters}\n {...props}\n />\n )\n\n return (\n <ErrorBoundary\n fallback={dhrobot}\n onError={(err) => {\n // Missing model; show the fallback for now\n console.error(err)\n }}\n >\n <Suspense fallback={dhrobot}>\n <group ref={setRobotRef}>\n <RobotAnimator\n rapidlyChangingMotionState={rapidlyChangingMotionState}\n dhParameters={dhParameters}\n >\n <GenericRobot\n modelURL={getModel(modelFromController)}\n postModelRender={postModelRender}\n flangeRef={flangeRef}\n {...props}\n />\n </RobotAnimator>\n </group>\n </Suspense>\n <ConsoleFilter />\n </ErrorBoundary>\n )\n },\n)\n","import type { ThreeElements } from \"@react-three/fiber\"\n\nimport type { Group } from \"three\"\nimport type { ConnectedMotionGroup } from \"../../lib/ConnectedMotionGroup\"\nimport { defaultGetModel } from \"./robotModelLogic\"\nimport { SupportedRobot } from \"./SupportedRobot\"\n\nexport type RobotProps = {\n connectedMotionGroup: ConnectedMotionGroup\n getModel?: (modelFromController: string) => string\n flangeRef?: React.Ref<Group>\n transparentColor?: string\n postModelRender?: () => void\n} & ThreeElements[\"group\"]\n\n/**\n * The Robot component is a wrapper around the SupportedRobot component\n * for usage with @wandelbots/nova-js ConnectedMotionGroup object.\n *\n * @param {RobotProps} props - The properties for the Robot component.\n * @param {ConnectedMotionGroup} props.connectedMotionGroup - The connected motion group containing motion state and parameters.\n * @param {Function} [props.getModel=defaultGetModel] - Optional function to get the model URL. Defaults to defaultGetModel.\n * @param {Object} props - Additional properties passed to the SupportedRobot component.\n *\n * @returns {JSX.Element} The rendered SupportedRobot component.\n */\nexport function Robot({\n connectedMotionGroup,\n getModel = defaultGetModel,\n flangeRef,\n transparentColor,\n postModelRender,\n ...props\n}: RobotProps) {\n if (!connectedMotionGroup.dhParameters) {\n return null\n }\n\n return (\n <SupportedRobot\n rapidlyChangingMotionState={\n connectedMotionGroup.rapidlyChangingMotionState\n }\n modelFromController={connectedMotionGroup.modelFromController || \"\"}\n dhParameters={connectedMotionGroup.dhParameters}\n getModel={getModel}\n flangeRef={flangeRef}\n transparentColor={transparentColor}\n postModelRender={postModelRender}\n {...props}\n />\n )\n}\n","import { Box, Button, Card, Divider, Typography, useTheme } from \"@mui/material\"\nimport { Bounds } from \"@react-three/drei\"\nimport { Canvas } from \"@react-three/fiber\"\nimport type { OperationMode, SafetyStateType } from \"@wandelbots/nova-js/v2\"\nimport { observer } from \"mobx-react-lite\"\nimport { useCallback, useEffect, useRef, useState } from \"react\"\nimport { useTranslation } from \"react-i18next\"\nimport type { Group } from \"three\"\nimport { externalizeComponent } from \"../externalizeComponent\"\nimport type { ConnectedMotionGroup } from \"../lib/ConnectedMotionGroup\"\nimport { PresetEnvironment } from \"./3d-viewport/PresetEnvironment\"\nimport type { ProgramState } from \"./ProgramControl\"\nimport { ProgramStateIndicator } from \"./ProgramStateIndicator\"\nimport { Robot } from \"./robots/Robot\"\n\nexport interface RobotCardProps {\n /** Name of the robot displayed at the top */\n robotName: string\n /** Current program state */\n programState: ProgramState\n /** Current safety state of the robot controller */\n safetyState: SafetyStateType\n /** Current operation mode of the robot controller */\n operationMode: OperationMode\n /** Whether the \"Drive to Home\" button should be enabled */\n driveToHomeEnabled?: boolean\n /** Callback fired when \"Drive to Home\" button is pressed */\n onDriveToHomePress?: () => void\n /** Callback fired when \"Drive to Home\" button is released */\n onDriveToHomeRelease?: () => void\n /**\n * Callback fired when \"Drive to Home\" button is pressed, with the default home position.\n * If provided, this will be called instead of onDriveToHomePress, providing the recommended\n * home position joint configuration based on the robot manufacturer.\n */\n onDriveToHomePressWithConfig?: (homePosition: number[]) => void\n /**\n * Callback fired when \"Drive to Home\" button is released after using onDriveToHomePressWithConfig.\n * If provided, this will be called instead of onDriveToHomeRelease.\n */\n onDriveToHomeReleaseWithConfig?: () => void\n /**\n * Custom default joint configuration to use if manufacturer-based defaults are not available.\n * Joint values should be in radians.\n */\n defaultJointConfig?: number[]\n /** Connected motion group for the robot */\n connectedMotionGroup: ConnectedMotionGroup\n /** Custom robot component to render (optional, defaults to Robot) */\n robotComponent?: React.ComponentType<{\n connectedMotionGroup: ConnectedMotionGroup\n flangeRef?: React.Ref<Group>\n postModelRender?: () => void\n transparentColor?: string\n getModel?: (modelFromController: string) => string\n }>\n /** Custom component to render in the content area (optional) */\n customContentComponent?: React.ComponentType<Record<string, unknown>>\n /** Additional CSS class name */\n className?: string\n}\n\n/**\n * A responsive card component that displays a 3D robot with states and controls.\n * The card automatically adapts to its container's size and aspect ratio.\n *\n * Features:\n * - Fully responsive Material-UI Card that adapts to container dimensions\n * - Automatic layout switching based on aspect ratio:\n * - Portrait mode: Vertical layout with robot in center\n * - Landscape mode: Horizontal layout with robot on left, content on right (left-aligned)\n * - Responsive 3D robot rendering:\n * - Scales dynamically with container size\n * - Hides at very small sizes to preserve usability\n * - Adaptive margin based on available space\n * - Smart spacing and padding that reduces at smaller sizes\n * - Minimum size constraints for usability while maximizing content density\n * - Robot name displayed in Typography h6 at top-left\n * - Program state indicator below the name\n * - Auto-fitting 3D robot model that scales with container size\n * - Customizable content area for displaying custom React components\n * - Transparent gray divider line\n * - \"Drive to Home\" button with press-and-hold functionality\n * - Localization support via react-i18next\n * - Material-UI theming integration\n *\n * Usage with custom content:\n * ```tsx\n * // Example custom timer component\n * const CustomTimer = () => (\n * <Box>\n * <Typography variant=\"body1\" sx={{ color: \"text.secondary\" }}>\n * Runtime\n * </Typography>\n * <Typography variant=\"h6\">05:23</Typography>\n * </Box>\n * )\n *\n * <RobotCard\n * robotName=\"UR5e Robot\"\n * programState={ProgramState.RUNNING}\n * customContentComponent={CustomTimer}\n * // ... other props\n * />\n * ```\n */\nexport const RobotCard = externalizeComponent(\n observer(\n ({\n robotName,\n programState,\n safetyState,\n operationMode,\n driveToHomeEnabled = false,\n onDriveToHomePress,\n onDriveToHomeRelease,\n connectedMotionGroup,\n robotComponent: RobotComponent = Robot,\n customContentComponent: CustomContentComponent,\n className,\n }: RobotCardProps) => {\n const theme = useTheme()\n const { t } = useTranslation()\n const [isDriveToHomePressed, setIsDriveToHomePressed] = useState(false)\n const driveButtonRef = useRef<HTMLButtonElement>(null)\n const cardRef = useRef<HTMLDivElement>(null)\n const [isLandscape, setIsLandscape] = useState(false)\n const [cardSize, setCardSize] = useState<{\n width: number\n height: number\n }>({ width: 400, height: 600 })\n const [modelRenderTrigger, setModelRenderTrigger] = useState(0)\n\n // Hook to detect aspect ratio and size changes\n useEffect(() => {\n const checkDimensions = () => {\n if (cardRef.current) {\n const { offsetWidth, offsetHeight } = cardRef.current\n setIsLandscape(offsetWidth > offsetHeight)\n setCardSize({ width: offsetWidth, height: offsetHeight })\n }\n }\n\n // Initial check\n checkDimensions()\n\n // Set up ResizeObserver to watch for size changes\n const resizeObserver = new ResizeObserver(checkDimensions)\n if (cardRef.current) {\n resizeObserver.observe(cardRef.current)\n }\n\n return () => {\n resizeObserver.disconnect()\n }\n }, [])\n\n const handleModelRender = useCallback(() => {\n // Trigger bounds refresh when model renders\n setModelRenderTrigger((prev) => prev + 1)\n }, [])\n\n const handleDriveToHomeMouseDown = useCallback(() => {\n if (!driveToHomeEnabled || !onDriveToHomePress) return\n setIsDriveToHomePressed(true)\n onDriveToHomePress()\n }, [driveToHomeEnabled, onDriveToHomePress])\n\n const handleDriveToHomeMouseUp = useCallback(() => {\n if (!driveToHomeEnabled || !onDriveToHomeRelease) return\n setIsDriveToHomePressed(false)\n onDriveToHomeRelease()\n }, [driveToHomeEnabled, onDriveToHomeRelease])\n\n const handleDriveToHomeMouseLeave = useCallback(() => {\n if (isDriveToHomePressed && onDriveToHomeRelease) {\n setIsDriveToHomePressed(false)\n onDriveToHomeRelease()\n }\n }, [isDriveToHomePressed, onDriveToHomeRelease])\n\n // Determine if robot should be hidden at small sizes to save space\n const shouldHideRobot = isLandscape\n ? cardSize.width < 350\n : cardSize.height < 200 // Hide robot at height < 200px in portrait\n\n // Determine if custom content should be hidden when height is too low\n // Custom content should be hidden BEFORE the robot (at higher threshold)\n const shouldHideCustomContent = isLandscape\n ? cardSize.height < 310 // Landscape: hide custom content at height < 310px\n : cardSize.height < 450 // Portrait: hide custom content at height < 450px\n\n return (\n <Card\n ref={cardRef}\n className={className}\n sx={{\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n flexDirection: isLandscape ? \"row\" : \"column\",\n position: \"relative\",\n overflow: \"hidden\",\n minWidth: { xs: 180, sm: 220, md: 250 },\n minHeight: isLandscape\n ? { xs: 200, sm: 240, md: 260 } // Allow runtime hiding at < 283px\n : { xs: 150, sm: 180, md: 220 }, // Allow progressive hiding in portrait mode\n border: `1px solid ${theme.palette.divider}`,\n borderRadius: \"18px\",\n boxShadow: \"none\",\n backgroundColor:\n theme.palette.backgroundPaperElevation?.[8] || \"#2A2A3F\",\n backgroundImage: \"none\", // Override any gradient from elevation\n }}\n >\n {isLandscape ? (\n <>\n {/* Landscape Layout: Robot on left, content on right */}\n <Box\n sx={{\n flex: \"0 0 50%\",\n position: \"relative\",\n height: \"100%\",\n minHeight: \"100%\",\n maxHeight: \"100%\",\n borderRadius: 1,\n m: { xs: 1.5, sm: 2, md: 3 },\n mr: { xs: 0.75, sm: 1, md: 1.5 },\n overflow: \"hidden\", // Prevent content from affecting container size\n display: shouldHideRobot ? \"none\" : \"block\",\n }}\n >\n {!shouldHideRobot && (\n <Canvas\n orthographic\n camera={{\n position: [3, 2, 3],\n zoom: 1,\n }}\n shadows\n frameloop=\"demand\"\n style={{\n borderRadius: theme.shape.borderRadius,\n width: \"100%\",\n height: \"100%\",\n background: \"transparent\",\n position: \"absolute\",\n top: 0,\n left: 0,\n }}\n dpr={[1, 2]}\n gl={{ alpha: true, antialias: true }}\n >\n <PresetEnvironment />\n <Bounds fit observe margin={1} maxDuration={1}>\n <RobotComponent\n connectedMotionGroup={connectedMotionGroup}\n postModelRender={handleModelRender}\n />\n </Bounds>\n </Canvas>\n )}\n </Box>\n\n {/* Content container on right */}\n <Box\n sx={{\n flex: shouldHideRobot ? \"1\" : \"1\",\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"flex-start\",\n width: shouldHideRobot ? \"100%\" : \"50%\",\n }}\n >\n {/* Header section with robot name and program state */}\n <Box\n sx={{\n p: { xs: 1.5, sm: 2, md: 3 },\n pb: { xs: 1, sm: 1.5, md: 2 },\n textAlign: \"left\",\n }}\n >\n <Typography variant=\"h6\" component=\"h2\" sx={{ mb: 1 }}>\n {robotName}\n </Typography>\n <ProgramStateIndicator\n programState={programState}\n safetyState={safetyState}\n operationMode={operationMode}\n />\n </Box>\n\n {/* Bottom section with custom content and button */}\n <Box\n sx={{\n p: { xs: 1.5, sm: 2, md: 3 },\n pt: 0,\n flex: \"1\",\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"space-between\",\n }}\n >\n {/* Custom content section - hidden if height is too low in landscape mode */}\n {!shouldHideCustomContent && CustomContentComponent && (\n <Box>\n <CustomContentComponent />\n\n {/* Divider */}\n <Divider\n sx={{\n mt: 1,\n mb: 0,\n borderColor: theme.palette.divider,\n opacity: 0.5,\n }}\n />\n </Box>\n )}\n\n <Box\n sx={{\n mt:\n !shouldHideCustomContent && CustomContentComponent\n ? \"auto\"\n : 0,\n }}\n >\n {/* Drive to Home button with some space */}\n <Box\n sx={{\n display: \"flex\",\n justifyContent: \"flex-start\",\n mt: { xs: 1, sm: 1.5, md: 2 },\n mb: { xs: 0.5, sm: 0.75, md: 1 },\n }}\n >\n <Button\n ref={driveButtonRef}\n variant=\"contained\"\n color=\"secondary\"\n size=\"small\"\n disabled={!driveToHomeEnabled}\n onMouseDown={handleDriveToHomeMouseDown}\n onMouseUp={handleDriveToHomeMouseUp}\n onMouseLeave={handleDriveToHomeMouseLeave}\n onTouchStart={handleDriveToHomeMouseDown}\n onTouchEnd={handleDriveToHomeMouseUp}\n sx={{\n textTransform: \"none\",\n px: 1.5,\n py: 0.5,\n }}\n >\n {t(\"RobotCard.DriveToHome.bt\")}\n </Button>\n </Box>\n </Box>\n </Box>\n </Box>\n </>\n ) : (\n <>\n {/* Portrait Layout: Header, Robot, Footer */}\n <Box\n sx={{\n p: 3,\n height: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n }}\n >\n {/* Header section with robot name and program state */}\n <Box>\n <Typography variant=\"h6\" component=\"h2\" sx={{ mb: 1 }}>\n {robotName}\n </Typography>\n <ProgramStateIndicator\n programState={programState}\n safetyState={safetyState}\n operationMode={operationMode}\n />\n </Box>\n\n {/* 3D Robot viewport in center */}\n <Box\n sx={{\n flex: shouldHideRobot ? 0 : 1,\n position: \"relative\",\n minHeight: shouldHideRobot\n ? 0\n : { xs: 120, sm: 150, md: 200 },\n height: shouldHideRobot ? 0 : \"auto\",\n borderRadius: 1,\n overflow: \"hidden\",\n display: shouldHideRobot ? \"none\" : \"block\",\n }}\n >\n {!shouldHideRobot && (\n <Canvas\n orthographic\n camera={{\n position: [3, 2, 3],\n zoom: 1,\n }}\n shadows\n frameloop=\"demand\"\n style={{\n borderRadius: theme.shape.borderRadius,\n width: \"100%\",\n height: \"100%\",\n background: \"transparent\",\n position: \"absolute\",\n }}\n dpr={[1, 2]}\n gl={{ alpha: true, antialias: true }}\n >\n <PresetEnvironment />\n <Bounds fit clip observe margin={1} maxDuration={1}>\n <RobotComponent\n connectedMotionGroup={connectedMotionGroup}\n postModelRender={handleModelRender}\n />\n </Bounds>\n </Canvas>\n )}\n </Box>\n\n {/* Bottom section with custom content and button */}\n <Box>\n {/* Custom content section - hidden if height is too low */}\n {!shouldHideCustomContent && CustomContentComponent && (\n <>\n <CustomContentComponent />\n\n {/* Divider */}\n <Divider\n sx={{\n mt: 1,\n mb: 0,\n borderColor: theme.palette.divider,\n opacity: 0.5,\n }}\n />\n </>\n )}\n\n {/* Drive to Home button with some space */}\n <Box\n sx={{\n display: \"flex\",\n justifyContent: \"flex-start\",\n mt:\n !shouldHideCustomContent && CustomContentComponent\n ? { xs: 1, sm: 2, md: 5 }\n : { xs: 0.5, sm: 1, md: 2 },\n mb: { xs: 0.5, sm: 0.75, md: 1 },\n }}\n >\n <Button\n ref={driveButtonRef}\n variant=\"contained\"\n color=\"secondary\"\n size=\"small\"\n disabled={!driveToHomeEnabled}\n onMouseDown={handleDriveToHomeMouseDown}\n onMouseUp={handleDriveToHomeMouseUp}\n onMouseLeave={handleDriveToHomeMouseLeave}\n onTouchStart={handleDriveToHomeMouseDown}\n onTouchEnd={handleDriveToHomeMouseUp}\n sx={{\n textTransform: \"none\",\n px: 1.5,\n py: 0.5,\n }}\n >\n {t(\"RobotCard.DriveToHome.bt\")}\n </Button>\n </Box>\n </Box>\n </Box>\n </>\n )}\n </Card>\n )\n },\n ),\n)\n","export type AxisConfig = number[]\n\nexport const defaultAxisConfig: AxisConfig = Array(6).fill(2 * Math.PI)\n","import { Manufacturer } from \"@wandelbots/nova-js/v2\"\n\n/**\n * Default home configs for different robot manufacturers.\n * These joint configurations represent safe home configs for each manufacturer's robots.\n * All angles are in radians.\n */\nexport const MANUFACTURER_HOME_CONFIGS: Record<Manufacturer, number[]> = {\n [Manufacturer.Abb]: [0.0, 0.0, 0.0, 0.0, Math.PI / 2, 0.0, 0.0],\n [Manufacturer.Fanuc]: [0.0, 0.0, 0.0, 0.0, -Math.PI / 2, 0.0, 0.0],\n [Manufacturer.Yaskawa]: [0.0, 0.0, 0.0, 0.0, -Math.PI / 2, 0.0, 0.0],\n [Manufacturer.Kuka]: [\n 0.0,\n -Math.PI / 2,\n Math.PI / 2,\n 0.0,\n Math.PI / 2,\n 0.0,\n 0.0,\n ],\n [Manufacturer.Universalrobots]: [\n 0.0,\n -Math.PI / 2,\n -Math.PI / 2,\n -Math.PI / 2,\n Math.PI / 2,\n -Math.PI / 2,\n 0.0,\n ],\n}\n\n/**\n * Extracts manufacturer from modelFromController string.\n * @param modelFromController - String in format \"Manufacturer_ModelName\"\n * @returns Manufacturer enum value or null if not recognized\n */\nexport function extractManufacturer(\n modelFromController: string,\n): Manufacturer | null {\n const [manufacturerString] = modelFromController.split(\"_\")\n\n // Handle the mapping from string to enum\n switch (manufacturerString) {\n case \"ABB\":\n return Manufacturer.Abb\n case \"FANUC\":\n return Manufacturer.Fanuc\n case \"YASKAWA\":\n return Manufacturer.Yaskawa\n case \"KUKA\":\n return Manufacturer.Kuka\n case \"UniversalRobots\":\n return Manufacturer.Universalrobots\n default:\n return null\n }\n}\n\n/**\n * Gets the default home config for a robot based on its model identifier.\n * @param modelFromController - String in format \"Manufacturer_ModelName\"\n * @param defaultJointConfig - Optional custom default configuration to use if manufacturer not found\n * @returns Array of joint positions in radians, or null if no configuration available\n */\nexport function getDefaultHomeConfig(\n modelFromController: string,\n defaultJointConfig?: number[],\n): number[] | null {\n const manufacturer = extractManufacturer(modelFromController)\n\n if (manufacturer && manufacturer in MANUFACTURER_HOME_CONFIGS) {\n return MANUFACTURER_HOME_CONFIGS[manufacturer]\n }\n\n return defaultJointConfig || null\n}\n"],"names":["colliderShapeToBufferGeometry","shape","ConvexGeometry","vertex","THREE","ColliderElement","name","collider","children","position","_a","rotation","_b","jsx","ColliderCollection","colliders","meshChildrenProvider","props","colliderKey","CollisionSceneRenderer","scene","PresetEnvironment","Environment","Lightformers","positions","jsxs","Fragment","Lightformer","x","i","areVerticesCoplanar","vertices","v0","v1","v2","vector1","vector2","normal","vi","vector","dotProduct","SafetyZonesRenderer","safetyZones","zone","index","geometries","geometry","v","coplanarityResult","newVertex","convexGeometry","error","TrajectoryRenderer","trajectory","points","point","Line","defaultGetModel","modelFromController","useVersion","version","collectJoints","rootObject","getAllObjects","root","child","o","isJoint","isFlange","node","parseRobotModel","gltf","filename","flange","parseNode","RobotAnimator","rapidlyChangingMotionState","dhParameters","onRotationChanged","jointValues","useRef","jointObjects","interpolatorRef","invalidate","useThree","useEffect","initialJointValues","item","ValueInterpolator","useFrame","state","delta","isComplete","setRotation","setGroupRef","group","updateJoints","newJointValues","updatedJointValues","object","dhParam","rotationOffset","rotationSign","useAutorun","CHILD_LINE","CHILD_MESH","DHRobot","accumulatedMatrix","Matrix4","lineRefs","meshRefs","React","getLinePoints","dhParameter","jointRotation","Vector3","quaternion","Quaternion","scale","prevPosition","matrix","setJointLineRotation","jointIndex","line","mesh","jointValue","dh_parameter","a","b","joints","param","jointName","ref","defaultWarn","ConsoleFilter","data","isMesh","GenericRobot","modelURL","flangeRef","postModelRender","useGLTF","groupRef","useCallback","renderNode","applyGhostStyle","robot","color","obj","depth","ghost","removeGhostStyle","objectsToRemove","SupportedRobot","externalizeComponent","getModel","transparentColor","robotGroup","setRobotGroup","useState","setRobotRef","instance","dhrobot","ErrorBoundary","err","Suspense","Robot","connectedMotionGroup","RobotCard","observer","robotName","programState","safetyState","operationMode","driveToHomeEnabled","onDriveToHomePress","onDriveToHomeRelease","RobotComponent","CustomContentComponent","className","theme","useTheme","t","useTranslation","isDriveToHomePressed","setIsDriveToHomePressed","driveButtonRef","cardRef","isLandscape","setIsLandscape","cardSize","setCardSize","modelRenderTrigger","setModelRenderTrigger","checkDimensions","offsetWidth","offsetHeight","resizeObserver","handleModelRender","prev","handleDriveToHomeMouseDown","handleDriveToHomeMouseUp","handleDriveToHomeMouseLeave","shouldHideRobot","shouldHideCustomContent","Card","Box","Canvas","Bounds","Typography","ProgramStateIndicator","Divider","Button","defaultAxisConfig","MANUFACTURER_HOME_CONFIGS","Manufacturer","extractManufacturer","manufacturerString","getDefaultHomeConfig","defaultJointConfig","manufacturer"],"mappings":"wmBAIO,SAASA,GACdC,EACsB,CAEtB,OADkBA,EAAM,WAChB,CACN,IAAK,cACH,OAAO,IAAIC,EAAAA,eAC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