@wandelbots/nova-js
Version:
Official JS client for the Wandelbots API
1,544 lines (1,543 loc) • 106 kB
text/typescript
import { t as Nova } from "../../Nova-Bd4sVjdb.mjs";
import { ConnectionOptions, Msg, NatsConnection } from "@nats-io/nats-core";
//#region src/lib/experimental/nats/buildNatsServerUrl.d.ts
/**
* Builds the WebSocket URL for a NOVA instance's NATS gateway from its
* instance URL, e.g. `https://foo.instance.wandelbots.io` becomes
* `wss://foo.instance.wandelbots.io/api/nats`.
*
* Pass the result as `servers` in the `NovaNatsClientConfig` passed to
* `NovaNatsClient`.
*/
declare function buildNatsServerUrl(instanceUrl: string): string;
//#endregion
//#region src/lib/experimental/nats/generated/types.d.ts
/**
* AUTO-GENERATED FILE - DO NOT EDIT.
* Generated from src/asyncapi.yaml by scripts/generate-nats-client.ts.
* Run `pnpm generate:nats` to regenerate.
*/
/**
* A unique name for the cell used as an identifier for addressing the cell in all API calls.
* It must be a valid k8s label name as defined by [RFC 1123](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names).
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "CellName".
*/
type CellName = string;
/**
* A description of the cell.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "CellDescription".
*/
type CellDescription = string;
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "Manufacturer".
*/
type Manufacturer = "abb" | "fanuc" | "kuka" | "staubli" | "universalrobots" | "yaskawa";
/**
* Identifies a single motion group model.
* See [getMotionGroupModels](#/operations/getMotionGroupModels) for supported types.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "MotionGroupModel".
*/
type MotionGroupModel = string;
/**
* Request body wrapper for `addVirtualControllerMotionGroup`.
* Allow either referencing a predefined motion group model or
* uploading a JSON configuration that the backend converts into a
* motion group description.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "AddVirtualControllerMotionGroupRequest".
*/
type AddVirtualControllerMotionGroupRequest = MotionGroupFromModel | MotionGroupFromJSON;
/**
* A list of environment variables with name and their value.
* These can be used to configure the containerized application, and turn features on or off.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "ContainerEnvironment".
*/
type ContainerEnvironment = {
name: string;
value: string;
}[];
/**
* The amount of requested storage capacity.
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "Capacity".
*/
type Capacity = string;
/**
* The state of a program run.
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "ProgramRunState".
*/
type ProgramRunState = "PREPARING" | "RUNNING" | "COMPLETED" | "FAILED" | "STOPPED";
/**
* State of the program run.
*/
type ProgramRunState1 = "PREPARING" | "RUNNING" | "COMPLETED" | "FAILED" | "STOPPED";
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "ServiceGroup".
*/
type ServiceGroup = "SystemService" | "CellService" | "RobotController" | "App";
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "ServiceStatusSeverity".
*/
type ServiceStatusSeverity = "INFO" | "WARNING" | "ERROR";
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "ServiceStatusPhase".
*/
type ServiceStatusPhase = "Terminating" | "Initialized" | "Running" | "NoReady" | "Completed" | "ContainerCreating" | "PodInitializing" | "Unknown" | "CrashLoopBackOff" | "Error" | "ImagePullBackOff" | "OOMKilled" | "Pending" | "Evicted";
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "ServiceStatusList".
*/
type ServiceStatusList = ServiceStatus[];
/**
* A three-dimensional vector [x, y, z] with double precision.
*
*
* @minItems 3
* @maxItems 3
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "Vector3d".
*/
type Vector3D = [number, number, number];
/**
* Defines a rotation in 3D space.
* A three-dimensional Vector [rx, ry, rz] with double precision.
* Rotation is applied around the vector.
* The angle of rotation equals the length of the vector.
*
*
* @minItems 3
* @maxItems 3
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "RotationVector".
*/
type RotationVector = [number, number, number];
/**
* A link chain is a kinematic chain of links that is connected via joints.
* A motion group can be used to control the motion of the joints in a link chain.
*
* A link is a group of colliders that is attached to the link reference frame.
*
* The reference frame of a link is obtained after applying all sets of Denavit-Hartenberg-parameters from base to (including) the link index.
*
* This means that the reference frame of the link is on the rotation axis of the next joint in the kinematic chain.
* Example: For a motion group with 2 joints, the collider reference frame (CRF) for link 1 is on the rotation axis of joint 2. The chain looks like:
* - Origin >> Mounting >> Base >> (CRF Base) Joint 0 >> Link 0 >> (CRF Link 0) Joint 1 >> Link 1 >> (CRF Link 1) Flange (CRF Tool) >> TCP
*
* Adjacent links in the kinematic chain of the motion group are not checked for mutual collision.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "LinkChain".
*/
type LinkChain = CollisionMotionGroupLink[];
/**
* The shape of the motion groups links to validate against colliders.
* Indexed along the kinematic chain, starting with a static base shape before first joint.
* The base of the motion group is not checked for collision against the environment.
*
*/
type LinkChain1 = CollisionMotionGroupLink[];
/**
* Current state of the BUS input/output service.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "BusIOsStateEnum".
*/
type BusIOsStateEnum = "BUS_IOS_STATE_UNKNOWN" | "BUS_IOS_STATE_INITIALIZING" | "BUS_IOS_STATE_CONNECTED" | "BUS_IOS_STATE_DISCONNECTED";
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "IOValue".
*/
type IOValue = IOBooleanValue | IOIntegerValue | IOFloatValue;
/**
* Array of input/output values.
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "ListIOValuesResponse".
*/
type ListIOValuesResponse = IOValue[];
/**
* Defines the current system mode of the robot system, including NOVA communicating with the robot controller.
*
* ### MODE_CONTROLLER_NOT_CONFIGURED
*
* No controller with the specified identifier is configured. Call [addRobotController](#/operations/addRobotController) to register a controller.
*
* ### MODE_INITIALIZING
*
* Indicates that a connection to the robot controller is established or reestablished in case of a disconnect.
* On success, the controller is set to MODE_MONITOR.
* On failure, the initialization process is retried until successful or cancelled by the user.
*
* ### MODE_MONITOR
*
* Read-only mode with an active controller connection.
* - Receives robot state and I/O signals
* - Move requests are rejected
* - No commands are sent to the controller
*
* ### MODE_CONTROL
*
* Active control mode.
*
* **Movement is possible in this mode**
*
* The robot is cyclically commanded to hold its current position.
* The robot state is received in sync with the controller cycle.
* Motion and jogging requests are accepted and executed.
* Input/Output interaction is enabled.
*
* ### MODE_FREE_DRIVE
*
* Read-only mode with servo motors enabled for manual movement (Free Drive).
*
* Move requests are rejected.
*
* Not supported by all robots: Use [getSupportedModes](#/operations/getSupportedModes) to check Free Drive availability.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "RobotSystemMode".
*/
type RobotSystemMode = "MODE_CONTROLLER_NOT_CONFIGURED" | "MODE_INITIALIZING" | "MODE_MONITOR" | "MODE_CONTROL" | "MODE_FREE_DRIVE";
/**
* Current operation mode of the configured robot controller.
* Operation modes in which the attached motion groups can be moved are:
* - OPERATION_MODE_MANUAL (if enabling switch is pressed)
* - OPERATION_MODE_MANUAL_T1 (if enabling switch is pressed)
* - OPERATION_MODE_MANUAL_T2 (if enabling switch is pressed)
* - OPERATION_MODE_AUTO (without needing to press enabling switch)
* All other modes are considered as non-operational.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "OperationMode".
*/
type OperationMode = "OPERATION_MODE_UNKNOWN" | "OPERATION_MODE_NO_CONTROLLER" | "OPERATION_MODE_DISCONNECTED" | "OPERATION_MODE_POWER_ON" | "OPERATION_MODE_PENDING" | "OPERATION_MODE_MANUAL" | "OPERATION_MODE_MANUAL_T1" | "OPERATION_MODE_MANUAL_T2" | "OPERATION_MODE_AUTO" | "OPERATION_MODE_RECOVERY";
/**
* Current safety state of the configured robot controller.
* Operation modes in which the attached motion groups can be moved are:
* - SAFETY_STATE_NORMAL
* - SAFETY_STATE_REDUCED
* All other modes are considered as non-operational.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "SafetyStateType".
*/
type SafetyStateType = "SAFETY_STATE_UNKNOWN" | "SAFETY_STATE_FAULT" | "SAFETY_STATE_NORMAL" | "SAFETY_STATE_MASTERING" | "SAFETY_STATE_CONFIRM_SAFETY" | "SAFETY_STATE_OPERATOR_SAFETY" | "SAFETY_STATE_PROTECTIVE_STOP" | "SAFETY_STATE_REDUCED" | "SAFETY_STATE_STOP" | "SAFETY_STATE_STOP_0" | "SAFETY_STATE_STOP_1" | "SAFETY_STATE_STOP_2" | "SAFETY_STATE_RECOVERY" | "SAFETY_STATE_DEVICE_EMERGENCY_STOP" | "SAFETY_STATE_ROBOT_EMERGENCY_STOP" | "SAFETY_STATE_VIOLATION";
/**
* This structure describes a set of joint values, e.g., positions, currents, torques, of a motion group.
*
* Float precision is the default.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "Joints".
*/
type Joints = number[];
/**
* - The location is a scalar value that defines a position along a path, typically ranging from 0 to `n`,
* where `n` denotes the number of motion commands
* - Each integer value of the location corresponds to a specific motion command,
* while non-integer values interpolate positions within the segments.
* - The location is calculated from the joint path
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "Location".
*/
type Location = number;
/**
* Current joint position of each joint.
* The unit depends on the type of joint: For revolute joints, the angle is given in [rad]; for prismatic joints, the displacement is given in [mm].
*
*/
type Joints1 = number[];
/**
* Current joint torque of each joint in [Nm].
* Is only available if the robot controller supports it, e.g., available for UR controllers.
*
*/
type Joints2 = number[];
/**
* Current at TCP in [A].
* Is only available if the robot controller supports it, e.g., available for UR controllers.
*
*/
type Joints3 = number[];
/**
* State of indicated motion groups.
* In case of state request via controller all configured motion groups are returned.
* In case of executing a motion only the affected motion groups are returned.
*
*/
type MotionGroupState1 = MotionGroupState[];
/**
* A three-dimensional vector [x, y, z] with double precision.
*
*
* @minItems 3
* @maxItems 3
*/
type Vector3D1 = [number, number, number];
/**
* A three-dimensional vector [x, y, z] with double precision.
*
*
* @minItems 3
* @maxItems 3
*/
type Vector3D2 = [number, number, number];
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "JointTypeEnum".
*/
type JointTypeEnum = "REVOLUTE_JOINT" | "PRISMATIC_JOINT";
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "SystemUpdateStartedEvent".
*/
type SystemUpdateStartedEvent = CloudEvent & {
type?: "nova.v2.events.system.update.started";
source?: "/nova/service-manager";
/**
* Unique identifier for this update process
*/
id: {
[k: string]: unknown;
};
/**
* Timestamp when the update process started (RFC3339)
*/
time: {
[k: string]: unknown;
};
/**
* System update started event payload
*/
data: {
/**
* New system version being installed
*/
newVersion: string;
/**
* Previous system version, if available
*/
oldVersion?: string;
};
};
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "SystemUpdateCompletedEvent".
*/
type SystemUpdateCompletedEvent = CloudEvent & {
type?: "nova.v2.events.system.update.completed";
source?: "/nova/service-manager";
/**
* Same unique identifier from the started event for correlation
*/
id: {
[k: string]: unknown;
};
/**
* Timestamp when the update process completed (RFC3339)
*/
time: {
[k: string]: unknown;
};
/**
* System update completed event payload
*/
data: {
/**
* New system version that was installed
*/
newVersion: string;
/**
* Error message if update failed
*/
error?: string;
};
};
/**
* The operating state.
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "OperatingState".
*/
type OperatingState = "ACTIVE" | "INACTIVE";
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "CellCreatedEvent".
*/
type CellCreatedEvent = {
type?: "nova.v2.events.cells.{cell}.created";
source?: "/nova/service-manager";
/**
* Unique identifier for this cell created event.
*/
id: {
[k: string]: unknown;
};
/**
* Timestamp when the cell foundation release was created.
*/
time: {
[k: string]: unknown;
};
data: CellEventData;
} & CloudEvent;
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "CellUpdatedEvent".
*/
type CellUpdatedEvent = {
type?: "nova.v2.events.cells.{cell}.updated";
source?: "/nova/service-manager";
/**
* Unique identifier for this cell updated event.
*/
id: {
[k: string]: unknown;
};
/**
* Timestamp when the cell foundation release was updated.
*/
time: {
[k: string]: unknown;
};
data: CellEventData;
} & CloudEvent;
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "CellDeletedEvent".
*/
type CellDeletedEvent = {
type?: "nova.v2.events.cells.{cell}.deleted";
source?: "/nova/service-manager";
/**
* Unique identifier for this cell deleted event.
*/
id: {
[k: string]: unknown;
};
/**
* Timestamp when the cell foundation release was deleted.
*/
time: {
[k: string]: unknown;
};
data: CellEventData;
} & CloudEvent;
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "AppCreatedEvent".
*/
type AppCreatedEvent = {
type?: "nova.v2.events.cells.{cell}.apps.{app}.created";
source?: "/nova/service-manager";
/**
* Unique identifier for this app created event.
*/
id: {
[k: string]: unknown;
};
/**
* Timestamp when the app release was created.
*/
time: {
[k: string]: unknown;
};
data: AppEventData;
} & CloudEvent;
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "AppUpdatedEvent".
*/
type AppUpdatedEvent = {
type?: "nova.v2.events.cells.{cell}.apps.{app}.updated";
source?: "/nova/service-manager";
/**
* Unique identifier for this app updated event.
*/
id: {
[k: string]: unknown;
};
/**
* Timestamp when the app release was updated.
*/
time: {
[k: string]: unknown;
};
data: AppEventData;
} & CloudEvent;
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "AppDeletedEvent".
*/
type AppDeletedEvent = {
type?: "nova.v2.events.cells.{cell}.apps.{app}.deleted";
source?: "/nova/service-manager";
/**
* Unique identifier for this app deleted event.
*/
id: {
[k: string]: unknown;
};
/**
* Timestamp when the app release was deleted.
*/
time: {
[k: string]: unknown;
};
data: AppEventData;
} & CloudEvent;
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "RobotControllerCreatedEvent".
*/
type RobotControllerCreatedEvent = {
type?: "nova.v2.events.cells.{cell}.controllers.{controller}.created";
source?: "/nova/service-manager";
/**
* Unique identifier for this robot controller created event.
*/
id: {
[k: string]: unknown;
};
/**
* Timestamp when the robot controller release was created.
*/
time: {
[k: string]: unknown;
};
data: RobotControllerEventData;
} & CloudEvent;
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "RobotControllerUpdatedEvent".
*/
type RobotControllerUpdatedEvent = {
type?: "nova.v2.events.cells.{cell}.controllers.{controller}.updated";
source?: "/nova/service-manager";
/**
* Unique identifier for this robot controller updated event.
*/
id: {
[k: string]: unknown;
};
/**
* Timestamp when the robot controller release was updated.
*/
time: {
[k: string]: unknown;
};
data: RobotControllerEventData;
} & CloudEvent;
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "RobotControllerDeletedEvent".
*/
type RobotControllerDeletedEvent = {
type?: "nova.v2.events.cells.{cell}.controllers.{controller}.deleted";
source?: "/nova/service-manager";
/**
* Unique identifier for this robot controller deleted event.
*/
id: {
[k: string]: unknown;
};
/**
* Timestamp when the robot controller release was deleted.
*/
time: {
[k: string]: unknown;
};
data: RobotControllerEventData;
} & CloudEvent;
interface AbbController {
kind: "AbbController";
controller_ip: string;
/**
* Default values: 80, 443. If custom value is set, field is required.
*
*/
controller_port: number;
/**
* The EGM server runs inside of the cell, thus its IP must be in the same network as the 'controller_ip'
*/
egm_server: {
ip: string;
port: number;
};
}
/**
* Optional dedicated network interface for a physical robot controller.
*
* When set, the controller is given its own network interface on the selected
* physical network port (`pf`) with the given `address`, so it can reach the
* robot network directly.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "ControllerNetworkInterface".
*/
interface ControllerNetworkInterface {
/**
* IPv4 address in CIDR notation to assign to the controller's network
* interface, for example `192.168.1.10/24`. The value must be a valid IPv4
* address followed by a prefix length between 0 and 32.
*
*/
address: string;
/**
* Name of the node's physical network port that connects to the robot
* network, for example `enp10s0f0`. The controller's interface is provided
* from this port.
*
*/
pf: string;
}
/**
* The configuration of a physical FANUC robot controller has to contain IP address of the controller.
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "FanucController".
*/
interface FanucController {
kind: "FanucController";
controller_ip: string;
network_interface?: ControllerNetworkInterface;
}
/**
* The configuration of a physical KUKA robot controller has to contain an IP address.
* Additionally an RSI server configuration has to be specified in order to control the robot.
* Deploying the server is a functionality of this API.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "KukaController".
*/
interface KukaController {
kind: "KukaController";
controller_ip: string;
controller_port: number;
/**
* The RSI server runs inside of the cell.
*/
rsi_server: {
ip: string;
port: number;
};
/**
* If true, uses slower cycle time of 12ms instead of 4ms.
*
*/
slow_cycle_rate?: boolean;
}
/**
* The configuration of a physical Universal Robots controller has to contain IP address of the controller.
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "UniversalrobotsController".
*/
interface UniversalrobotsController {
kind: "UniversalrobotsController";
controller_ip: string;
}
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "MotionGroupFromType".
*/
interface MotionGroupFromModel {
/**
* Unique identifier for the motion group to be added.
*/
motion_group: string;
motion_group_model: MotionGroupModel;
/**
* Initial joint position of the added motion group.
* Provides the joint position as a JSON array of float values in radians. The array length
* must match the robot's degrees of freedom, e.g., `"[0, 0, 0, 0, 0, 0]"` for a 6-DOF robot.
* If the provided array length does not match the robot's DOF, the array will be adjusted; if it is longer, extra values will be truncated;
* if it is shorter, missing values will be filled with zeros.
*
*/
initial_joint_position?: string;
}
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "MotionGroupFromJson".
*/
interface MotionGroupFromJSON {
/**
* Unique identifier for the motion group to be added.
*/
motion_group: string;
/**
* JSON configuration of the virtual robot controller, can be obtained from the physical controller's configuration
* via [getVirtualControllerConfiguration](#/operations/getVirtualControllerConfiguration).
*
*/
json_data: string;
/**
* The identifier of the motion group that needs to be extracted from the provided JSON configuration.
*
*/
extracted_motion_group_id: string;
/**
* Initial joint position of the added motion group.
* Provides the joint position as a JSON array of float values in radians. The array length
* must match the robot's degrees of freedom, e.g., `"[0, 0, 0, 0, 0, 0]"` for a 6-DOF robot.
* If the provided array length does not match the robot's DOF, the array will be adjusted: if it is longer, extra values will be truncated;
* if it is shorter, missing values will be filled with zeros.
*
*/
initial_joint_position?: string;
}
/**
* The configuration of a virtual robot controller has to contain the manufacturer string,
* an optional joint position string array, and either a preset `type` **or** the complete JSON configuration.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "VirtualController".
*/
interface VirtualController {
kind: "VirtualController";
manufacturer: Manufacturer;
/**
* Preset type of the virtual robot controller.
* See [getRobotConfigurations](#/operations/getRobotConfigurations) for supported types.
*
*/
type?: string;
/**
* Complete JSON configuration of the virtual robot controller.
* Can be obtained from the physical controller's configuration via [getVirtualControllerConfiguration](#/operations/getVirtualControllerConfiguration).
* If provided, the `type` field should not be used.
*
*/
json?: string;
/**
* Initial joint position of the first motion group from the virtual robot controller.
* Provides the joint position as a JSON array of float values in radians. The array length
* must match the robot's degrees of freedom, e.g., `"[0, 0, 0, 0, 0, 0]"` for a 6-DOF robot.
* If the provided array length does not match the robot's DOF, the array will be adjusted: if it is longer, extra values will be truncated;
* if it is shorter, missing values will be filled with zeros.
*
*/
initial_joint_position?: string;
/**
* Adds a motion group configuration for the virtual robot controller.
*
* > **NOTE**
* >
* > Set only one of the two options, **motion_group_model**, or **json_data**
*
* - **motion_group_model**: Identifies a single motion group. See [getMotionGroupModels](#/operations/getMotionGroupModels) for supported types
* - **json_data**: JSON configuration of the virtual robot controller, can be obtained from the physical controller's configuration
* via [getVirtualControllerConfiguration](#/operations/getVirtualControllerConfiguration)
* - **extracted_motion_group_id**: Motion group identifier to extract from the provided JSON configuration, required when using json_data
* - **motion_group**: Unique identifier for the motion group
* - **initial_joint_position**: Specifies the initial joint position for the added motion group
*
*
* @maxItems 10
*/
motion_groups?: [] | [AddVirtualControllerMotionGroupRequest] | [AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest] | [AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest] | [AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest] | [AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest] | [AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest] | [AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest] | [AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest] | [AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest] | [AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest, AddVirtualControllerMotionGroupRequest];
}
/**
* The configuration of a physical Yaskawa robot controller has to contain IP address of the controller.
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "YaskawaController".
*/
interface YaskawaController {
kind: "YaskawaController";
controller_ip: string;
}
/**
* The configuration of a physical or virtual robot controller.
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "RobotController".
*/
interface RobotController {
/**
* Unique name of controller within the cell.
* It must be a valid k8s label name as defined by [RFC 1035](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#rfc-1035-label-names).
*
*/
name: string;
configuration: AbbController | FanucController | KukaController | UniversalrobotsController | VirtualController | YaskawaController;
}
/**
* User provided credentials for creating a secret to pull an image from a registry.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "ImageCredentials".
*/
interface ImageCredentials {
registry: string;
user: string;
password: string;
}
/**
* A user provided, custom container image and the required credentials to pull it from a registry.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "ContainerImage".
*/
interface ContainerImage {
/**
* The location of a container image in the form of `<registry>/<image>:<tag>`.
*/
image: string;
credentials?: ImageCredentials;
/**
* Known secrets for authentication with the container registry.
*/
secrets?: {
name: string;
}[];
}
/**
* The path and capacity of a volume that retains data across application restarts.
* The maximal requestable capacity is 300Mi.
* If you need more capacity consider using [storeObject](#/operations/storeObject).
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "ContainerStorage".
*/
interface ContainerStorage {
mount_path: string;
/**
* The amount of local storage available for the application.
*
* **NOTE:** The capacity can NEVER be reduced!
*
*/
capacity: string;
}
/**
* Additional resources that the application requires.
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "ContainerResources".
*/
interface ContainerResources {
/**
* Number of GPUs the application requires.
*/
intel_gpu?: number;
/**
* The maximum memory allocated to this application.
*/
memory_limit?: string;
}
/**
* An App is defined by a webserver, packed inside a container, serving a web-application.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "App".
*/
interface App {
/**
* The name of the provided application.
* The name must be unique within the cell and is used as an identifier for addressing the application in all API calls
* , e.g., when updating the application.
*
* It also defines where the application is reachable (/$cell/$name).
*
* It must be a valid k8s label name as defined by [RFC 1035](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#rfc-1035-label-names).
*
*/
name: string;
/**
* The path of the icon for the App (/$cell/$name/$app_icon).
*/
app_icon: string;
container_image: ContainerImage;
/**
* The port the containerized webserver is listening on.
*/
port?: number;
environment?: ContainerEnvironment;
storage?: ContainerStorage;
resources?: ContainerResources;
/**
* Defines the URL path suffix used to check the application's health status. The complete health check URL
* is constructed as `/$cell/$name/$health_path`. When the application is working as expected,
* the endpoint returns an HTTP 200 status code.
*
* If not specified, the system will default to using the application icon path suffix
* (the value of `app_icon`) as the health check endpoint, resulting in `/$cell/$name/$app_icon`.
*
* If the health check fails (no response or non-200 status code), the system will
* automatically restart the application container to restore service.
*
*/
health_path?: string;
/**
* Defines the URL path suffix used to provide an endpoint for diagnosis data collection.
* The complete diagnosis check URL is constructed as `/$cell/$name/$diagnosis_path`.
*
* The endpoint is called when a diagnosis package is requested via the diagnosis API.
* The endpoint needs to return the data within a zip file `application/zip` response.
*
*/
diagnosis_path?: string;
}
/**
* To create a robot cell, only a valid name is required.
* Once created, a robot cell provides access to the Wandelbots NOVA foundation services.
* The configuration can be customized, e.g., robot controllers, also within apps.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "Cell".
*/
interface Cell {
/**
* A unique name for the cell used as an identifier for addressing the cell in all API calls.
* It must be a valid k8s label name as defined by [RFC 1123](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names).
*
*/
name: string;
/**
* Wandelbots NOVA version of the cell.
* This version must not exceed the current system version.
*
*/
version?: string;
description?: CellDescription;
controllers?: RobotController[];
apps?: App[];
[k: string]: unknown;
}
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "ProgramStatus".
*/
interface ProgramStatus {
/**
* The app name where the program is hosted.
*/
app: string;
/**
* Unique identifier of the program.
*/
program: string;
/**
* Unique identifier of the program run.
*/
run: string;
state: ProgramRunState1;
/**
* Error message if the program run failed.
*/
error?: string;
/**
* RFC3339 timestamp when the program run started.
*/
start_time?: string;
/**
* RFC3339 timestamp when the program run ended.
*/
end_time?: string;
/**
* RFC3339 timestamp when the program run ended.
*/
timestamp: string;
}
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "ServiceStatus".
*/
interface ServiceStatus {
service: string;
group: ServiceGroup;
status: {
severity: ServiceStatusSeverity;
code: ServiceStatusPhase;
reason?: string;
};
}
/**
* Lifecycle event for a cell cycle.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "CellCycleEvent".
*/
interface CellCycleEvent {
/**
* Type of the cycle event.
*/
event_type: "cycle_started" | "cycle_finished" | "cycle_failed";
/**
* Unique identifier of this cycle event.
*/
id: string;
/**
* Unique identifier of the cycle this event belongs to.
*/
cycle_id: string;
/**
* Timestamp when the cycle event occurred, in ISO 8601 format.
*/
timestamp: string;
/**
* Unique identifier of the cell the event belongs to.
*/
cell: string;
/**
* Additional event-specific data. May be empty.
*/
extra?: {
[k: string]: unknown;
};
/**
* Duration of the cycle in milliseconds.
*/
duration_ms?: number;
/**
* Reason for cycle failure.
*/
reason?: string;
}
/**
* Defines a spherical shape centred around the origin.
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "Sphere".
*/
interface Sphere {
shape_type: "sphere";
/**
* The radius of the sphere in [mm].
*/
radius: number;
}
/**
* Defines a cuboid shape centred around an origin.
*
* If a margin is applied to the box type full, it is added to all size values. The shape will keep its edges.
* The hollow box type consists of thin boxes that make up its walls.
* If a margin is applied to the box type hollow, its size values are reduced by the margin.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "Box".
*/
interface Box {
shape_type: "box";
/**
* The dimension in x-direction in [mm].
*/
size_x: number;
/**
* The dimension in y-direction in [mm].
*/
size_y: number;
/**
* The dimension in z-direction in [mm].
*/
size_z: number;
/**
* The box type defines if the box is hollow or full.
*/
box_type: "HOLLOW" | "FULL";
}
/**
* Defines an x/y-plane with finite size. Centred around the z-axis.
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "Rectangle".
*/
interface Rectangle {
shape_type: "rectangle";
/**
* The dimension in x-direction in [mm].
*/
size_x: number;
/**
* The dimension in y-direction in [mm].
*/
size_y: number;
}
/**
* Defines an x/y-plane with infinite size.
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "Plane".
*/
interface Plane {
shape_type: "plane";
}
/**
* Defines a cylindrical shape.
* Centred around origin, symmetric around z-axis.
*
* If a margin is applied, it is added to radius and height. The shape will keep its edges.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "Cylinder".
*/
interface Cylinder {
shape_type: "cylinder";
/**
* The radius of the cylinder in [mm].
*/
radius: number;
/**
* The height of the cylinder in [mm].
*/
height: number;
}
/**
* Defines a cylindrical shape with 2 semi-spheres on the top and bottom.
* Centred around origin, symmetric around z-axis.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "Capsule".
*/
interface Capsule {
shape_type: "capsule";
/**
* The radius of the cylinder and semi-spheres in [mm].
*/
radius: number;
/**
* The height of the inner cylinder in [mm].
*/
cylinder_height: number;
}
/**
* Convex hull around four spheres. Sphere center points in x/y-plane, offset by either combination "+/- sizeX" or "+/- sizeY".
*
* Alternative description: Rectangle in x/y-plane with a 3D padding.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "RectangularCapsule".
*/
interface RectangularCapsule {
shape_type: "rectangular_capsule";
/**
* The radius of the inner spheres in [mm].
*/
radius: number;
/**
* The distance of the sphere center in x-direction in [mm].
*/
sphere_center_distance_x: number;
/**
* The distance of the sphere center in y-direction in [mm].
*/
sphere_center_distance_y: number;
}
/**
* Defines a convex hull encapsulating a set of vertices.
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "ConvexHull".
*/
interface ConvexHull {
shape_type: "convex_hull";
/**
* The list of encapsulated points.
*/
vertices: Vector3D[];
}
/**
* Defines a pose in 3D space.
* A pose is a combination of a position and an orientation.
* The position is applied before the orientation.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "Pose".
*/
interface Pose {
position?: Vector3D;
orientation?: RotationVector;
}
/**
* Defines a collider with a single shape.
*
* A collider is an object that is used for collision detection.
* It defines the `shape` that is attached with the offset of `pose` to a reference frame.
*
* Use colliders to:
* - Define the shape of a workpiece. The reference frame is the scene origin.
* - Define the shape of a link in a motion group. The reference frame is the link coordinate system.
* - Define the shape of a tool. The reference frame is the flange coordinate system.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "Collider".
*/
interface Collider {
shape: Sphere | Box | Rectangle | Plane | Cylinder | Capsule | RectangularCapsule | ConvexHull;
pose?: Pose;
/**
* Increases the shape's size in all dimensions. Applied in [mm]. Can be used to keep a safe distance to the shape.
*/
margin?: number;
}
/**
* A collection of identifiable colliders.
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "ColliderDictionary".
*/
interface ColliderDictionary {
[k: string]: Collider;
}
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "Link".
*/
interface CollisionMotionGroupLink {
[k: string]: Collider;
}
/**
* Defines the shape of a tool.
*
* A tool is a dictionary of colliders.
*
* All colliders that make up a tool are attached to the flange frame of the motion group.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "Tool".
*/
interface CollisionMotionGroupTool {
[k: string]: Collider;
}
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "CollisionSetup".
*/
interface CollisionSetup {
colliders?: ColliderDictionary1;
link_chain?: LinkChain1;
tool?: CollisionMotionGroupTool1;
/**
* If true, self-collision detection is enabled for the motion group.
*
* Self-collision detection checks if links in the kinematic chain of the motion group collide with each other.
* Adjacent links in the kinematic chain of the motion group are not checked for mutual collision.
* The tool is treated like a link at the end of the kinematic chain. It is checked against all links except the last one.
*
* Default is true.
*
*/
self_collision_detection?: boolean;
}
/**
* Colliders are checked against links and tool.
*
*/
interface ColliderDictionary1 {
[k: string]: Collider;
}
/**
* Shape of the tool to validate against colliders.
*
*/
interface CollisionMotionGroupTool1 {
[k: string]: Collider;
}
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "BusIOsState".
*/
interface BusIOsState {
state: BusIOsStateEnum;
/**
* A message providing additional information on the input/output service, e.g., BUS service status, encountered errors.
* May be empty if no additional information is available.
*
*/
message?: string;
}
/**
* Input/Output boolean value representation.
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "IOBooleanValue".
*/
interface IOBooleanValue {
/**
* Unique identifier of the input/output.
*/
io: string;
/**
* Value of a digital input/output.
*
*/
value: boolean;
value_type: "boolean";
}
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "IOIntegerValue".
*/
interface IOIntegerValue {
/**
* Unique identifier of the input/output.
*/
io: string;
/**
* Value of an input/output with integer representation.
*
* > The integral value is transmitted as a string to avoid precision loss during conversion to JSON.
* > Recommended: Use int64 in your implementation. If you want to interact with int64 in numbers,
* > JS bigint libraries can help you to parse the string into an integral value.
*
*/
value: string;
value_type: "integer";
}
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "IOFloatValue".
*/
interface IOFloatValue {
/**
* Unique identifier of the input/output.
*/
io: string;
/**
* Value of an analog input/output in floating number representation.
*
*/
value: number;
value_type: "float";
}
/**
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "SelectIOs".
*/
interface SelectIOs {
/**
* Array of input/output identifiers to retrieve the values for.
*/
ios: string[];
/**
* Type of update.
* - changes: Only send updates when the value changes.
* - full: Send the full list of values at the update rate.
*
*/
update_type?: "changes" | "full";
}
/**
* Array of input/output values.
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "StreamIOValuesResponse".
*/
interface StreamIOValuesResponse {
io_values: IOValue[];
/**
* Timestamp indicating when the represented information was received from the robot controller.
*/
timestamp: string;
/**
* Sequence number of the controller state. It starts with 0 upon establishing the connection with a physical controller.
* The sequence number is reset when the connection to the physical controller is closed and re-established.
*
*/
sequence_number: number;
}
/**
* Indicates which joint of the motion group is in a limit.
* If a joint is in its limit, only this joint can be moved. Movements that affect any other joints are not executed.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "MotionGroupState_JointLimitReached".
*/
interface MotionGroupState_JointLimitReached {
/**
* If true, operational (soft) jointLimit is reached for specific joint.
*/
limit_reached: boolean[];
}
/**
* Jogging is active.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "JoggingRunning".
*/
interface JoggingRunning {
kind: "RUNNING";
}
/**
* User has paused jogging.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "JoggingPausedByUser".
*/
interface JoggingPausedByUser {
kind: "PAUSED_BY_USER";
}
/**
* Jogging was paused because of an I/O event.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "JoggingPausedOnIO".
*/
interface JoggingPausedOnIO {
kind: "PAUSED_ON_IO";
}
/**
* Jogging was paused because a joint is near its limit.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "JoggingPausedNearJointLimit".
*/
interface JoggingPausedNearJointLimit {
kind: "PAUSED_NEAR_JOINT_LIMIT";
joint_indices: number[];
}
/**
* Jogging was paused because the motion group neared a collision.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "JoggingPausedNearCollision".
*/
interface JoggingPausedNearCollision {
kind: "PAUSED_NEAR_COLLISION";
description: string;
}
/**
* Jogging was paused because the motion group neared a singularity or the workspace boundary.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "JoggingPausedNearSingularity".
*/
interface JoggingPausedNearSingularity {
kind: "PAUSED_NEAR_SINGULARITY";
description: string;
}
/**
* State of jogging execution.
* This state is sent during jogging movement, response-rate closest to the nearest multiple of controller step-rate but not exceeding the configured rate.
* The jogging state can be one of the following:
* - RUNNING: Jogging is active.
* - PAUSED_BY_USER: User has paused jogging.
* - PAUSED_NEAR_JOINT_LIMIT: Jogging was paused because a joint is near its limit.
* - PAUSED_NEAR_COLLISION: Jogging was paused because the motion group neared a collision.
* - PAUSED_NEAR_SINGULARITY: Jogging was paused because the motion group neared a singularity or the workspace boundary.
* - PAUSED_ON_IO: Jogging was paused because of an I/O event.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "JoggingDetails".
*/
interface JoggingDetails {
state: JoggingRunning | JoggingPausedByUser | JoggingPausedOnIO | JoggingPausedNearJointLimit | JoggingPausedNearCollision | JoggingPausedNearSingularity;
/**
* Timestamp of the current jogger session in milliseconds.
* Only waypoint sessions are supported. Other sessions return 0.
*
* > **NOTE**
* >
* > This field is experimental and its behavior may change in future releases.
*
*/
jogger_session_timestamp_ms?: number;
kind: "JOGGING";
}
/**
* Trajectory is being executed.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "TrajectoryRunning".
*/
interface TrajectoryRunning {
kind: "RUNNING";
/**
* Remaining time in milliseconds (ms) to reach the end of the motion.
*/
time_to_end: number;
}
/**
* User has paused execution.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "TrajectoryPausedByUser".
*/
interface TrajectoryPausedByUser {
kind: "PAUSED_BY_USER";
}
/**
* First or last sample (depending on direction) of trajectory has been sent.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "TrajectoryEnded".
*/
interface TrajectoryEnded {
kind: "END_OF_TRAJECTORY";
}
/**
* Waiting for an I/O event to start execution.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definition` "TrajectoryWaitForIO".
*/
interface TrajectoryWaitForIO {
kind: "WAIT_FOR_IO";
}
/**
* Execution was paused because of an I/O event.
*
*
* This interface was referenced by `GeneratedNatsPayloadsRoot`'s JSON-Schema
* via the `definitio