Learning how to interact with topics

To interact and get information about topics, we have the rostopic tool. This tool accepts the following parameters:

  • rostopic bw TOPIC: This displays the bandwidth used by topics
  • rostopic echo TOPIC: This prints messages to the screen
  • rostopic find TOPIC: This finds topics by their type
  • rostopic hz TOPIC: This displays the publishing rate of topics
  • rostopic info TOPIC: This prints information about active topics
  • rostopic list: This lists the active topics
  • rostopic pubs TOPIC: This publishes data to the topic
  • rostopic type TOPIC: This prints the topic type

If you want to see more information on these parameters, use -h, as follows:

    $ rostopic bw -h  

With the pub parameter, we can publish topics that ...

Get ROS Programming: Building Powerful Robots now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.