Scalar data can easily be plotted with some generic tools already available in ROS. Scalar data cannot be plotted, rather each scalar field has to be plotted separately. This is the reason we talk about scalar data because most nonscalar structures are better represented with ad hoc visualizers, some of which we will see later; for instance, images, poses, and orientation/attitude.
In ROS, scalar data can be plotted as a time series over the time provided by the timestamps of the messages. Then, we will plot our scalar data in the y axis. The tool to do so is rxplot
. It has a powerful argument syntax that allows us to specify several fields of a structured message (in a concise manner as well).
To show rxplot
in action, we are going to use the example4
node since it publishes a scalar and a vector (nonscalar) in two different topics, which are temp
and accel
respectively. The values put in these messages are synthetically generated...