Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

[kinetic-devel] Created public get_topic_list() function for use in other scripts.#1151

Closed
EliteMasterEric wants to merge 1 commit intoros:kinetic-develfrom
EliteMasterEric:topic-list
Closed

[kinetic-devel] Created public get_topic_list() function for use in other scripts.#1151
EliteMasterEric wants to merge 1 commit intoros:kinetic-develfrom
EliteMasterEric:topic-list

Conversation

@EliteMasterEric
Copy link
Copy Markdown
Contributor

@dirk-thomas I determined that the issue with my previous pull request (#1146) was that the change was based on the lunar branch, rather than the branch I was developing the pull request for (kinetic). In my attempt to move the pull request to be based on kinetic-devel I accidentally butchered the old pull request.

The issues you referred to in the old pull request have been resolved, and running rostopic list functions fully as expected.


Resolves issue #946.

The only function in rostopic for listing the available topics is built exclusively for the command line interface; this adds a public function for other applications that want a list of topics.

Usage:

import rostopic
publishers, subscribers = rostopic.get_topic_list()
for topic, type, node_count in publishers:
    print("Publisher: %s, [%s] (%d nodes)" % (topic, type, node_count))
for topic, type, node_count in subscribers:
    print("Subscriber: %s, [%s] (%d nodes)" % (topic, type, node_count))

@EliteMasterEric EliteMasterEric changed the title [kinetic-deel] Created public get_topic_list() function for use in other scripts. [kinetic-devel] Created public get_topic_list() function for use in other scripts. Aug 23, 2017
@dirk-thomas
Copy link
Copy Markdown
Member

Any pull request in this repo should target the latest development branch (currently lunar-devel). Please either edit this PR and change the target branch (using the edit button beside the title) or open a new PR targeting lunar-devel and close this PR.

Only patches fixing bugs which only exist in an older ROS distro but not in a newer one are being merged to a different branch than the current default.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants