In robotics, being able to visualize data / commands / motion is an invaluable debugging tool.
ROS provides us multiple tools for visualizing different types data. We have already seen one such visualization tool in the previous class activity - rqt_graph. As a recap, rqt_graph is a visualization tool that helps you visualize ROS nodes (publishers and subscribers) as a connected graph.
In this activity we are going to take a look at rqt_plot and rviz which are useful in plotting / visualizing commands and the resulting motion from those commands.
<aside> ✔️ Prerequisites: ROS Basics
</aside>
<aside> 💡 Before going ahead, make sure that the ros master (roscore) is running.
</aside>
activity_3.zip from here.~/catkin_ws/src .catkin build to build the package.source ~/catkin_ws/devel/setup.bash.roslaunch audubon-gazebo testing_ground.launch . For now, minimize all the windows that this opens.roslaunch activity_3 activity_3.launch.rqt_plot provides a GUI plugin visualizing numeric values in a 2D plot. It is especially useful to visualize scalar quantities such speed, forward acceleration, error, etc.
To get started, open a new terminal window and type rqt_plot and press enter (Do not close this terminal or you will close the application).
This will open up a blank plot similar to the image below:

To visualize some data we need to know name of the topic that we want to visualize and the structure of the message that is being published on that topic (Typically, you will always know the name of the topic that you wish to visualize. If not, you can use rosnode info or rqt_graph to find out).