Package: rosbag_metadata
# rosbag_metadataTool for collecting and writing metadata to ROS bagfiles or to accompanyingyaml files.## System metadataThe tool collects various system metadata by default and saves along with theuser entered data. The purpose of this is to be able to figure out whatversions of software, os, etc. was running at the time of the bag recording.Each category of system metadata can be disabled through command line options.Currently, the following data is saved:* ROS distribution info and package versions* Information on git repositories within ```ROS_PACKAGE_PATH```* Environmental variables* Network interfaces and IP address information* Connected USB devices## Examples### ReadingDisplay metadata from a bag file:```rosbag_metadata mybag.bag```Look for metadata in a directory:```rosbag_metadata /path/to/dir```First it searches for /path/to/dir/metadata.yaml, followed byinspecting .bag files for /metadata topic. Displays the first hit unless```--find-all``` is specified.Read matadata from a yaml file:```rosbag_metadata file.yaml```### WritingWrite data to a bag file:```rosbag_metadata -w mybag.bag```Write data to a yaml file:```rosbag_metadata -w file.yaml -t templatefile.yaml```Write data to directory:```rosbag_metadata -w /path/to/dir --write-rosbag-info``````--write-rosbag-info``` will cause ```.bag``` files in the directory to beinspected with ```rosbag info``` and the resulting information will be added tothe metadata. This option does not work when the target is a bag file.### TemplatesTemplate files are simpy yaml files with key pairs that will be used as defaultkeys and values if defined. If a template is used the default behavior ofrosbag_metadata is to not ask for values of keys defined with defaults in thetemplate. This behavior can be overwritten using the ```--ask-template-defaults```or per template item basis (see example template).```description: {value: My experiment, ask: 1}operator: Mr. Userlocation: Building X```## ConfigurationThe template, default keys, system metadata settings and more can be configuredin a config file. By default, rosbag_metadata will look for a config file```~/.ros/rosbag_metadata.conf```. Users can also specify a config file with the```-c/--config``` option.### Example configThe following config includes all the possible configuration options.Default fields can be configured both via template and in the config file.```[config]clean = nowrite_rosbag_info = yessystem_info = yessystem_info_all = nosystem_info_usb = yessystem_info_git = yessystem_info_ros = yessystem_info_env = yessystem_info_full_env = nosystem_info_ip = yesfind_all = yesdebug = noask_template_defaults = notemplate = ~/.ros/my_template.yamlextra_fields = nono_prompt = yes[default_fields]my_default_fieldanother_field = with_value```## Future directionThe original idea for this project is to be able to easily catalog bag files and datasetsrecorded using ROS. This is the first step of that process. The to-do list includesscripts to regularly index bag files in set folders and summarize to a database.The metadata information generated by rosbag_metadata would be used as well as practicaldata from the bag files themselves, such as GPS locations and camera images that couldmake it easier to understand the dataset quickly.## More documentation:http://rosbag-metadata.readthedocs.org/ (work in progress)