Exercise 9.3 isn't clear to me

Hello there,
I don’t understand what is being asked in this exercise 9.3 in the pic below. I, surely, will create a package using catkin_create_pkg and create a .launch file and then put a publisher and subscriber. But, firstly I’m guessing that’s not what is asked for(correct?)…

Secondly:

  1. Even if I create a package using the method I said above(considering that’s what is asked for), what topic would I use for publisher and subscriber, and what message type?
  2. Similarly, it says to filter ros_graph to show two nodes with a topic of your interest, How would I do that through coding inside a .py file(If that is what I am supposed to do)?

Thank you
Regards,
Abdul Basit Dost

Hi Abdul,

You can publish and subscribe to any topic. If you want, you can create a publisher of an existing topic generated by the simulation or create a new one with whatever you want inside. This is just to show you how the rqt graph works. To see the graph, you don’t need to code it inside a .py file, you can just open a web shell and run the command:

rosrun rqt_graph rqt_graph

and the graph should appear if you click on the Graphical Interface window, the button that looks like a screen inside the IDE editor.