Linux Examples

In the Sample1 .alog file (named QuadTree_Alog.alog), we wish to extract range data from a laser called LMS_LASER_2D_LEFT.

  1. Run the executable uALogParser without any input arguments to see the various configuration parameters that can be used.
    ./ualogparser
  2. Range data is in the LMS_LASER_2D_LEFT message, and it is stored in a field Range. To extract this data, and the number of scans (which is stored in a scalar variable scanCount):
    ./ualogparser QuadTree_Alog.alog LMS_LASER_2D_LEFT –fields @Range,scanCount -o output.data
  3. The resultant data will be stored in a file called output.’data‘ in the current directory
  4. By default, the entire file is parsed. If this behaviour is not required/wanted, a time range (in seconds) can be specified. If only 20 seconds are required, the following command could be executed:
    ./ualogparser QuadTree_Alog.alog LMS_LASER_2D_LEFT –fields @Range,scanCount –time 0 20
    (Note: A start AND end time must be specified.)
    (Note: The keywords ‘start’ and ‘end’ can be combined with numeric values, e.g. –time start end, or –time 60 end

Using uAlogParser with the above parameters with Sample 1 results in a file with the following structure:

(Note: If you wish to load data from this file into Matlab without making use of the built-in Mex functionality, the Matlab function importdata is very useful.