orca-robotics INTRODUCTION Overview Download and Install Quick Start Documentation Publications REPOSITORY Interfaces Components Libraries Utilities Software Map DEVELOPER Tutorials Examples Dev Guide Dashboard Wiki login/pass: orca/orca PEOPLE Contributors Users Project Download Mailing lists
|
LoggerLogs data and configurations from interfaces.
More... |
Logger class that handles incoming data and writes them to one file each (e.g. for the LaserScanner2d interface, the LaserScanner2dLogger class writes data to laserscanner2d0.log). Data is received by either pulling data e.g. with getData() or by subscribing for data pushes e.g. with subscribe().
Logger.Requires.Laser0.Proxy=laserscanner2d@alpha/laser2d Logger.Requires.Laser1.Proxy=laserscanner2d@bravo/laser2d Logger.Requires.Odometry2d0.Proxy=odometry2d@local/segwayrmp
Logger.Config.FactoryLibNames
(string)
Logger.Config.FilenameTimestamp
(bool)
Logger.Config
.<interfaceType><number>.Format (string)Logger.Config.Laser0.Format=ascii
060804_153321_master.log 060804_153321_laserscanner0.log 060804_153321_laserscanner1.log 060804_153321_camera0.log
The first records in each subfile are configuration data, after that all records are "pure" data. Subfiles are named according to the interfaces you're logging and have a number attached in case you want to log the same interface type several times (e.g. when logging several lasers). Don't change the file names because they are also recorded in the corresponding master file.
Subfiles contain the logged data. The Orca Logger supports two different encoding types {'ice', 'ascii'} which can be configured on a per-interface basis. 'ice' produces binary files which are generated by Slice's built-in streaming functionality. The disadvantage is that they are not human-readable. 'ascii' produces human-readable ascii files but the streaming functions need to be implemented manually which is error-prone. They are useful because they can be easily parsed (e.g. using Matlab).
Details are given on a separate page: Orca log format
To parse the 'ascii' log files in Matlab, you can use the files provided in [ORCA_SRC]/scripts/matlab/logutils/parse<interfaceType>data.m. Usage information is provided through matlab help:
>> help parse<interfaceType>data
The default logger factory can be extended with new interfaces, e.g. MyInterface
by executing the following steps:
MyInterfaceSlave
class which inherits from Slave
and handles the interface-specific logging (e.g. streaming the data to the file).To add a new plug-in slave factory, use orcalogfactory as an example. Compile the new factory into a .so, stick it somewhere in your LD_LIBRARY_PATH, and edit Logger.Config.FactoryLibNames to point to it.
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)