Skip to main content
# rosbag_metadata
Tool for collecting and writing metadata to ROS bagfiles or to accompanying
yaml files.

## System metadata

The tool collects various system metadata by default and saves along with the
user entered data. The purpose of this is to be able to figure out what
versions 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

### Reading

Display 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 by
inspecting .bag files for /metadata topic. Displays the first hit unless
```--find-all``` is specified.

Read matadata from a yaml file:

```rosbag_metadata file.yaml```

### Writing

Write 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 be
inspected with ```rosbag info``` and the resulting information will be added to
the metadata. This option does not work when the target is a bag file.

### Templates

Template files are simpy yaml files with key pairs that will be used as default
keys and values if defined. If a template is used the default behavior of
rosbag_metadata is to not ask for values of keys defined with defaults in the
template. 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. User
location: Building X
```

## Configuration

The template, default keys, system metadata settings and more can be configured
in 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 config

The following config includes all the possible configuration options.
Default fields can be configured both via template and in the config file.

```
[config]
clean = no
write_rosbag_info = yes
system_info = yes
system_info_all = no
system_info_usb = yes
system_info_git = yes
system_info_ros = yes
system_info_env = yes
system_info_full_env = no
system_info_ip = yes
find_all = yes
debug = no
ask_template_defaults = no
template = ~/.ros/my_template.yaml
extra_fields = no
no_prompt = yes

[default_fields]
my_default_field
another_field = with_value
```

## Future direction

The original idea for this project is to be able to easily catalog bag files and datasets
recorded using ROS. This is the first step of that process. The to-do list includes
scripts 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 practical
data from the bag files themselves, such as GPS locations and camera images that could
make it easier to understand the dataset quickly.

## More documentation:

http://rosbag-metadata.readthedocs.org/ (work in progress)

Release files for rosbag_metadata 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rosbag_metadata 0.1.7
File Size Uploaded
rosbag_metadata-0.1.7.tar.gz 12.5 kB Details

Release files / rosbag_metadata-0.1.7.tar.gz

Download URL rosbag_metadata-0.1.7.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d88608f5d9e0cc067e8482a45ee94228a1ed1b4e169b0f0978e2ca97b0493067
BLAKE2b-256 checksum
How to use checksums
e82553a85cd4745fcf1c4f8a3bfd6c9f1c9437835f89b740abc40786be6d0465
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.7 This release

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page