RobotWebTools / roslibjs

The Standard ROS JavaScript Library
https://robotwebtools.github.io/roslibjs
Other
677 stars 378 forks source link

Add a `getPublishers` method to the ROS class #760

Open hello-amal opened 2 months ago

hello-amal commented 2 months ago

Public API Changes

Add a getPublishers method to the Ros class, which returns all publishers for a topic.

Description

rosapi in rosbridge exposes a /rosapi/publishers service to get all the publishers for a topic. This change exposes that functionality to the ROSlib client.

Note: I tested this in a separate fork with ROS2, which is what I use. I haven't tested it in ROS1 -- hopefully the CI is sufficient for that.