How to obtain list of all available topics [python]
In my gazebo model I have 9 differential drive vehicles.
When I execute rostopic list
i get
/bot_0/cmd_vel
/bot_0/odom
/bot_1/cmd_vel
/bot_1/odom
/bot_2/cmd_vel
/bot_2/odom
/bot_3/cmd_vel
/bot_3/odom
/bot_4/cmd_vel
/bot_4/odom
/bot_5/cmd_vel
/bot_5/odom
/bot_6/cmd_vel
/bot_6/odom
/bot_7/cmd_vel
/bot_7/odom
/bot_8/cmd_vel
/bot_8/odom
/clock
/gazebo/link_states
... 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.