0
$\begingroup$

Rosanswers logo

I am using turtlebot in gazebo which uses "scan" message for publishing laser scan data, by using rostopic type scan command I can find out type of the message i.e. sensor_msgs/LaserScan , Is there way to find names of all the messages published on particular topic ?

For example, Is there any way to find out that message named "scan" is published by turtlebot knowing only the topic name i.e. sensor_msgs/LaserScan ?

Thanks in advance.


Originally posted by siddhesh on ROS Answers with karma: 39 on 2016-05-31

Post score: 0


Original comments

Comment by Icehawk101 on 2016-05-31:
I'm a little confused. Scan is the topic name, sensor_msgs/LaserScan is the message type. Are you asking if there is a way to search for topic names based on message type?

Comment by Icehawk101 on 2016-05-31:
Also, only one type of message can be published to a particular topic.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

If you are trying to do what I think you are, find all of the topics publishing or subscribing sensor_msgs/LaserScan messages, then the answer is yes. Enter rostopic find sensor_msgs/LaserScan in a terminal window and it will list the topics using the sensor_msgs/LaserScan message.


Originally posted by Icehawk101 with karma: 955 on 2016-05-31

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by siddhesh on 2016-05-31:
@Icehawk : Thanks. That's exactly what I needed. Sorry for poor wording.

Comment by Icehawk101 on 2016-06-01:
Not a problem. The nomenclature takes a bit of getting used to. Every time I write a paper or document about ROS the first section is always a glossary :P

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.