In this section, we will learn that scalar data can be plotted as a time series, where time is provided by the timestamps of the messages. We can use the y axis to plot scalar data versus timestamps along the x axis. ROS has a GUI tool called rqt_plot, which will do this for us.
To see rqt_plot in action, we will use the program4 node which publishes scalar and vector data in two different topics, /temperature and /acceleration, respectively (refer to program4.cpp at GitHub for more information). However, the values in the message are synthetically generated and so they do not have physical meaning but are useful in our plotting demonstrations and learning.