Inspecting all the topics and messages in a bag file

There are two main ways to inspect the contents of a bag file. The first one is very simple: we just type rosbag info <bag_file>, and the result is something similar to the one shown in the following screenshot:

We have information about the bag file itself, such as the creation date, duration, size, the number of messages, and the compression (if any). Then, we have the list of data types inside the file, and finally the list of topics with their corresponding name, number of messages, and type.

The second way to inspect a bag file is extremely powerful. It is a GUI called rqt_bag which also allows you to play back the files, view the images (if any), plot scalar data, and also view the Raw structure of the messages; it is rxbag behavior's replacement. We only have to pass the name of the bag file to see something similar to the following screenshot (for the previous bag file):

We have a timeline for all the topics where each message appears with a mark. If the bag file we're inspecting contains images, we can enable thumbnails to see them in the timeline.

In the following screenshot, we can see how to access the Raw, Plot, and Image (if the topic is of the Image type) views for the topics in the file. This pop-up menu appears with a right-click over the timeline:

As an alternative, we can use rqt_gui and put the rqt_bag and rqt_plot plugins in the same window; the layout of the following screenshot can be imported from the perspective given in the config/bag_plot.perspective folder. However, we have to use Publish All and play to actually see the plot, which differs from the rxbag behavior. For /accel, we can plot all the fields in a single axis. To do so, once we have the plot view, we add each field by pressing the + button/icon. Note that we can remove them later or create different axes. As mentioned previously, the plot is not generated for all the values in the file, rather it simply shows the data that is played back and published:

Remember that with the rxbag behavior, we must press the play button at least once to be able to plot the data. Then we can play, pause, stop, and move to the beginning or the end of the file. The images are straightforward, and a simple window appears with the current frame with options to save them as image files.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.42.168