a rawlog file is divided in a sequence of actions, observations, actions, observations,... ”Actions” typically include robot motor actuations (odometry), but any kind of user-defined actions can be defined as well (e.g. robot arm actuations). ”Observations” include readings from the rest of robotic sensors: laser scanners, images from cameras, sonar ranges, etc.
A rawlog file is a binary serialization of alternating objects of the classes:
• CActionCollection, one or more actions (e.g. odometry), and
• CSensoryFrame, which stores the observations.
While the previous format is really well-suited for Bayesian approaches with clearly separate steps of process action-process observation, in the case of complex datasets with many different sensors, working at different rates, and possibly without odometry (the typical ’action’ in SLAM algorithms), it is more clear to just store datasets as an ordered list of observations.
Actual contents of a ”.rawlog” file in this format In this case, the rawlog file is a binary serialization of objects derived from the class slam::CObservation. In this case, odometry (if present) is also stored as an observation.
The applications RawLogViewer, rawlog-grabber, and the class slam::CRawlog all support both rawlog formats.
This is the preferred mode of operation in general: actions and observations are read sequentially from the file, processed, freed, and so on. In this way only the required objects are loaded in memory at any time, which is mandatory when managing large datasets (e.g. containing thousands of embedded images). However, notice that if images are stored externally the rawlog could be loaded at once without problems. A typical loop for loading a rawlog in this way is shown next:
A rawlog file can be read as a whole using the class slam::CRawlog. Notice that this may be impractical for very large datasets (several millions of entries) due to memory requirements, but for mid-sized datasets it definitively is the easiest way of loading rawlogs.