The writelog driver will write data from another device to a log file. Each data message is written to a separate line. The format for the file is given in the data logging tutorial.

The readlog driver can be used to replay the data (to client programs, the replayed data will appear to come from the real sensors).

The writelog driver logs data independently of any client connections to the devices that it is logging. As long as it's enabled and recording, the writelog driver records data from the specified list of devices at the rate that new data is produced by the first device in that list (so put the fastest one first). Commands are not logged.

For help in remote-controlling logging, try playervcr. Note that you must declare a log device to allow logging control.

Note that unless you plan to remote-control this driver via the log interface (e.g., using playervcr), you should specify the alwayson option in the configuration file so that logging start when Player starts.

Compile-time dependencies


The writelog driver takes as input a list of devices to log data from. The driver with the highest data rate should be placed first in the list. The writelog driver can will log data from the following interfaces:

The following interfaces are supported in principle but are currently disabled because they need to be updated:

Configuration requests

Configuration file options
  • log_directory (string)
    • Default: Directory player is run from.
    • Name of the directory to store the log file in. Relative paths are taken from the directory player is run from. Absolute paths work as expected.
  • basename (string)
    • Default: writelog, produces the logfile: "writelog_YYYY_MM_DD_HH_MM.log", where YYYY is the year, MM is the month, etc.
    • Base name of the logfile to attach the time stamp to. If specified the logfile will be "(basename)_YYYY_MM_DD_HH_MM.log".
  • filename (string)
    • Default: "(basename)_YYYY_MM_DD_HH_MM.log", where YYYY is the year, MM is the month, etc. If this parameter is specified it will NOT be time stamped.
    • Name of logfile.
  • autorecord (integer)
    • Default: 0
    • Default log state; set to 1 for continous logging.
  • camera_save_images (integer)
    • Default: 0
    • Save camera data to image files as well as to the log file. The image files are named "writelog_YYYY_MM_DD_HH_MM_camera_II_NNNNNNN.pnm", where II is the device index and NNNNNNN is the frame number.
# Log data from laser:0 position2d:0 to "/home/data/logs/mydata_YYYY_MM_DD_HH_MM.log"
  name "writelog"
  log_directory "/home/user/logs"
  basename "mydata"
  requires ["laser:0" "position2d:0"]
  provides ["log:0"]
  alwayson 1
  autorecord 1

Andrew Howard

Last updated 12 September 2005 21:38:45