bag-record [OPTIONS] -o OUTPUT [URI1] [URI2 ...]
The bag-record program can be used to capture certain RSB events in a running system and store them into a log file for later analysis, further processing or replay.
The usual commandline options and IDL-related options are accepted. Specialized commandline options:
Write captured events to file OUTPUT. The file format is determined based on the file type (which is determined based on the file extension).
Tip
The output of common --help-for all includes a list of supported file formats.
Allocate channels for received events in the output bag file according to the strategy designated by SPEC which has to be of the form:
KIND KEY1 VALUE1 KEY2 VALUE2 ...
where keys and values depend on KIND and are optional in most cases. The default channel allocation strategy is scope-and-type which creates on the fly based on events scopes and types according to the following scheme:
SCOPE:TYPE
Examples (note that the single quotes have to be included only when used within a shell)
-a scope-and-type
Tip
Use the common --help-for channel-strategies or common --help-for all options to display the full help text, including available strategies and their respective parameters, for this item.
Expose an RPC interface for remote-controlling the recording process under URI. See Remote Control for details.
Important
Supplying this option causes bag-record to start in a suspended state. The recording has to be started using the :function:`start`.
Some general remarks regarding recording of RSB events using bag-record:
bag-record can expose an RPC interface that allows starting, stopping and terminating the recording process. This feature is enabled using the --control-uri commandline option. An URI has to be supplied as an argument of the option to configure the scope and transport through which the RPC interface should be exposed. The interface consists of the following methods:
Restart recording after it has been stopped.
Stop recording allowing it to be restarted later.
Terminate the recording process and the program.
$ bag-record -o /tmp/nao.tide
'spread:/nao/vision/top?name=4803'
'spread:/nao/audio/all?name=4803'
'spread:/nao/proprioception?name=4803'
The resulting file will (unless a different channel allocation is specified) contain one channel for each of the three RSB channels.
$ bag-record -o /tmp/nao.tide
'spread://remote:4803/nao/vision/top'
'spread://remote:4803/nao/audio/all'
'spread://remote:4803/nao/proprioception'
$ bag-record -c 'spread:/control' -o /tmp/everything.tide spread:
Then, without terminating the above bag-record process, the RPC Call program can be used to issue commands:
$ call 'spread:/control/terminate()'