ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Querying topic types in C++

asked 2012-03-13 19:03:59 -0500

Matt gravatar image

updated 2014-01-28 17:11:37 -0500

ngrennan gravatar image

I there a way in C++ to query if a topic exists and if so what message type it uses?

I am trying to write a generic visualization tool and would like to subscribe to a topic using a callback matching the topic's type.

Alternatively a method that accepts all messages but allows me to learn their type in the callback would also work.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-03-13 22:36:59 -0500

dornhege gravatar image

The xmlrpc api should be able to do that. (getPublishedTopics)

edit flag offensive delete link more

answered 2012-03-13 22:33:35 -0500

Victor Lopez gravatar image

Take a look at shape_shifter in the topic_tools package.

You can subscribe to any topic and when a message has been received consult the message type.

edit flag offensive delete link more

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: 2012-03-13 19:03:59 -0500

Seen: 1,505 times

Last updated: Mar 13 '12