UNPKG

roslib

Version:

The standard ROS Javascript Library

45 lines (44 loc) 2.15 kB
import { default as ActionClient } from '../actionlib/ActionClient.ts'; import { default as Goal } from '../actionlib/Goal.ts'; import { default as Topic } from '../core/Topic.ts'; import { tf2_msgs } from '../types/tf2_msgs.ts'; import { tf2_web_republisher } from '../types/tf2_web_republisher.ts'; import { default as BaseTFClient } from './BaseTFClient.ts'; /** * A TF Client that listens to TFs from tf2_web_republisher. */ export default class TFClient extends BaseTFClient { #private; currentGoal: Goal<tf2_web_republisher.TFSubscriptionGoal, tf2_web_republisher.TFSubscriptionFeedback> | false; currentTopic: Topic<tf2_msgs.TFMessage> | false; actionClient: ActionClient<tf2_web_republisher.TFSubscriptionGoal, tf2_web_republisher.TFSubscriptionFeedback>; /** * @param options * @param options.ros - The ROSLIB.Ros connection handle. * @param [options.fixedFrame=base_link] - The fixed frame. * @param [options.angularThres=2.0] - The angular threshold for the TF republisher. * @param [options.transThres=0.01] - The translation threshold for the TF republisher. * @param [options.rate=10.0] - The rate for the TF republisher. * @param [options.updateDelay=50] - The time (in ms) to wait after a new subscription * to update the TF republisher's list of TFs. * @param [options.topicTimeout=2.0] - The timeout parameter for the TF republisher. * @param [options.serverName="/tf2_web_republisher"] - The name of the tf2_web_republisher server. */ constructor(options: ConstructorParameters<typeof BaseTFClient>[0]); /** * Create and send a new goal (or service request) to the tf2_web_republisher * based on the current list of TFs. */ updateGoal(): void; /** * Process the service response and subscribe to the tf republisher * topic. * * @param response - The service response containing the topic name. */ processResponse(response: tf2_web_republisher.RepublishTFsResponse): void; /** * Unsubscribe and unadvertise all topics associated with this TFClient. */ dispose(): void; }