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.netNote 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.
The readlog driver currently supports the following interfaces: laser, position, wifi.
|index||integer||0||Device index in the log file.|
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.cfgwhere 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.
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