Ask Your Question

How to obtain list of all available topics [python]

asked 2017-03-06 10:30:42 -0600

vvyogi gravatar image

In my gazebo model I have 9 differential drive vehicles.
When I execute rostopic list i get

...    and so on

I wish to find out all the odom topics in python script and subscribe to all of them using the message_filter

However, I am not being able to find/locate the getTopics() function as is mentioned here Kindly let me know what package do I import to get the getTopics() function working.

Any help is appreciated. Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-03-06 10:50:56 -0600

The getTopics function is C++ only. The equivalent function in Python is get_published_topics.

edit flag offensive delete link more


Note that this only gives topics that are advertised while rostopic list also shows topics that are only subscribed to by some node.

Felix Widmaier gravatar image Felix Widmaier  ( 2018-02-09 02:53:01 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-03-06 10:28:05 -0600

Seen: 5,996 times

Last updated: Mar 06 '17