Skip to main content

Ros2Gateway

@totemsdk/edge-ros2


@totemsdk/edge-ros2 / Ros2Gateway

Interface: Ros2Gateway

Properties​

status​

readonly status: "stopped" | "running" | "error"

Methods​

callService()​

callService(service, serviceType, request, timeoutMs?): Promise<EdgeOperationResult<{ response: Ros2Message; }>>

Call a service.

Parameters​

service​

string

serviceType​

string

request​

Ros2Message

timeoutMs?​

number

Returns​

Promise<EdgeOperationResult<{ response: Ros2Message; }>>


createPublisher()​

createPublisher(topic, messageType): Promise<Ros2Publisher>

Create a publisher on a typed topic.

Parameters​

topic​

string

messageType​

string

Returns​

Promise<Ros2Publisher>


createSubscription()​

createSubscription(topic, messageType, handler): Promise<Ros2Subscription>

Create a subscription on a typed topic.

Parameters​

topic​

string

messageType​

string

handler​

(msg) => void

Returns​

Promise<Ros2Subscription>


start()​

start(): Promise<void>

Returns​

Promise<void>


stop()​

stop(): Promise<void>

Returns​

Promise<void>