UNPKG

@wandelbots/nova-js

Version:

Official JS client for the Wandelbots API

53 lines 2.4 kB
import type { InitializeJoggingRequest, JoggingResponse, JointVelocityRequest, MotionGroupState, TcpVelocityRequest } from "@wandelbots/nova-api/v2"; import type { AutoReconnectingWebsocket } from "../AutoReconnectingWebsocket"; import type { NovaClient } from "./NovaClient"; export type JoggerConnectionOpts = { /** * When an error message is received from the jogging websocket, it * will be passed here. If this handler is not provided, the error will * instead be thrown as an unhandled error. */ onError?: (err: unknown) => void; } & Omit<InitializeJoggingRequest, "message_type">; export declare class JoggerConnection { readonly nova: NovaClient; readonly cell: string; readonly motionGroupId: string; readonly motionGroupState: MotionGroupState; readonly opts: JoggerConnectionOpts; joggingWebsocket: AutoReconnectingWebsocket | null; lastVelocityRequest: JointVelocityRequest | TcpVelocityRequest | null; lastResponse: JoggingResponse | null; static open(nova: NovaClient, cell: string, motionGroupId: string, opts: JoggerConnectionOpts): Promise<JoggerConnection>; constructor(nova: NovaClient, cell: string, motionGroupId: string, motionGroupState: MotionGroupState, opts: JoggerConnectionOpts); get jointCount(): number | undefined; get activeWebsocket(): AutoReconnectingWebsocket | null; stop(): Promise<void>; dispose(): void; /** * Start rotation of a single robot joint at the specified velocity */ startJointRotation({ joint, velocityRadsPerSec, }: { /** Index of the joint to rotate */ joint: number; /** Speed of the rotation in radians per second */ velocityRadsPerSec: number; }): Promise<void>; /** * Start the TCP moving along a specified axis at a given velocity */ startTCPTranslation({ axis, velocityMmPerSec, useToolCoordinateSystem, }: { axis: "x" | "y" | "z"; velocityMmPerSec: number; useToolCoordinateSystem: boolean; }): Promise<void>; /** * Start the TCP rotating around a specified axis at a given velocity */ startTCPRotation({ axis, velocityRadsPerSec, useToolCoordinateSystem, }: { axis: "x" | "y" | "z"; velocityRadsPerSec: number; useToolCoordinateSystem: boolean; }): Promise<void>; } //# sourceMappingURL=JoggerConnection.d.ts.map