ROS Tool | Transitive Robotics

submited by
Style Pass
2024-07-08 22:00:11

A generic ROS tool providing a React API for subscribing, publishing, and making service calls from the web. This is very similar to rosbridge + roslibjs, but based on Transitive's MQTTSync protocol which has several advantages over rosbridge:

subscribe(rosVersion, topic): subscribe to ROS topics on the robot, e.g., subscribe(1, '/odom'). This will cause the robot component of this capability to subscribe to that topic on the robot and publish the latest values on MQTTSync under the /device/ros/[rosVersion]/messages/[topic] namespace, and it will subscribe to that MQTTSync topic.

publish(rosVersion, topic, type, message): publish a message on a ROS topic, e.g.: publish(1, '/chatter', 'std_msgs/String', {data: 'hello from web'})

callService(rosVersion, service, type, request, callback): call a service with the given request payload. The callback will be called with two arguments:

Leave a Comment