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

    Interface Ros2ServiceApi

    Service API for ROS2 communication

    interface Ros2ServiceApi {
        callService<TRequest, TResponse>(
            serviceType: ServiceWrapper,
            serviceName: string,
            argumentValues: TRequest,
        ): Observable<TResponse>;
        getRos2Namespace(): Promise<string>;
        subscribe<T>(
            messageType: MessageDefinition[],
            topic: string,
        ): Observable<T>;
        subscribeTransform<T extends Ros2HeaderType>(
            connectionId: string,
            targetFrame: string,
            sourceFrame: string,
            publishRate?: number,
        ): Observable<T>;
    }

    Implemented by

    Index

    Methods

    • Call service to set argumentValues of service type on service name

      Type Parameters

      • TRequest
      • TResponse

      Parameters

      • serviceType: ServiceWrapper
      • serviceName: string
      • argumentValues: TRequest

      Returns Observable<TResponse>

      Observable to subscribe to

    • Get local ROS2 robot namespace

      Returns Promise<string>

      Promise containing local ROS2 robot namespace

    • Subscribe to topicPath with given message type using QoS profile

      Type Parameters

      • T

      Parameters

      • messageType: MessageDefinition[]
      • topic: string

      Returns Observable<T>

      Observable to subscribe to

    • Subscribe to frame transformation

      Type Parameters

      Parameters

      • connectionId: string

        Id for subscription

      • targetFrame: string
      • sourceFrame: string
      • OptionalpublishRate: number

        in milliseconds

      Returns Observable<T>

      Observable to subscribe to