Interface Robot

interface Robot {
    on: ((type, listener) => void);
    blockForOperation(id): Promise<void>;
    cancelOperation(id): Promise<void>;
    discoverComponents(queries): Promise<Discovery[]>;
    frameSystemConfig(transform): Promise<FrameSystemConfig[]>;
    getCloudMetadata(): Promise<robotApi.GetCloudMetadataResponse.AsObject>;
    getOperations(): Promise<Operation[]>;
    getStatus(resourceNames?): Promise<robotApi.Status[]>;
    resourceNames(): Promise<commonApi.ResourceName.AsObject[]>;
    resourceRPCSubtypes(): Promise<ResourceRPCSubtype[]>;
    stopAll(extra?): Promise<void>;
    streamStatus(resourceNames?, durationMs?): RobotStatusStream;
    transformPCD(pointCloudPCD, source, destination): Promise<Uint8Array>;
    transformPose(source, destination, supplementalTransforms): Promise<commonApi.PoseInFrame>;
}

Implemented by

Properties

on: ((type, listener) => void)

Call a function when an event of either 'reconnected' or 'disconnected' is triggered. Note that these events will only be triggered on WebRTC connections.

Type declaration

    • (type, listener): void
    • Parameters

      • type: "reconnected" | "disconnected"

        The event ('reconnected' or 'disconnected') that was triggered.

      • listener: Callback

        The function to call

      Returns void

App/Cloud

Discovery

  • Alpha

    Get the list of discovered component configurations.

    Parameters

    Returns Promise<Discovery[]>

Frame System

  • Alpha

    Transform a given source point cloud from the reference frame to a new specified destination which is a reference frame.

    Parameters

    • pointCloudPCD: Uint8Array

      The point clouds to transform. This should be in the PCD format encoded into bytes: https://pointclouds.org/documentation/tutorials/pcd_file_format.html

    • source: string

      The reference frame of the point cloud.

    • destination: string

      The reference frame into which the source data should be transformed, if unset this defaults to the "world" reference frame. Do not move the robot between the generation of the initial pointcloud and the receipt of the transformed pointcloud because that will make the transformations inaccurate.

    Returns Promise<Uint8Array>

  • Alpha

    Transform a given source Pose from the reference frame to a new specified destination which is a reference frame.

    Parameters

    • source: commonApi.PoseInFrame
    • destination: string

      The name of the reference frame to transform the given

    • supplementalTransforms: commonApi.Transform[]

      Pose information on any additional reference frames that are needed to perform the transform

    Returns Promise<commonApi.PoseInFrame>

Operations

  • Alpha

    Blocks on the specified operation on the robot. This function will only return when the specific operation has finished or has been cancelled.

    Parameters

    • id: string

      ID of operation to block on.

    Returns Promise<void>

  • Alpha

    Cancels the specified operation on the robot.

    Parameters

    • id: string

      ID of operation to kill.

    Returns Promise<void>

  • Alpha

    Get the list of operations currently running on the robot.

    Returns Promise<Operation[]>

  • Alpha

    Cancel all current and outstanding operations for the robot and stop all actuators and movement.

    Parameters

    • Optional extra: Map<string, StructType>

      Any extra parameters to pass to the components' stop methods, keyed on the component's resource name.

    Returns Promise<void>

Resources

Status

  • Alpha

    Get a list of all statuses requested. An empty request signifies all resources.

    Parameters

    Returns Promise<robotApi.Status[]>

  • Alpha

    Periodically receive the status of all statuses requested. An empty request signifies all resources.

    Parameters

    • Optional resourceNames: commonApi.ResourceName.AsObject[]

      The list of resources for which to receive statuses. Default is [].

    • Optional durationMs: number

    Returns RobotStatusStream

Generated using TypeDoc