Universal Robots TypeScript API - v10.12.0
    Preparing search index...

    The UR TypeScript API for ROS 2

    Index

    Constructors

    • Create Ros2Client ROS2 client for UR ROS2 Web Bridge

      Parameters

      Returns Ros2Client

    Methods

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

      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.

      • OptionalqosProfile: QoSProfile

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

      • Optionaltimeout: string

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

      Returns Promise<T>

      The first message returned from the service call. @deprecated. Use call method with MessageDefinitions

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

      Type Parameters

      • TRequest
      • TResponse

      Parameters

      • serviceType: ServiceWrapper

        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: TRequest

        Values to be set.

      Returns Promise<TResponse>

      The first message returned from the service call.

    • Create a new subscription to a ROS2 topic.

      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.

      • OptionalqosProfile: QoSProfile

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

      Returns Observable<T>

      Observable to subscribe to

      Use createSubscription method that takes MessageDefinition[]

    • Create a new subscription to a ROS2 topic.

      Type Parameters

      • T

      Parameters

      • messageType: MessageDefinition[]
      • topicPath: string

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

      Returns Observable<T>

      Observable to subscribe to

    • Create a new subscription for frame transformation

      Parameters

      • targetFrame: string
      • sourceFrame: string

      Returns Observable<IRosTypeGeometryMsgsTransform>

      Observable to subscribe to

      Use framesService.observeFrames and convertPose instead.

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

      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.

      • ...namespace: string[]

        optional namespaces to prepend service name.

      Returns Promise<string>

      ServicePath extending Promise

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

      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.

      • ...namespace: string[]

        optional namespaces to prepend topic.

      Returns Promise<string>

      TopicPath extending Promise