Rosbridge get topic type [closed]

asked 2013-10-02 02:15:07 -0500

tropic gravatar image

updated 2013-10-02 02:16:57 -0500

I am using rosbridge 2.0 to communicate with ROS over websocket. I use call_service and /rosapi/topics to get a list of current topics in ROS, which works fine. Now I would like to get the topic types of each topic available in this list, and for this I use call_service and /rosapi/topic_type to loop through each entry in the topics list.

However, because of the sparse examples I have a hard time getting the syntax right. If I just call call_service and /rosapi/topic_type rosbridge_server returns an error: service [/rosapi/topic_type] responded with an error: error processing request: , most likely because it needs an argument for what topic I would like the type returned for.

From https://github.com/RobotWebTools/rosbridge_suite/blob/groovy-devel/ROSBRIDGE_PROTOCOL.md I have the following options below, but have not found the correct syntax yet to return the topic type:

3.4.6 Call Service

{ "op": "call_service",
  (optional) "id": <string>,
  "service": <string>,
  (optional) "args": <list<json>>,
  (optional) "fragment_size": <int>,
  (optional) "compression": <string>
}
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2016-08-08 00:19:20.944492