Saving and playing back data

Usually, when we work with robotic systems, we have to deal with our resources either being shared or not always available, or with the fact that experiments cannot be done regularly because of the cost or time required for preparing and performing them. For this reason, it is good practice to record the data of the experiment session for later analysis and to work, develop, and test our algorithms. However, the process of saving good data so that we can reproduce the experiment offline is not trivial. Fortunately, in ROS we have powerful tools that have already solved this problem.

ROS can save all the messages published on any topic. It has the ability to create a bag file containing the messages as they are, with all their fields and timestamps. This allows for the reproduction of the experiment offline, with its real conditions on the robot as the latency of message transmissions. What's more, ROS tools do all this efficiently, with a high bandwidth, and in an adequate manner, to organize the saved data.

In the following section, we will explain the tools provided by ROS to save and play back data stored in bag files, which use a binary format designed for and by ROS developers. We will also see how to manage these files, that is, inspect the contents (number of messages, topics, and so on), compress them, and split or merge several of them.

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

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