import { type AutoReconnectingWebsocket } from "@wandelbots/nova-js"; import type { MotionGroupDescription, MotionGroupState, Nova, RobotControllerState } from "@wandelbots/nova-js/v2"; import * as THREE from "three"; import type { Vector3Simple } from "./JoggerConnection"; import { type AnyNovaClient } from "./novaCompat"; export type RobotTcpLike = { id: string; readable_name: string; position: Vector3Simple; orientation: Vector3Simple; }; export type MotionGroupOption = { selectionId: string; }; export type ConnectedMotionGroupOptions = { /** Cell id on the Nova instance. Defaults to "cell". */ cellId?: string; }; /** * Store representing the current state of a connected motion group. * API v2 version, not used yet in the components. */ export declare class ConnectedMotionGroup { readonly controller: RobotControllerState; readonly motionGroup: MotionGroupState; readonly initialMotionState: MotionGroupState; readonly motionStateSocket: AutoReconnectingWebsocket; readonly isVirtual: boolean; readonly tcps: RobotTcpLike[]; readonly description: MotionGroupDescription; readonly initialControllerState: RobotControllerState; readonly controllerStateSocket: AutoReconnectingWebsocket; readonly cellId: string; static connectMultiple(nova: AnyNovaClient, motionGroupIds: string[], options?: ConnectedMotionGroupOptions): Promise; static connect(novaClient: AnyNovaClient, motionGroupId: string, options?: ConnectedMotionGroupOptions): Promise; connectedJoggingSocket: WebSocket | null; planData: any | null; joggingVelocity: number; rapidlyChangingMotionState: MotionGroupState; controllerState: RobotControllerState; /** * Reflects activation state of the motion group / robot servos. The * movement controls in the UI should only be enabled in the "active" state */ activationState: "inactive" | "activating" | "deactivating" | "active"; /** Normalized instance-level Nova client (see `asNovaInstance`) */ readonly nova: Nova; constructor(nova: AnyNovaClient, controller: RobotControllerState, motionGroup: MotionGroupState, initialMotionState: MotionGroupState, motionStateSocket: AutoReconnectingWebsocket, isVirtual: boolean, tcps: RobotTcpLike[], description: MotionGroupDescription, initialControllerState: RobotControllerState, controllerStateSocket: AutoReconnectingWebsocket, cellId?: string); get motionGroupId(): string; get controllerId(): string; get modelFromController(): string; /** Jogging velocity in radians for rotation and joint movement */ get joggingVelocityRads(): number; get joints(): { index: number; }[]; get dhParameters(): { alpha?: number; theta?: number; a?: number; d?: number; reverse_rotation_direction?: boolean; type?: import("@wandelbots/nova-js/v2").JointTypeEnum; }[] | undefined; get safetyZones(): { [key: string]: import("@wandelbots/nova-js/v2").Collider; } | undefined; /** Gets the robot mounting position offset in 3D viz coordinates */ get mountingPosition(): [number, number, number]; /** Gets the robot mounting position rotation in 3D viz coordinates */ get mountingQuaternion(): THREE.Quaternion; /** * Whether the controller is currently in a safety state * corresponding to an emergency stop */ get isEstopActive(): boolean; /** * Whether the controller is in a safety state * that may be non-functional for robot pad purposes */ get isMoveableSafetyState(): boolean; /** * Whether the controller is in an operation mode that allows movement */ get isMoveableOperationMode(): boolean; /** * Whether the robot is currently active and can be moved, based on the * safety state, operation mode and servo toggle activation state. */ get canBeMoved(): boolean; deactivate(): Promise; activate(): Promise; toggleActivation(): void; dispose(): void; setJoggingVelocity(velocity: number): void; } export default ConnectedMotionGroup;