rosbridge_suite icon indicating copy to clipboard operation
rosbridge_suite copied to clipboard

Provide separate arguments for publish and subscribe topic globs.

Open harsh-pal-robotics opened this issue 1 year ago • 4 comments

Currently you can pass the "--topics_globs" which is then provided for both the Publish and Subsrciber glob.

https://github.com/RobotWebTools/rosbridge_suite/blob/c1bfc2ff451069b2a40544581e2910d20efc3f62/rosbridge_server/scripts/rosbridge_websocket.py#L274

https://github.com/RobotWebTools/rosbridge_suite/blob/c1bfc2ff451069b2a40544581e2910d20efc3f62/rosbridge_server/scripts/rosbridge_websocket.py#L323 https://github.com/RobotWebTools/rosbridge_suite/blob/c1bfc2ff451069b2a40544581e2910d20efc3f62/rosbridge_server/scripts/rosbridge_websocket.py#L325

And the same for the "--services_glob" which is provided for both advertise and call service globs.

The idea is that this should provide a fine-grained control whether it is possible to publish or suscribe to a certain topic.

harsh-pal-robotics avatar Oct 14 '24 09:10 harsh-pal-robotics

This is a good idea, if you're willing to help implement it.

Also semi-related, I notice there is no actions_glob either. Guess I didn't add that when I made the action support feature 😬

sea-bass avatar Dec 07 '24 17:12 sea-bass

For sure! I will make a PR with it!

The new args could be:

  • subscribe_topics_glob
  • publish_topics_glob (for publishing and advertising)
  • call_services_glob
  • advertise_services_glob (advertising, unadvertising)
  • client_action_glob
  • advertise_action_glob

Do you want to keep the topics_glob and services_glob arguments, which would not be breaking compatibility. And providing value to the topics_glob arg would allow for both publishing and subscribing.

harsh-pal-robotics avatar Dec 24 '24 10:12 harsh-pal-robotics

Hmm... probably the most "correct" thing to do is whatever doesn't break compatibility. But I also don't think having a redundant interface is desired.

I would say just replace it, so long as all the defaults are the same as before.

But maybe others have more opinions?

sea-bass avatar Dec 24 '24 14:12 sea-bass

I would like to +1 this feature request. I have implemented a local change that allows some of this. I agree a redundant interface isn't great but it will break backwards compatibility. Maybe keep the redundant interface for existing versions and remove it on new ROS releases going forwards?

gstorer avatar May 30 '25 09:05 gstorer