next up previous contents
Next: 7.37 segwayrmp Up: 7. Device Drivers Previous: 7.35 rwi   Contents

Subsections


7.36 readlog

Authors

Andrew Howard ahoward(at)usc.edu

Synopsis

The readlog driver can be used to ``replay'' data stored in a log file. This is particularly useful for debugging client programs, since users may run their clients against the same data set over and over again. Suitable log files can be generated using the writelog driver, or they may be downloaded from the Robotics Data Set Repository (Radish):

http://radish.sourceforge.net
Note that, to make use of log file data, Player must be started in a special mode:
  $ player -r <logfile> <configfile>
The -r switch instructs Player to load the given log file, and replay the data according the configuration specified in <configfile>. See the below for some usage examples of the readlog driver.

Interfaces

The readlog driver currently supports the following interfaces: laser, position, wifi.

Configuration file options

Name Type Default Meaning
index integer 0 Device index in the log file.

Example: Replay Odometry and Laser Data

The following configuration file foo.cfg will read odometry and laser data from a log file:

  position:0 (driver "readlog" index 0)
  laser:0 (driver "readlog" index 0)
The Player server must also be started in the appropriate mode:
  $ player -r foo.log foo.cfg
where foo.log contains the data to be replayed. See Section 7.48 for an example that shows how to generate a suitable log file using the writelog driver.

Example: Post-hoc Localization

A particularly useful feature of the readlog driver is that it can be used to generate localization information a robot the after the experiment has been performed. The following configuration file bar.cfg will read odometry and laser data from a log file, and pass it to the amcl driver to generate robot pose estimates.

  position:0 (driver "readlog" index 0)
  laser:0 (driver "readlog" index 0)
  localize:0 
  (
    driver "amcl" 
    position_index 0 
    laser_index 0 
    map_file "mymap.pnm" 
    map_scale 0.05
  )
The Player server must also be started in the appropriate mode:
  $ player -r foo.log bar.cfg


next up previous contents
Next: 7.37 segwayrmp Up: 7. Device Drivers Previous: 7.35 rwi   Contents
2004-06-02