The UR TypeScript API for ROS 2

Hierarchy

  • Ros2Client

Constructors

  • Create Ros2Client ROS2 client for UR ROS2 Web Bridge

    Parameters

    Returns Ros2Client

Properties

getConnectionId: any

Get Id for connection

Returns

Id for connection

getPath: any

Get promise path

Param

Param

Param

Returns

Promise

getRobotNamespace: any

Get RobotNamespace

robotNamespace?: any
ros2Service: any

Methods

  • Make a ROS2 service call for setting argumentValues on a service, and return an observable of type T.

    Returns

    The first message returned from the service call.

    Type Parameters

    • T

    Parameters

    • serviceType: string

      The type of ROS service to set argumentValues on.

    • servicePath: string

      ServicePath The name of the service to set argumentValues on, may include namespace.

    • argumentValues: unknown

      Values to be set.

    • Optional qosProfile: QoSProfile

      optional quality of service profile to apply to the service client. Default is QoSProfile.default.

    • Optional timeout: number

      optional float value in seconds, default is 30.0 seconds before timeout.

    Returns Promise<T>

  • Create a new subscription to a ROS2 topic.

    Returns

    Observable to subscribe to

    Type Parameters

    • T

    Parameters

    • messageType: string

      The type of ROS messages the subscription will subscribe to.

    • topicPath: string

      TopicPath The name of the topic the subscription will subscribe to, may include ros2 namespace.

    • Optional qosProfile: QoSProfile

      optional quality of service profile to apply to the subscription. Default is QoSProfile.default.

    Returns Observable<T>

  • Create a new subscription for frame transformation

    Returns

    Observable to subscribe to

    Parameters

    • targetFrame: string
    • sourceFrame: string

    Returns Observable<IRosTypeGeometryMsgsTransform>

  • Get service path to be used for ROS2 communication, including optional robot namespace and custom namespace.

    Returns

    ServicePath extending Promise

    Parameters

    • prependRobotNamespace: boolean

      boolean if true then local ROS2 robot namespace will be prepended to service name.

    • serviceName: string

      string to be used for ROS2 communication.

    • Rest ...namespace: string[]

      optional namespaces to prepend service name.

    Returns Promise<string>

  • Get topic path to be used for ROS2 communication, including optional robot namespace and custom namespace.

    Returns

    TopicPath extending Promise

    Parameters

    • prependRobotNamespace: boolean

      boolean if true then local ROS2 robot namespace will be prepended to topic.

    • topic: string

      string to be used for ROS2 communication.

    • Rest ...namespace: string[]

      optional namespaces to prepend topic.

    Returns Promise<string>

Generated using TypeDoc