Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create public Python function for rostopic list in rostopic package #946

Open
gordonbrander opened this issue Dec 6, 2016 · 2 comments
Open

Comments

@gordonbrander
Copy link

gordonbrander commented Dec 6, 2016

Currently, the only function rostopic has for listing topics is private, and it is only useful for the cli usecase because it calls print.

rosgraph.Master("/rostopic").getSystemState() may be used instead of rostopic, but this seems like an abuse of an API which is meant for graph image generation.

I would like to propose that a public rostopic.list function be added to the rostopic package, listing all topic names (and perhaps types).

@mikepurvis
Copy link
Member

I don't disagree with you, but FWIW, what you suggest is exactly how rosbridge handles inspecting the system:

https://github.com/RobotWebTools/rosbridge_suite/blob/a7a2e1a473a1da1acf252d2496fa7db0f211a29f/rosapi/src/rosapi/proxy.py#L49-L56

EliteMasterEric added a commit to EliteMasterEric/ros_comm that referenced this issue Aug 18, 2017
The existing rostopic_list functions output straight to print() calls, so they are only functional for the CLI. Resolves issue ros#946.
EliteMasterEric added a commit to EliteMasterEric/ros_comm that referenced this issue Aug 21, 2017
The existing rostopic_list functions output straight to print() calls, so they are only functional for the CLI. Resolves issue ros#946.
Added new public function to tests.


Updated functions to use new public function to remove redundancy.
EliteMasterEric added a commit to EliteMasterEric/ros_comm that referenced this issue Aug 23, 2017
The existing rostopic_list functions output straight to print() calls, so they are only functional for the CLI. Resolves issue ros#946.
Added new public function to tests.

Updated functions to use new public function to remove redundancy.
@zbynekwinkler
Copy link
Contributor

Should this be closed since get_topic_list() has been merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants