This is a wrapper around the roslibjs package aiming to improve shortcomings of the original roslib package by introducing a fluent API as well as some useful error and fault handling mechanisms.
For the official roslibjs repository please head to https://github.com/RobotWebTools/roslibjs
Inspired by https://github.com/milvusrobotics/roslibjs-client
const client = new RosClient({
url: 'ws://192.168.0.11:9090' // default
})
client.on('connected', () => {...})
client.on('disconnected', () => {...})
opts
- ROSLIB.Topic({...})
payload
- ROSLIB.Message({...})
const topic = client.createTopic(opts) // instantiating
topic.publish(payload)
topic.subscribe(() => {...})
.dispose()
opts
– ROSLIB.Service({...})
payload
– ROSLIB.ServiceRequest({...})
client.callService(opts, payload)