Playback of logged data. More...
Playback of logged data.
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. The format for the log file can be found in the data logging tutorial.
See below for an example configuration file; note that the device id's specified in the provides field must match those stored in the log file (i.e., data logged as "position2d:0" must also be read back as "position2d:0").
For help in controlling playback, try playervcr. Note that you must declare a log device to allow playback control.
- Compile-time dependencies
- none
- Provides
The readlog driver can provide the following device interfaces.
- laser
- ranger
- position2d
- sonar
- wifi
- wsn
- imu
- pointcloud3d
- opaque
- ptz
- actarray
- fiducial
- blobfinder
- camera
- gps
- joystick
- position3d
- power
- dio
- aio
The driver also provides an interface for controlling the playback:
- Requires
- none
- Configuration requests
- PLAYER_LOG_SET_READ_STATE_REQ
- PLAYER_LOG_GET_STATE_REQ
- PLAYER_LOG_SET_READ_REWIND_REQ
- Configuration file options
- filename (filename)
- Default: NULL
- The log file to play back.
- speed (float)
- Default: 1.0
- Playback speed; 1.0 is real-time
- autoplay (integer)
- Default: 1
- Begin playing back log data when first client subscribes (as opposed to waiting for the client to tell the log device to play).
- autorewind (integer)
- Default: 0
- Automatically rewind and play the log file again when the end is reached (as opposed to not producing any more data).
- Example
# Play back odometry and laser data at twice real-time from "mydata.log" driver ( name "readlog" filename "mydata.log" provides ["position2d:0" "laser:0" "log:0"] speed 2.0 )