import type { RosTransport } from "../transport.js"; import type { ConnectionStatus, ConnectionHandler, Subscription, PublishOptions, SubscribeOptions, ServiceCallOptions, ServiceCallResult, ActionGoalOptions, ActionResult, TopicInfo, ServiceInfo, ActionInfo, MessageHandler } from "../types.js"; export interface LocalTransportOptions { domainId?: number; } /** * Mode A transport: direct local DDS communication via rclnodejs. * * When OpenClaw runs on the robot itself, this transport talks to ROS2 * directly via the local DDS bus — no network intermediary needed. */ export declare class LocalTransport implements RosTransport { private domainId; private status; private connectionHandlers; /** rclnodejs module — loaded dynamically at runtime (optional dep, no types). */ private rclnodejs; private node; private entityCache; private activeGoals; /** * True after the first stable DDS graph snapshot. Later listTopics() calls * read getTopicNamesAndTypes() once. The node keeps discovery state, so a * second 0.9–6s poll only delays the agent. */ private graphReady; /** Bumped on disconnect so an in-flight warmup cannot mark a dead node ready. */ private discoverGeneration; private listTopicsInflight; /** Singleton guard — rclnodejs.init() must only be called once per process. */ private static rclInitialized; constructor(options?: LocalTransportOptions); connect(): Promise; disconnect(): Promise; getStatus(): ConnectionStatus; onConnection(handler: ConnectionHandler): () => void; publish(options: PublishOptions): void; subscribe(options: SubscribeOptions, handler: MessageHandler): Subscription; callService(options: ServiceCallOptions): Promise; sendActionGoal(options: ActionGoalOptions): Promise; cancelActionGoal(action: string): Promise; listTopics(): Promise; private snapshotTopics; /** * First snapshot after connect. DDS peers announce over a few hundred * milliseconds (longer on Jetson), and a single early read used to hide * arm topics from a model that only calls list_topics once. Wait until the * external-topic count holds, then mark the graph ready. */ private discoverTopics; private readExternalTopics; private toTopicInfos; listServices(): Promise; listActions(): Promise; private setStatus; private ensureConnected; /** * Resolve a topic's type from the node's graph introspection. * Returns undefined if the topic is not yet known. */ private resolveTopicType; /** * Resolve a service's type from the node's graph introspection. * Returns undefined if the service is not yet known. */ private resolveServiceType; /** * Wrap rclnodejs callback-based sendRequest in a Promise with timeout. */ private sendServiceRequest; } //# sourceMappingURL=transport.d.ts.map